mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +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)
|
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)
|
if(!mAnimation)
|
||||||
return;
|
return;
|
||||||
|
@ -67,6 +67,20 @@ enum CharacterState {
|
|||||||
CharState_Death5
|
CharState_Death5
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum WeaponState {
|
||||||
|
WeapState_None,
|
||||||
|
|
||||||
|
WeapState_HandToHand,
|
||||||
|
WeapState_OneHand,
|
||||||
|
WeapState_TwoHand,
|
||||||
|
WeapState_TwoWide,
|
||||||
|
WeapState_BowAndArrow,
|
||||||
|
WeapState_Crossbow,
|
||||||
|
WeapState_ThowWeapon,
|
||||||
|
|
||||||
|
WeapState_Spell
|
||||||
|
};
|
||||||
|
|
||||||
class CharacterController
|
class CharacterController
|
||||||
{
|
{
|
||||||
MWWorld::Ptr mPtr;
|
MWWorld::Ptr mPtr;
|
||||||
@ -76,6 +90,7 @@ class CharacterController
|
|||||||
AnimationQueue mAnimQueue;
|
AnimationQueue mAnimQueue;
|
||||||
|
|
||||||
CharacterState mCharState;
|
CharacterState mCharState;
|
||||||
|
WeaponState mWeapState;
|
||||||
bool mLooping;
|
bool mLooping;
|
||||||
bool mSkipAnim;
|
bool mSkipAnim;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user