From: miniduikboot Date: Sat, 9 Mar 2024 11:19:49 +0000 (+0100) Subject: Allow host-only mods to desync murder roles X-Git-Tag: v1.9.2~7^2~4 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=7f943e6b2ec191e5d8a10d3c8141967ed803b4a0;p=rhonda%2Fimpostor.git Allow host-only mods to desync murder roles --- 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")) {