diff --git a/Fika.Core/Coop/Players/CoopPlayer.cs b/Fika.Core/Coop/Players/CoopPlayer.cs index a7439a74..256a64cd 100644 --- a/Fika.Core/Coop/Players/CoopPlayer.cs +++ b/Fika.Core/Coop/Players/CoopPlayer.cs @@ -535,7 +535,8 @@ public HealthSyncPacket SetupDeathPacket(GStruct347 packet) Force = _corpseAppliedForce, OverallVelocity = Velocity }, - Equipment = Equipment + Equipment = Equipment, + TriggerZones = TriggerZones.Count > 0 ? [.. TriggerZones] : null, }; } @@ -1308,14 +1309,6 @@ public virtual void HandleDamagePacket(DamagePacket packet) ClientApplyShot(damageInfo, packet.DamageInfo.BodyPartType, packet.DamageInfo.ColliderType, packet.DamageInfo.ArmorPlateCollider); } - public void HandleDeathPatchet(DeathPacket packet) - { - if (packet.HasInventory) - { - SetInventory(packet.Equipment); - } - } - public virtual void SetupDogTag() { if (LastAggressor != null) diff --git a/Fika.Core/Networking/Packets/Player/HealthSyncPacket.cs b/Fika.Core/Networking/Packets/Player/HealthSyncPacket.cs index 28177c14..d559ede3 100644 --- a/Fika.Core/Networking/Packets/Player/HealthSyncPacket.cs +++ b/Fika.Core/Networking/Packets/Player/HealthSyncPacket.cs @@ -12,6 +12,7 @@ public struct HealthSyncPacket(int netId) : INetSerializable public string KillerWeaponId; public RagdollPacket RagdollPacket; public EquipmentClass Equipment; + public string[] TriggerZones; public void Deserialize(NetDataReader reader) { @@ -138,6 +139,7 @@ public void Deserialize(NetDataReader reader) KillerWeaponId = reader.GetString(); RagdollPacket = RagdollPacket.Deserialize(reader); Equipment = (EquipmentClass)reader.GetItem(); + TriggerZones = reader.GetStringArray(); break; } break; @@ -349,6 +351,7 @@ public void Serialize(NetDataWriter writer) writer.Put(KillerWeaponId); RagdollPacket.Serialize(writer, RagdollPacket); writer.PutItem(Equipment); + writer.PutArray(TriggerZones); break; } break;