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:
parent
020e3e8a8e
commit
05060e57ec
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user