From: miniduikboot Date: Thu, 26 Oct 2023 22:00:21 +0000 (+0200) Subject: Cleanup previous commit X-Git-Tag: v1.9.0~14^2~12 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=b038d0e09830ec6a141f8fca08f35c3217fbc985;p=rhonda%2Fimpostor.git Cleanup previous commit --- diff --git a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs index 2eb8b0d..bd56462 100644 --- a/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs +++ b/src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs @@ -666,7 +666,8 @@ namespace Impostor.Server.Net.Inner.Objects IsMurdering = target; // Check if host authority mode is on - if (_game.IsHostModded()) { + if (_game.IsHostAuthoritive()) + { // Pass the RPC on unharmed, the client will handle it return true; } @@ -675,7 +676,7 @@ namespace Impostor.Server.Net.Inner.Objects if (target != null) { - MurderPlayerAsync(target); + await MurderPlayerAsync(target); } return false; diff --git a/src/Impostor.Server/Net/State/Game.cs b/src/Impostor.Server/Net/State/Game.cs index 46ad67c..8b7219f 100644 --- a/src/Impostor.Server/Net/State/Game.cs +++ b/src/Impostor.Server/Net/State/Game.cs @@ -146,12 +146,15 @@ namespace Impostor.Server.Net.State .Where(c => c != null && c.IsConnected)!; } - internal bool IsHostModded() + internal bool IsHostAuthoritive() { - if (Host == null) { + if (Host == null) + { return false; - } else { - return Host.Client.GameVersion.Revision >= 25; + } + else + { + return Host.Client.GameVersion.HasDisableServerAuthorityFlag; } } }