]> git.deb.at Git - rhonda/impostor.git/commitdiff
Allow host-only mods to desync kill timeouts
authorminiduikboot <mini@duikbo.at>
Sat, 9 Mar 2024 11:51:57 +0000 (12:51 +0100)
committerminiduikboot <mini@duikbo.at>
Thu, 4 Apr 2024 18:10:23 +0000 (20:10 +0200)
src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs

index a45af1d6a7a8c9597011649a2006cfa26b7bf9e2..958d8a90eb165615cf1215ee9b69d6316a25987b 100644 (file)
@@ -798,9 +798,13 @@ namespace Impostor.Server.Net.Inner.Objects
                     // This request was made too quickly by spamming the kill button, cancel it if we're in server authoritive mode
                     return _game.IsHostAuthoritive;
                 }
-                else if (await sender.Client.ReportCheatAsync(RpcCalls.CheckMurder, CheatCategory.GameFlow, "Client tried to murder too fast"))
+                else if (!_game.IsHostAuthoritive)
                 {
-                    return false;
+                    // Host-only mods may desync the kill timeout between players
+                    if (await sender.Client.ReportCheatAsync(RpcCalls.CheckMurder, CheatCategory.GameFlow, "Client tried to murder too fast"))
+                    {
+                        return false;
+                    }
                 }
             }