]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix sliding bug (#24846)
authorArendian <137322659+Arendian@users.noreply.github.com>
Sat, 3 Feb 2024 08:10:50 +0000 (09:10 +0100)
committerGitHub <noreply@github.com>
Sat, 3 Feb 2024 08:10:50 +0000 (19:10 +1100)
* Fix slip bug

* debug assert

* count

* DebugAssert

Content.Shared/Slippery/SlidingSystem.cs
Content.Shared/Slippery/SlipperySystem.cs

index 0af6b203cc55b66e5b39954d9bc2cc5d5e6abb94..d44ddc883b9d7105a4012923c063c212ff5ca836 100644 (file)
@@ -59,5 +59,4 @@ public sealed class SlidingSystem : EntitySystem
 
         Dirty(uid, component);
     }
-
 }
index 59a1c208ed2ea9dfa17a3a565797ce5c0fb8debc..1f602b9b52bb6caa2e7d564933d23f09fec3ea03 100644 (file)
@@ -9,6 +9,7 @@ using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Systems;
+using Robust.Shared.Utility;
 
 namespace Content.Shared.Slippery;
 
@@ -75,7 +76,11 @@ public sealed class SlipperySystem : EntitySystem
             _physics.SetLinearVelocity(other, physics.LinearVelocity * component.LaunchForwardsMultiplier, body: physics);
 
             if (component.SuperSlippery)
-                EnsureComp<SlidingComponent>(other);
+            {
+                var sliding = EnsureComp<SlidingComponent>(other);
+                sliding.CollidingEntities.Add(uid);
+                DebugTools.Assert(_physics.GetContactingEntities(other, physics).Contains(uid));
+            }
         }
 
         var playSound = !_statusEffects.HasStatusEffect(other, "KnockedDown");