]> git.deb.at Git - rhonda/impostor.git/commitdiff
Cleanup previous commit
authorminiduikboot <mini@duikbo.at>
Thu, 26 Oct 2023 22:00:21 +0000 (00:00 +0200)
committerminiduikboot <mini@duikbo.at>
Thu, 26 Oct 2023 22:00:21 +0000 (00:00 +0200)
src/Impostor.Server/Net/Inner/Objects/InnerPlayerControl.cs
src/Impostor.Server/Net/State/Game.cs

index 2eb8b0d92f1d1dfe490778e032d6934ff1dfdde1..bd56462d4841e0c8b05a4fa9d99e2770848a189c 100644 (file)
@@ -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;
index 46ad67cf7131cbb36f368e17db1f089d0bbb6bac..8b7219f71ae300fdff17e961c36cf40a11b3afa0 100644 (file)
@@ -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;
             }
         }
     }