forked from mirror/openmw-tes3mp
[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;
|
wasSneaking = false;
|
||||||
wasForceJumping = false;
|
wasForceJumping = false;
|
||||||
wasForceMoveJumping = false;
|
wasForceMoveJumping = false;
|
||||||
|
|
||||||
wasJumping = false;
|
|
||||||
wasFlying = false;
|
wasFlying = false;
|
||||||
|
|
||||||
statTimer = 0;
|
statTimer = 0;
|
||||||
|
@ -94,15 +92,14 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
||||||
bool isForceMoveJumping = ptrNpcStats.getMovementFlag(CreatureStats::Flag_ForceMoveJump);
|
bool isForceMoveJumping = ptrNpcStats.getMovementFlag(CreatureStats::Flag_ForceMoveJump);
|
||||||
|
|
||||||
isFlying = world->isFlying(ptr);
|
isFlying = world->isFlying(ptr);
|
||||||
bool isJumping = !world->isOnGround(ptr) && !isFlying;
|
|
||||||
|
|
||||||
MWMechanics::DrawState_ currentDrawState = ptr.getClass().getNpcStats(ptr).getDrawState();
|
MWMechanics::DrawState_ currentDrawState = ptr.getClass().getNpcStats(ptr).getDrawState();
|
||||||
|
|
||||||
if (wasRunning != isRunning
|
if (wasRunning != isRunning ||
|
||||||
|| wasSneaking != isSneaking || wasForceJumping != isForceJumping
|
wasSneaking != isSneaking || wasForceJumping != isForceJumping ||
|
||||||
|| wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState
|
wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState ||
|
||||||
|| wasJumping || isJumping || wasFlying || isFlying
|
wasFlying || isFlying ||
|
||||||
|| forceUpdate)
|
forceUpdate)
|
||||||
{
|
{
|
||||||
wasRunning = isRunning;
|
wasRunning = isRunning;
|
||||||
wasSneaking = isSneaking;
|
wasSneaking = isSneaking;
|
||||||
|
@ -111,7 +108,6 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
||||||
lastDrawState = currentDrawState;
|
lastDrawState = currentDrawState;
|
||||||
|
|
||||||
wasFlying = isFlying;
|
wasFlying = isFlying;
|
||||||
wasJumping = isJumping;
|
|
||||||
|
|
||||||
movementFlags = 0;
|
movementFlags = 0;
|
||||||
|
|
||||||
|
@ -120,7 +116,6 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
||||||
movementFlags = __SETFLAG(CreatureStats::Flag_Sneak, isSneaking);
|
movementFlags = __SETFLAG(CreatureStats::Flag_Sneak, isSneaking);
|
||||||
movementFlags = __SETFLAG(CreatureStats::Flag_Run, isRunning);
|
movementFlags = __SETFLAG(CreatureStats::Flag_Run, isRunning);
|
||||||
movementFlags = __SETFLAG(CreatureStats::Flag_ForceJump, isForceJumping);
|
movementFlags = __SETFLAG(CreatureStats::Flag_ForceJump, isForceJumping);
|
||||||
movementFlags = __SETFLAG(CreatureStats::Flag_ForceJump, isJumping);
|
|
||||||
movementFlags = __SETFLAG(CreatureStats::Flag_ForceMoveJump, isForceMoveJumping);
|
movementFlags = __SETFLAG(CreatureStats::Flag_ForceMoveJump, isForceMoveJumping);
|
||||||
|
|
||||||
#undef __SETFLAG
|
#undef __SETFLAG
|
||||||
|
@ -132,9 +127,6 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
|
||||||
else if (currentDrawState == MWMechanics::DrawState_Spell)
|
else if (currentDrawState == MWMechanics::DrawState_Spell)
|
||||||
drawState = 2;
|
drawState = 2;
|
||||||
|
|
||||||
if (isJumping)
|
|
||||||
updatePosition(true); // fix position after jump;
|
|
||||||
|
|
||||||
mwmp::Main::get().getNetworking()->getActorList()->addAnimFlagsActor(*this);
|
mwmp::Main::get().getNetworking()->getActorList()->addAnimFlagsActor(*this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -558,11 +558,11 @@ void LocalPlayer::updateAnimFlags(bool forceUpdate)
|
||||||
MWMechanics::DrawState_ currentDrawState = player.getClass().getNpcStats(player).getDrawState();
|
MWMechanics::DrawState_ currentDrawState = player.getClass().getNpcStats(player).getDrawState();
|
||||||
static MWMechanics::DrawState_ lastDrawState = player.getClass().getNpcStats(player).getDrawState();
|
static MWMechanics::DrawState_ lastDrawState = player.getClass().getNpcStats(player).getDrawState();
|
||||||
|
|
||||||
if (wasRunning != isRunning
|
if (wasRunning != isRunning ||
|
||||||
|| wasSneaking != isSneaking || wasForceJumping != isForceJumping
|
wasSneaking != isSneaking || wasForceJumping != isForceJumping ||
|
||||||
|| wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState
|
wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState ||
|
||||||
|| wasJumping || isJumping || wasFlying || isFlying
|
wasJumping || isJumping || wasFlying || isFlying ||
|
||||||
|| forceUpdate)
|
forceUpdate)
|
||||||
{
|
{
|
||||||
wasSneaking = isSneaking;
|
wasSneaking = isSneaking;
|
||||||
wasRunning = isRunning;
|
wasRunning = isRunning;
|
||||||
|
|
Loading…
Reference in a new issue