From 9e484c4b61352a81bb84e2e1e9e030d13ff1464a Mon Sep 17 00:00:00 2001 From: Arendian <137322659+Arendian@users.noreply.github.com> Date: Sat, 3 Feb 2024 09:10:50 +0100 Subject: [PATCH] Fix sliding bug (#24846) * Fix slip bug * debug assert * count * DebugAssert --- Content.Shared/Slippery/SlidingSystem.cs | 1 - Content.Shared/Slippery/SlipperySystem.cs | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) 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"); -- 2.52.0