mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-18 05:36:47 +00:00
[Client] Revert "Merge pull request #1529 from drummyfish/animfix"
This reverts commit45993d3da2
, reversing changes made to3d347730dc
. That commit made players have to wait around 1.5 seconds after each jump before doing a new one. It will be reinstated once its accompanying OpenMW issue at https://bugs.openmw.org/issues/4250 is fixed.
This commit is contained in:
parent
db0e0d376e
commit
2f4cd6b713
1 changed files with 12 additions and 26 deletions
|
@ -390,29 +390,21 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mCurrentJump.empty())
|
if(mJumpState == JumpState_InAir)
|
||||||
|
{
|
||||||
|
mAnimation->disable(mCurrentJump);
|
||||||
|
mCurrentJump = jumpAnimName;
|
||||||
|
if (mAnimation->hasAnimation("jump"))
|
||||||
|
mAnimation->play(mCurrentJump, Priority_Jump, jumpmask, false,
|
||||||
|
1.0f, (startAtLoop?"loop start":"start"), "stop", 0.0f, ~0ul);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
mAnimation->disable(mCurrentJump);
|
mAnimation->disable(mCurrentJump);
|
||||||
mCurrentJump.clear();
|
mCurrentJump.clear();
|
||||||
}
|
if (mAnimation->hasAnimation("jump"))
|
||||||
|
|
||||||
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);
|
|
||||||
mCurrentJump = jumpAnimName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (mJumpState == JumpState_Landing)
|
|
||||||
{
|
|
||||||
if (mAnimation->hasAnimation(jumpAnimName))
|
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1833,6 +1825,7 @@ void CharacterController::update(float duration)
|
||||||
mHasMovedInXY = std::abs(vec.x())+std::abs(vec.y()) > 0.0f;
|
mHasMovedInXY = std::abs(vec.x())+std::abs(vec.y()) > 0.0f;
|
||||||
isrunning = isrunning && mHasMovedInXY;
|
isrunning = isrunning && mHasMovedInXY;
|
||||||
|
|
||||||
|
|
||||||
// advance athletics
|
// advance athletics
|
||||||
if(mHasMovedInXY && mPtr == getPlayer())
|
if(mHasMovedInXY && mPtr == getPlayer())
|
||||||
{
|
{
|
||||||
|
@ -1987,8 +1980,7 @@ void CharacterController::update(float duration)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
jumpstate = mAnimation->isPlaying(mCurrentJump) ? JumpState_Landing : JumpState_None;
|
jumpstate = JumpState_None;
|
||||||
|
|
||||||
vec.z() = 0.0f;
|
vec.z() = 0.0f;
|
||||||
|
|
||||||
inJump = false;
|
inJump = false;
|
||||||
|
@ -2018,15 +2010,9 @@ void CharacterController::update(float duration)
|
||||||
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
|
else if(rot.z() != 0.0f && !sneak && !(mPtr == getPlayer() && MWBase::Environment::get().getWorld()->isFirstPerson()))
|
||||||
{
|
{
|
||||||
if(rot.z() > 0.0f)
|
if(rot.z() > 0.0f)
|
||||||
{
|
|
||||||
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
movestate = inwater ? CharState_SwimTurnRight : CharState_TurnRight;
|
||||||
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(mCurrentJump);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue