]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
disable rehydration prediction (#27166)
authordeltanedas <39013340+deltanedas@users.noreply.github.com>
Sat, 20 Apr 2024 13:51:56 +0000 (13:51 +0000)
committerGitHub <noreply@github.com>
Sat, 20 Apr 2024 13:51:56 +0000 (09:51 -0400)
Co-authored-by: deltanedas <@deltanedas:kde.org>
Content.Shared/Chemistry/EntitySystems/RehydratableSystem.cs

index e260280ae450110f21c54931b47ab853204cb327..36ca791290a2c7957c0e74ddef3cde3d1611c35f 100644 (file)
@@ -1,12 +1,14 @@
 using Content.Shared.Chemistry.Components;
 using Content.Shared.FixedPoint;
 using Content.Shared.Popups;
+using Robust.Shared.Network;
 using Robust.Shared.Random;
 
 namespace Content.Shared.Chemistry.EntitySystems;
 
 public sealed class RehydratableSystem : EntitySystem
 {
+    [Dependency] private readonly INetManager _net = default!;
     [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly SharedPopupSystem _popup = default!;
     [Dependency] private readonly SharedSolutionContainerSystem _solutions = default!;
@@ -31,6 +33,9 @@ public sealed class RehydratableSystem : EntitySystem
     // Try not to make this public if you can help it.
     private void Expand(Entity<RehydratableComponent> ent)
     {
+        if (_net.IsClient)
+            return;
+
         var (uid, comp) = ent;
 
         var randomMob = _random.Pick(comp.PossibleSpawns);