1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00

Add a weapon state to the character controller

This commit is contained in:
Chris Robinson 2013-04-29 13:07:49 -07:00
parent 020e3e8a8e
commit 05060e57ec
2 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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;