1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-04-01 20:36:42 +00:00

[General] Use compression for string values used in Attack packets

This commit is contained in:
David Cernat 2019-11-29 11:19:24 +02:00
parent 140c1c9c12
commit 47443e19cb
2 changed files with 6 additions and 6 deletions

View file

@ -33,13 +33,13 @@ void PacketActorAttack::Actor(BaseActor &actor, bool send)
if (actor.attack.type == mwmp::Attack::MELEE) if (actor.attack.type == mwmp::Attack::MELEE)
{ {
RW(actor.attack.attackAnimation, send); RW(actor.attack.attackAnimation, send, true);
} }
else if (actor.attack.type == mwmp::Attack::RANGED) else if (actor.attack.type == mwmp::Attack::RANGED)
{ {
RW(actor.attack.attackStrength, send); RW(actor.attack.attackStrength, send);
RW(actor.attack.rangedWeaponId, send); RW(actor.attack.rangedWeaponId, send, true);
RW(actor.attack.rangedAmmoId, send); RW(actor.attack.rangedAmmoId, send, true);
} }
if (actor.attack.isHit) if (actor.attack.isHit)

View file

@ -34,13 +34,13 @@ void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
if (player->attack.type == mwmp::Attack::MELEE) if (player->attack.type == mwmp::Attack::MELEE)
{ {
RW(player->attack.attackAnimation, send); RW(player->attack.attackAnimation, send, true);
} }
else if (player->attack.type == mwmp::Attack::RANGED) else if (player->attack.type == mwmp::Attack::RANGED)
{ {
RW(player->attack.attackStrength, send); RW(player->attack.attackStrength, send);
RW(player->attack.rangedWeaponId, send); RW(player->attack.rangedWeaponId, send, true);
RW(player->attack.rangedAmmoId, send); RW(player->attack.rangedAmmoId, send, true);
} }
if (player->attack.isHit) if (player->attack.isHit)