From 7f943e6b2ec191e5d8a10d3c8141967ed803b4a0 Mon Sep 17 00:00:00 2001 From: miniduikboot Date: Sat, 9 Mar 2024 12:19:49 +0100 Subject: [PATCH] Allow host-only mods to desync murder roles --- src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs index a4ee87a..a45af1d 100644 --- a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs +++ b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs @@ -804,7 +804,9 @@ namespace Impostor.Server.Net.Inner.Objects } } - if (target == null || target.PlayerInfo.IsImpostor) + // Host-only mods intentionally desync players, so it may appear that one killing role (like a genuine impostor) is killing another + // killing role (like an sheriff). So this needs to be allowed if the host requested authority. + if (target == null || (target.PlayerInfo.IsImpostor && !_game.IsHostAuthoritive)) { if (await sender.Client.ReportCheatAsync(RpcCalls.CheckMurder, CheatCategory.GameFlow, "Client tried to murder invalid target")) { @@ -849,7 +851,7 @@ namespace Impostor.Server.Net.Inner.Objects } } - if (target == null || target.PlayerInfo.IsImpostor) + if (target == null) { if (await sender.Client.ReportCheatAsync(RpcCalls.MurderPlayer, CheatCategory.GameFlow, "Client tried to murder invalid target")) { -- 2.39.5