Allow host-only mods to desync murder roles

This commit is contained in:
miniduikboot committed 2024-04-04 20:10:23 +02:00
1 parent 28f3cb3b2e
commit 7f943e6b2e
1 file changed
+4 -2
@@ -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"))
{