mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 08:00:56 -04:00
[General] Use compression for string values used in Attack packets
This commit is contained in:
parent
140c1c9c12
commit
47443e19cb
@ -33,13 +33,13 @@ void PacketActorAttack::Actor(BaseActor &actor, bool send)
|
||||
|
||||
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)
|
||||
{
|
||||
RW(actor.attack.attackStrength, send);
|
||||
RW(actor.attack.rangedWeaponId, send);
|
||||
RW(actor.attack.rangedAmmoId, send);
|
||||
RW(actor.attack.rangedWeaponId, send, true);
|
||||
RW(actor.attack.rangedAmmoId, send, true);
|
||||
}
|
||||
|
||||
if (actor.attack.isHit)
|
||||
|
@ -34,13 +34,13 @@ void PacketPlayerAttack::Packet(RakNet::BitStream *bs, bool send)
|
||||
|
||||
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)
|
||||
{
|
||||
RW(player->attack.attackStrength, send);
|
||||
RW(player->attack.rangedWeaponId, send);
|
||||
RW(player->attack.rangedAmmoId, send);
|
||||
RW(player->attack.rangedWeaponId, send, true);
|
||||
RW(player->attack.rangedAmmoId, send, true);
|
||||
}
|
||||
|
||||
if (player->attack.isHit)
|
||||
|
Loading…
x
Reference in New Issue
Block a user