forked from mirror/openmw-tes3mp
use mcurrentjump instead of custom attrib
This commit is contained in:
parent
5c8f491441
commit
7bc512974f
2 changed files with 5 additions and 8 deletions
|
@ -372,9 +372,6 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jumpAnimName.length() > 0)
|
|
||||||
mJumpAnimName = jumpAnimName;
|
|
||||||
|
|
||||||
if(mJumpState == JumpState_InAir)
|
if(mJumpState == JumpState_InAir)
|
||||||
{
|
{
|
||||||
mAnimation->disable(mCurrentJump);
|
mAnimation->disable(mCurrentJump);
|
||||||
|
@ -385,8 +382,9 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (startAtLoop)
|
||||||
mAnimation->disable(mCurrentJump);
|
mAnimation->disable(mCurrentJump);
|
||||||
mCurrentJump.clear();
|
|
||||||
if (mAnimation->hasAnimation("jump"))
|
if (mAnimation->hasAnimation("jump"))
|
||||||
mAnimation->play(jumpAnimName, Priority_Jump, jumpmask, true,
|
mAnimation->play(jumpAnimName, Priority_Jump, jumpmask, true,
|
||||||
1.0f, "loop stop", "stop", 0.0f, 0);
|
1.0f, "loop stop", "stop", 0.0f, 0);
|
||||||
|
@ -1882,12 +1880,12 @@ void CharacterController::update(float duration)
|
||||||
if(rot.z() > 0.0f)
|
if(rot.z() > 0.0f)
|
||||||
{
|
{
|
||||||
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
||||||
mAnimation->disable(mJumpAnimName);
|
mAnimation->disable(mCurrentJump);
|
||||||
}
|
}
|
||||||
else if(rot.z() < 0.0f)
|
else if(rot.z() < 0.0f)
|
||||||
{
|
{
|
||||||
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
|
movestate = inwater ? CharState_SwimTurnLeft : CharState_TurnLeft;
|
||||||
mAnimation->disable(mJumpAnimName);
|
mAnimation->disable(mCurrentJump);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,6 @@ class CharacterController : public MWRender::Animation::TextKeyListener
|
||||||
|
|
||||||
JumpingState mJumpState;
|
JumpingState mJumpState;
|
||||||
std::string mCurrentJump;
|
std::string mCurrentJump;
|
||||||
std::string mJumpAnimName;
|
|
||||||
|
|
||||||
WeaponType mWeaponType;
|
WeaponType mWeaponType;
|
||||||
std::string mCurrentWeapon;
|
std::string mCurrentWeapon;
|
||||||
|
|
Loading…
Reference in a new issue