From 7a4c85021b9cc857ac8a501400ce67c6c871482b Mon Sep 17 00:00:00 2001 From: Lacyway <20912169+Lacyway@users.noreply.github.com> Date: Tue, 19 Nov 2024 20:18:48 +0100 Subject: [PATCH] Generate dogtag details inside corpsesyncpacket generation --- Fika.Core/Coop/Players/CoopPlayer.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Fika.Core/Coop/Players/CoopPlayer.cs b/Fika.Core/Coop/Players/CoopPlayer.cs index aac359d5..e08931c2 100644 --- a/Fika.Core/Coop/Players/CoopPlayer.cs +++ b/Fika.Core/Coop/Players/CoopPlayer.cs @@ -758,6 +758,14 @@ public HealthSyncPacket SetupCorpseSyncPacket(NetworkHealthSyncPacketStruct pack num *= 0.3f + 0.7f * Mathf.InverseLerp(50f, 20f, LastDamageInfo.PenetrationPower); _corpseAppliedForce = num; + if (FikaBackendUtils.IsServer || IsYourPlayer) + { + if (Side is not EPlayerSide.Savage) + { + GenerateDogtagDetails(); + } + } + HealthSyncPacket syncPacket = new(NetId) { Packet = packet, @@ -805,14 +813,7 @@ public override void OnDead(EDamageType damageType) if (IsYourPlayer) { StartCoroutine(LocalPlayerDied()); - } - if (FikaBackendUtils.IsServer || IsYourPlayer) - { - if (Side is not EPlayerSide.Savage) - { - GenerateDogtagDetails(); - } - } + } } private void FindKillerWeapon() @@ -837,7 +838,6 @@ private void FindKillerWeapon() /// /// TODO: Refactor... BSG code makes this difficult /// - /// private void GenerateDogtagDetails() { string accountId = AccountId;