From: Arendian <137322659+Arendian@users.noreply.github.com> Date: Sat, 3 Feb 2024 08:10:50 +0000 (+0100) Subject: Fix sliding bug (#24846) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9e484c4b61352a81bb84e2e1e9e030d13ff1464a;p=space-station-14.git Fix sliding bug (#24846) * Fix slip bug * debug assert * count * DebugAssert --- diff --git a/Content.Shared/Slippery/SlidingSystem.cs b/Content.Shared/Slippery/SlidingSystem.cs index 0af6b203cc..d44ddc883b 100644 --- a/Content.Shared/Slippery/SlidingSystem.cs +++ b/Content.Shared/Slippery/SlidingSystem.cs @@ -59,5 +59,4 @@ public sealed class SlidingSystem : EntitySystem Dirty(uid, component); } - } diff --git a/Content.Shared/Slippery/SlipperySystem.cs b/Content.Shared/Slippery/SlipperySystem.cs index 59a1c208ed..1f602b9b52 100644 --- a/Content.Shared/Slippery/SlipperySystem.cs +++ b/Content.Shared/Slippery/SlipperySystem.cs @@ -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(other); + { + var sliding = EnsureComp(other); + sliding.CollidingEntities.Add(uid); + DebugTools.Assert(_physics.GetContactingEntities(other, physics).Contains(uid)); + } } var playSound = !_statusEffects.HasStatusEffect(other, "KnockedDown");