mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[12674] Rework StopMove to not start movement if already stopped
thx to Schmoozerd for hint thx to rsa for pointing to bug Signed-off-by: Schmoozerd <schmoozerd@cmangos>
This commit is contained in:
parent
de2cc58be9
commit
394be2c5bf
4 changed files with 7 additions and 4 deletions
|
|
@ -10852,10 +10852,13 @@ void Unit::SendPetAIReaction()
|
|||
|
||||
///----------End of Pet responses methods----------
|
||||
|
||||
void Unit::StopMoving()
|
||||
void Unit::StopMoving(bool forceSendStop /*=false*/)
|
||||
{
|
||||
clearUnitState(UNIT_STAT_MOVING);
|
||||
|
||||
if (IsStopped() && !forceSendStop)
|
||||
return;
|
||||
|
||||
// not need send any packets if not in world
|
||||
if (!IsInWorld())
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -2675,7 +2675,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
|||
MotionMaster* GetMotionMaster() { return &i_motionMaster; }
|
||||
|
||||
bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); }
|
||||
void StopMoving();
|
||||
void StopMoving(bool forceSendStop = false);
|
||||
|
||||
void SetFeared(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0, uint32 time = 0);
|
||||
void SetConfused(bool apply, ObjectGuid casterGuid = ObjectGuid(), uint32 spellID = 0);
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ void FlightPathMovementGenerator::Finalize(Player& player)
|
|||
// update z position to ground and orientation for landing point
|
||||
// this prevent cheating with landing point at lags
|
||||
// when client side flight end early in comparison server side
|
||||
player.StopMoving();
|
||||
player.StopMoving(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12673"
|
||||
#define REVISION_NR "12674"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue