]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Combat mode prediction thing (#36620)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Wed, 16 Apr 2025 10:27:10 +0000 (20:27 +1000)
committerGitHub <noreply@github.com>
Wed, 16 Apr 2025 10:27:10 +0000 (12:27 +0200)
Was written before predicted popups prolly

Content.Shared/CombatMode/SharedCombatModeSystem.cs

index 5eed8ee2423c794f1676b67f6f345df63a93ec3c..bb3ab712eb4c6496204ab780bf88cf068c836280 100644 (file)
@@ -46,14 +46,8 @@ public abstract class SharedCombatModeSystem : EntitySystem
         args.Handled = true;
         SetInCombatMode(uid, !component.IsInCombatMode, component);
 
-        // TODO better handling of predicted pop-ups.
-        // This probably breaks if the client has prediction disabled.
-
-        if (!_netMan.IsClient || !Timing.IsFirstTimePredicted)
-            return;
-
         var msg = component.IsInCombatMode ? "action-popup-combat-enabled" : "action-popup-combat-disabled";
-        _popup.PopupEntity(Loc.GetString(msg), args.Performer, args.Performer);
+        _popup.PopupClient(Loc.GetString(msg), args.Performer, args.Performer);
     }
 
     public void SetCanDisarm(EntityUid entity, bool canDisarm, CombatModeComponent? component = null)