Skip to content

Commit

Permalink
Fixes #53
Browse files Browse the repository at this point in the history
- Remove dog tag on exfil
  • Loading branch information
Lacyway committed May 20, 2024
1 parent a781981 commit 1ddec4b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,18 @@ public override void Stop(string profileId, ExitStatus exitStatus, string exitNa
CoopPlayer myPlayer = (CoopPlayer)Singleton<GameWorld>.Instance.MainPlayer;
myPlayer.PacketSender?.DestroyThis();

if (myPlayer.Side != EPlayerSide.Savage)
{
if (myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem != null)
{
GStruct414<GClass2785> result = InteractionsHandlerClass.Remove(myPlayer.Equipment.GetSlot(EquipmentSlot.Dogtag).ContainedItem, myPlayer.GClass2761_0, false, true);
if (result.Error != null)
{
FikaPlugin.Instance.FikaLogger.LogWarning("CoopGame::Stop: Error removing dog tag!");
}
}
}

if (!myPlayer.ActiveHealthController.IsAlive && exitStatus == ExitStatus.Survived)
{
exitStatus = ExitStatus.Killed;
Expand Down

0 comments on commit 1ddec4b

Please sign in to comment.