]> git.deb.at Git - rhonda/impostor.git/commitdiff
AC CheckMurder: Require half of cooldown
authorminiduikboot <mini@duikbo.at>
Sat, 8 Jan 2022 17:15:12 +0000 (18:15 +0100)
committerminiduikboot <mini@duikbo.at>
Sat, 8 Jan 2022 18:20:11 +0000 (19:20 +0100)
When the Guardian Angel protects a player, the impostor that just missed
their kill gets back half of their cooldown. Keeping track of whether or
not the player was protected is more difficult due to how the Guardian
Angel is implemented, so instead we halve the minimum time between kill
in order to minimize false positives.

src/Impostor.Server/Net/Inner/Objects/InnerPlayerInfo.cs

index 0b1abcefa0d763fe7560e7dbee551dde0c68cd6d..a89536e85ed21e7df04952a64baf917738b6d26f 100644 (file)
@@ -55,7 +55,7 @@ namespace Impostor.Server.Net.Inner.Objects
                 return false;
             }
 
-            return dateTimeProvider.UtcNow.Subtract(LastMurder).TotalSeconds >= game.Options.KillCooldown;
+            return dateTimeProvider.UtcNow.Subtract(LastMurder).TotalSeconds >= game.Options.KillCooldown / 2;
         }
 
         public void Serialize(IMessageWriter writer)