Core/MovementGenerators: Ensure correct virtual function overrides are called. May/should/will/could/might fix various different movement related issues. Please report back.
This commit is contained in:
@@ -399,7 +399,7 @@ void TimedFleeingMovementGenerator::Finalize(Unit &owner)
|
||||
}
|
||||
}
|
||||
|
||||
bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32 time_diff)
|
||||
bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32& time_diff)
|
||||
{
|
||||
if (!owner.isAlive())
|
||||
return false;
|
||||
|
||||
@@ -64,7 +64,7 @@ class TimedFleeingMovementGenerator
|
||||
i_totalFleeTime(time) {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
|
||||
bool Update(Unit &, const uint32);
|
||||
bool Update(Unit &, const uint32&);
|
||||
void Finalize(Unit &);
|
||||
|
||||
private:
|
||||
|
||||
@@ -49,7 +49,7 @@ void RotateMovementGenerator::Initialize(Unit& owner)
|
||||
owner.AttackStop();
|
||||
}
|
||||
|
||||
bool RotateMovementGenerator::Update(Unit& owner, const uint32 diff)
|
||||
bool RotateMovementGenerator::Update(Unit& owner, const uint32& diff)
|
||||
{
|
||||
float angle = owner.GetOrientation();
|
||||
if (m_direction == ROTATE_DIRECTION_LEFT)
|
||||
@@ -93,7 +93,7 @@ DistractMovementGenerator::Finalize(Unit& owner)
|
||||
}
|
||||
|
||||
bool
|
||||
DistractMovementGenerator::Update(Unit& /*owner*/, const uint32 time_diff)
|
||||
DistractMovementGenerator::Update(Unit& /*owner*/, const uint32& time_diff)
|
||||
{
|
||||
if (time_diff > m_timer)
|
||||
return false;
|
||||
|
||||
@@ -28,7 +28,7 @@ class IdleMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit &);
|
||||
void Finalize(Unit &) { }
|
||||
void Reset(Unit &);
|
||||
bool Update(Unit &, const uint32) { return true; }
|
||||
bool Update(Unit &, const uint32&) { return true; }
|
||||
MovementGeneratorType GetMovementGeneratorType() { return IDLE_MOTION_TYPE; }
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ class RotateMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit& owner);
|
||||
void Finalize(Unit& owner);
|
||||
void Reset(Unit& owner) { Initialize(owner); }
|
||||
bool Update(Unit& owner, const uint32 time_diff);
|
||||
bool Update(Unit& owner, const uint32& time_diff);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return ROTATE_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
@@ -58,7 +58,7 @@ class DistractMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit& owner);
|
||||
void Finalize(Unit& owner);
|
||||
void Reset(Unit& owner) { Initialize(owner); }
|
||||
bool Update(Unit& owner, const uint32 time_diff);
|
||||
bool Update(Unit& owner, const uint32& time_diff);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return DISTRACT_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -107,7 +107,7 @@ void AssistanceMovementGenerator::Finalize(Unit &unit)
|
||||
unit.GetMotionMaster()->MoveSeekAssistanceDistract(sWorld->getIntConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY));
|
||||
}
|
||||
|
||||
bool EffectMovementGenerator::Update(Unit &unit, const uint32)
|
||||
bool EffectMovementGenerator::Update(Unit &unit, const uint32&)
|
||||
{
|
||||
return !unit.movespline->Finalized();
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ class EffectMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit &) {}
|
||||
void Finalize(Unit &unit);
|
||||
void Reset(Unit &) {}
|
||||
bool Update(Unit &u, const uint32);
|
||||
bool Update(Unit &u, const uint32&);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return EFFECT_MOTION_TYPE; }
|
||||
private:
|
||||
uint32 m_Id;
|
||||
|
||||
@@ -240,7 +240,7 @@ void FlightPathMovementGenerator::Reset(Player & player)
|
||||
init.Launch();
|
||||
}
|
||||
|
||||
bool FlightPathMovementGenerator::Update(Player &player, const uint32 /*diff*/)
|
||||
bool FlightPathMovementGenerator::Update(Player &player, const uint32& /*diff*/)
|
||||
{
|
||||
uint32 pointId = (uint32)player.movespline->currentPathIdx();
|
||||
if (pointId > i_currentNode)
|
||||
|
||||
@@ -123,7 +123,7 @@ public PathMovementBase<Player, TaxiPathNodeList const*>
|
||||
void Initialize(Player &);
|
||||
void Reset(Player &);
|
||||
void Finalize(Player &);
|
||||
bool Update(Player &, const uint32);
|
||||
bool Update(Player &, const uint32&);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
|
||||
|
||||
TaxiPathNodeList const& GetPath() { return *i_path; }
|
||||
|
||||
Reference in New Issue
Block a user