mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
[Client] Remove jump check from LocalActor that is irrelevant for NPCs
This commit is contained in:
parent
e70faf1016
commit
1f6ba9d9ee
2 changed files with 10 additions and 18 deletions
|
@ -27,8 +27,6 @@ LocalActor::LocalActor()
|
|||
wasSneaking = false;
|
||||
wasForceJumping = false;
|
||||
wasForceMoveJumping = false;
|
||||
|
||||
wasJumping = false;
|
||||
wasFlying = false;
|
||||
|
||||
statTimer = 0;
|
||||
|
@ -94,15 +92,14 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
|||
bool isForceMoveJumping = ptrNpcStats.getMovementFlag(CreatureStats::Flag_ForceMoveJump);
|
||||
|
||||
isFlying = world->isFlying(ptr);
|
||||
bool isJumping = !world->isOnGround(ptr) && !isFlying;
|
||||
|
||||
MWMechanics::DrawState_ currentDrawState = ptr.getClass().getNpcStats(ptr).getDrawState();
|
||||
|
||||
if (wasRunning != isRunning
|
||||
|| wasSneaking != isSneaking || wasForceJumping != isForceJumping
|
||||
|| wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState
|
||||
|| wasJumping || isJumping || wasFlying || isFlying
|
||||
|| forceUpdate)
|
||||
if (wasRunning != isRunning ||
|
||||
wasSneaking != isSneaking || wasForceJumping != isForceJumping ||
|
||||
wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState ||
|
||||
wasFlying || isFlying ||
|
||||
forceUpdate)
|
||||
{
|
||||
wasRunning = isRunning;
|
||||
wasSneaking = isSneaking;
|
||||
|
@ -111,7 +108,6 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
|||
lastDrawState = currentDrawState;
|
||||
|
||||
wasFlying = isFlying;
|
||||
wasJumping = isJumping;
|
||||
|
||||
movementFlags = 0;
|
||||
|
||||
|
@ -120,7 +116,6 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
|||
movementFlags = __SETFLAG(CreatureStats::Flag_Sneak, isSneaking);
|
||||
movementFlags = __SETFLAG(CreatureStats::Flag_Run, isRunning);
|
||||
movementFlags = __SETFLAG(CreatureStats::Flag_ForceJump, isForceJumping);
|
||||
movementFlags = __SETFLAG(CreatureStats::Flag_ForceJump, isJumping);
|
||||
movementFlags = __SETFLAG(CreatureStats::Flag_ForceMoveJump, isForceMoveJumping);
|
||||
|
||||
#undef __SETFLAG
|
||||
|
@ -132,9 +127,6 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
|||
else if (currentDrawState == MWMechanics::DrawState_Spell)
|
||||
drawState = 2;
|
||||
|
||||
if (isJumping)
|
||||
updatePosition(true); // fix position after jump;
|
||||
|
||||
mwmp::Main::get().getNetworking()->getActorList()->addAnimFlagsActor(*this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -558,11 +558,11 @@ void LocalPlayer::updateAnimFlags(bool forceUpdate)
|
|||
MWMechanics::DrawState_ currentDrawState = player.getClass().getNpcStats(player).getDrawState();
|
||||
static MWMechanics::DrawState_ lastDrawState = player.getClass().getNpcStats(player).getDrawState();
|
||||
|
||||
if (wasRunning != isRunning
|
||||
|| wasSneaking != isSneaking || wasForceJumping != isForceJumping
|
||||
|| wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState
|
||||
|| wasJumping || isJumping || wasFlying || isFlying
|
||||
|| forceUpdate)
|
||||
if (wasRunning != isRunning ||
|
||||
wasSneaking != isSneaking || wasForceJumping != isForceJumping ||
|
||||
wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState ||
|
||||
wasJumping || isJumping || wasFlying || isFlying ||
|
||||
forceUpdate)
|
||||
{
|
||||
wasSneaking = isSneaking;
|
||||
wasRunning = isRunning;
|
||||
|
|
Loading…
Reference in a new issue