diff options
Diffstat (limited to 'src/game/MotionMaster.h')
-rw-r--r-- | src/game/MotionMaster.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/game/MotionMaster.h b/src/game/MotionMaster.h index d275bdd4b90..4d9953c9d15 100644 --- a/src/game/MotionMaster.h +++ b/src/game/MotionMaster.h @@ -63,20 +63,25 @@ class TRINITY_DLL_SPEC MotionMaster //: private std::stack<MovementGenerator *> _Ty Impl[MAX_MOTION_SLOT]; int i_top; - int size() const { return i_top + 1; } bool empty() const { return i_top < 0; } void pop() { Impl[i_top] = NULL; --i_top; } void push(_Ty _Val) { ++i_top; Impl[i_top] = _Val; } public: - explicit MotionMaster(Unit *unit) : i_owner(unit), i_top(-1) {} + explicit MotionMaster(Unit *unit) : i_owner(unit), i_top(-1) + { + for(int i = 0; i < MAX_MOTION_SLOT; ++i) + Impl[i] = NULL; + } ~MotionMaster(); void Initialize(); //MovementGenerator* operator->(void) { return top(); } + int size() const { return i_top + 1; } _Ty top() const { return Impl[i_top]; } + _Ty GetMotionSlot(int slot) { return Impl[slot]; } /*using Impl::top; using Impl::empty; |