From: AeonLucid Date: Sun, 25 Oct 2020 20:25:21 +0000 (+0100) Subject: Fixes incorrect anticheat detection #77 X-Git-Tag: v1.2.2~80 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=6c18531f62b13656c617f87ff81a54c4c4a6750d;p=rhonda%2Fimpostor.git Fixes incorrect anticheat detection #77 --- diff --git a/src/Impostor.Server/Net/Inner/Objects/InnerShipStatus.cs b/src/Impostor.Server/Net/Inner/Objects/InnerShipStatus.cs index cab8be1..b1a3f18 100644 --- a/src/Impostor.Server/Net/Inner/Objects/InnerShipStatus.cs +++ b/src/Impostor.Server/Net/Inner/Objects/InnerShipStatus.cs @@ -75,17 +75,16 @@ namespace Impostor.Server.Net.Inner.Objects throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} to wrong destinition, must be host"); } - if (!sender.Character.PlayerInfo.IsImpostor) + var systemType = (SystemTypes)reader.ReadByte(); + if (systemType == SystemTypes.Sabotage && !sender.Character.PlayerInfo.IsImpostor) { - throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} as crewmate"); + throw new ImpostorCheatException($"Client sent {nameof(RpcCalls.RepairSystem)} for {systemType} as crewmate"); } - var systemType = (SystemTypes)reader.ReadByte(); var player = reader.ReadNetObject(_game); var amount = reader.ReadByte(); // TODO: Modify data (?) - break; }