From: miniduikboot Date: Sat, 8 Jan 2022 17:15:12 +0000 (+0100) Subject: AC CheckMurder: Require half of cooldown X-Git-Tag: v1.7.0~15^2~1 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=db52b48cd616d4cd91f63ab472e583d139873755;p=rhonda%2Fimpostor.git AC CheckMurder: Require half of cooldown 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. --- diff --git a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerInfo.cs b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerInfo.cs index 0b1abce..a89536e 100644 --- a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerInfo.cs +++ b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerInfo.cs @@ -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)