diff options
author | Machiavelli <machiaveltman@gmail.com> | 2012-02-22 03:45:52 -0800 |
---|---|---|
committer | Machiavelli <machiaveltman@gmail.com> | 2012-02-22 03:45:52 -0800 |
commit | e742873f1bf53d904c2a215abe11c4548e1d220b (patch) | |
tree | d0b07b48ab3110b1b276be6c756a70ee7c6f5083 /src | |
parent | a3f3058499ee0f35c684588a386c6b69683adf70 (diff) | |
parent | af905468355877dd135cd6d1a793765bc2ef9eda (diff) |
Merge pull request #5271 from Chaplain/knockback
Core/Movement: Fix MoveJump handling.
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Movement/MotionMaster.cpp | 5 | ||||
-rwxr-xr-x | src/server/game/Movement/MotionMaster.h | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 954a193c498..27816753ca7 100755 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -365,10 +365,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee init.SetParabolic(max_height,0); init.SetVelocity(speedXY); init.Launch(); - if (_owner->GetTypeId() == TYPEID_PLAYER) - Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); - else - Mutate(new EffectMovementGenerator(id), MOTION_SLOT_ACTIVE); + Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED); } void MotionMaster::MoveFall(uint32 id/*=0*/) diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h index 9910f8ad40a..d6144bfcc3a 100755 --- a/src/server/game/Movement/MotionMaster.h +++ b/src/server/game/Movement/MotionMaster.h @@ -84,7 +84,12 @@ class MotionMaster //: private std::stack<MovementGenerator *> //typedef std::stack<MovementGenerator *> Impl; typedef MovementGenerator* _Ty; - void pop() { Impl[_top] = NULL; --_top; } + void pop() + { + Impl[_top] = NULL; + while (!top()) + --_top; + } void push(_Ty _Val) { ++_top; Impl[_top] = _Val; } bool needInitTop() const { return _needInit[_top]; } |