mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 20:36:42 +00:00
Add a weapon state to the character controller
This commit is contained in:
parent
020e3e8a8e
commit
05060e57ec
2 changed files with 23 additions and 1 deletions
|
@ -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…
Reference in a new issue