diff --git a/apps/openmw/mwmechanics/character.cpp b/apps/openmw/mwmechanics/character.cpp index b82fc4dc56..074723c447 100644 --- a/apps/openmw/mwmechanics/character.cpp +++ b/apps/openmw/mwmechanics/character.cpp @@ -104,7 +104,14 @@ static void getStateInfo(CharacterState state, std::string *group) CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim, CharacterState state, bool loop) - : mPtr(ptr), mAnimation(anim), mCharState(state), mSkipAnim(false), mMovingAnim(false), mSecondsOfRunning(0), mSecondsOfSwimming(0) + : mPtr(ptr) + , mAnimation(anim) + , mCharState(state) + , mWeapState(WeapState_None) + , mSkipAnim(false) + , mMovingAnim(false) + , mSecondsOfRunning(0) + , mSecondsOfSwimming(0) { if(!mAnimation) return; diff --git a/apps/openmw/mwmechanics/character.hpp b/apps/openmw/mwmechanics/character.hpp index 4ee217d119..ee2c6fbcfe 100644 --- a/apps/openmw/mwmechanics/character.hpp +++ b/apps/openmw/mwmechanics/character.hpp @@ -67,6 +67,20 @@ enum CharacterState { CharState_Death5 }; +enum WeaponState { + WeapState_None, + + WeapState_HandToHand, + WeapState_OneHand, + WeapState_TwoHand, + WeapState_TwoWide, + WeapState_BowAndArrow, + WeapState_Crossbow, + WeapState_ThowWeapon, + + WeapState_Spell +}; + class CharacterController { MWWorld::Ptr mPtr; @@ -76,6 +90,7 @@ class CharacterController AnimationQueue mAnimQueue; CharacterState mCharState; + WeaponState mWeapState; bool mLooping; bool mSkipAnim;