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

0.6.1
David Cernat 8 years ago
parent 1f747d4375
commit d7d4dec200

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

@ -596,7 +596,7 @@ void LocalPlayer::updateAnimFlags(bool forceUpdate)
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;
@ -1036,7 +1036,6 @@ void LocalPlayer::sendCellStates()
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Sending ID_PLAYER_CELL_STATE to server"); 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)->setPlayer(this);
getNetworking()->getPlayerPacket(ID_PLAYER_CELL_STATE)->Send(); getNetworking()->getPlayerPacket(ID_PLAYER_CELL_STATE)->Send();
} }
void LocalPlayer::sendSpellAddition(std::string id) void LocalPlayer::sendSpellAddition(std::string id)

Loading…
Cancel
Save