Fix sliding bug (#24846)
* Fix slip bug * debug assert * count * DebugAssert (cherry picked from commit 9e484c4b61352a81bb84e2e1e9e030d13ff1464a)
This commit is contained in:
parent
48bcdcd39b
commit
d6cb163db3
|
|
@ -59,5 +59,4 @@ public sealed class SlidingSystem : EntitySystem
|
|||
|
||||
Dirty(uid, component);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue