mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 13:45:32 +00:00
additional animation refactor
This commit is contained in:
parent
ff1265c0e7
commit
430d01a39a
1 changed files with 14 additions and 15 deletions
|
@ -372,29 +372,28 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mJumpState == JumpState_InAir)
|
if (!mCurrentJump.empty())
|
||||||
{
|
{
|
||||||
mAnimation->disable(mCurrentJump);
|
mAnimation->disable(mCurrentJump);
|
||||||
mCurrentJump = jumpAnimName;
|
mCurrentJump.clear();
|
||||||
if (mAnimation->hasAnimation("jump"))
|
}
|
||||||
mAnimation->play(mCurrentJump, Priority_Jump, jumpmask, false,
|
|
||||||
|
if(mJumpState == JumpState_InAir)
|
||||||
|
{
|
||||||
|
if (mAnimation->hasAnimation(jumpAnimName))
|
||||||
|
{
|
||||||
|
mAnimation->play(jumpAnimName, Priority_Jump, jumpmask, false,
|
||||||
1.0f, (startAtLoop?"loop start":"start"), "stop", 0.0f, ~0ul);
|
1.0f, (startAtLoop?"loop start":"start"), "stop", 0.0f, ~0ul);
|
||||||
|
mCurrentJump = jumpAnimName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (mJumpState == JumpState_Landing)
|
else if (mJumpState == JumpState_Landing)
|
||||||
{
|
{
|
||||||
if (startAtLoop)
|
if (mAnimation->hasAnimation(jumpAnimName))
|
||||||
mAnimation->disable(mCurrentJump);
|
{
|
||||||
|
|
||||||
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);
|
||||||
}
|
mCurrentJump = jumpAnimName;
|
||||||
else // JumpState_None
|
|
||||||
{
|
|
||||||
if (mCurrentJump.length() > 0)
|
|
||||||
{
|
|
||||||
mAnimation->disable(mCurrentJump);
|
|
||||||
mCurrentJump.clear();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue