[Client] Don't spam AnimFlags packets when a Player or Actor is flying

This commit is contained in:
David Cernat 2017-05-09 12:27:59 +03:00
parent 1f747d4375
commit d7d4dec200
2 changed files with 5 additions and 6 deletions

View file

@ -104,12 +104,12 @@ void LocalActor::updateAnimFlags(bool forceUpdate)
MWMechanics::DrawState_ currentDrawState = ptr.getClass().getCreatureStats(ptr).getDrawState();
if (wasRunning != isRunning ||
wasSneaking != isSneaking || wasForceJumping != isForceJumping ||
wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState ||
wasFlying || isFlying ||
if (wasRunning != isRunning || wasSneaking != isSneaking ||
wasForceJumping != isForceJumping || wasForceMoveJumping != isForceMoveJumping ||
lastDrawState != currentDrawState || wasFlying != isFlying ||
forceUpdate)
{
wasRunning = isRunning;
wasSneaking = isSneaking;
wasForceJumping = isForceJumping;

View file

@ -596,7 +596,7 @@ void LocalPlayer::updateAnimFlags(bool forceUpdate)
if (wasRunning != isRunning ||
wasSneaking != isSneaking || wasForceJumping != isForceJumping ||
wasForceMoveJumping != isForceMoveJumping || lastDrawState != currentDrawState ||
wasJumping || isJumping || wasFlying || isFlying ||
wasJumping || isJumping || wasFlying != isFlying ||
forceUpdate)
{
wasSneaking = isSneaking;
@ -1036,7 +1036,6 @@ void LocalPlayer::sendCellStates()
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_CELL_STATE to server");
getNetworking()->getPlayerPacket(ID_PLAYER_CELL_STATE)->setPlayer(this);
getNetworking()->getPlayerPacket(ID_PLAYER_CELL_STATE)->Send();
}
void LocalPlayer::sendSpellAddition(std::string id)