1
0

Moved reading flags to the protocol.

This commit is contained in:
STRWarrior
2013-12-15 15:11:59 +01:00
parent 9fe06af598
commit ffb5a69a9e
3 changed files with 23 additions and 19 deletions

View File

@@ -1286,7 +1286,25 @@ void cProtocol172::HandlePacketPlayerAbilities(cByteBuffer & a_ByteBuffer)
HANDLE_READ(a_ByteBuffer, ReadByte, Byte, Flags);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, FlyingSpeed);
HANDLE_READ(a_ByteBuffer, ReadBEFloat, float, WalkingSpeed);
m_Client->HandlePlayerAbilities(Flags, FlyingSpeed, WalkingSpeed);
bool IsFlying, CanFly;
if ((Flags & 2) != 0)
{
IsFlying = true;
}
else
{
IsFlying = false;
}
if ((Flags & 4) != 0)
{
CanFly = true;
}
else
{
CanFly = false;
}
m_Client->HandlePlayerAbilities(CanFly, IsFlying, FlyingSpeed, WalkingSpeed);
}