Prevent death animation spam

This commit is contained in:
D1GQ committed 2024-07-27 23:58:16 -05:00
1 parent 7e4609bf75
commit 6c8e214d73
1 file changed
+16
+16
View File
@@ -78,3 +78,19 @@ public class HudManagerPatch
catch { }
}
}
[HarmonyPatch(typeof(KillOverlay))]
public class KillOverlayPatch
{
[HarmonyPatch(nameof(KillOverlay.ShowKillAnimation))]
[HarmonyPrefix]
private static bool ShowKillAnimation_Prefix()
{
if (!PlayerControl.LocalPlayer.IsAlive())
{
return false;
}
return true;
}
}