Skip to content

Commit

Permalink
Generate dogtag details inside corpsesyncpacket generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Nov 19, 2024
1 parent adbc229 commit 7a4c850
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand All @@ -837,7 +838,6 @@ private void FindKillerWeapon()
/// <summary>
/// TODO: Refactor... BSG code makes this difficult
/// </summary>
/// <returns></returns>
private void GenerateDogtagDetails()
{
string accountId = AccountId;
Expand Down

0 comments on commit 7a4c850

Please sign in to comment.