diff --git a/Content.Shared/Friction/TileFrictionController.cs b/Content.Shared/Friction/TileFrictionController.cs index 71e269b98c..34e911995c 100644 --- a/Content.Shared/Friction/TileFrictionController.cs +++ b/Content.Shared/Friction/TileFrictionController.cs @@ -2,7 +2,6 @@ using System.Numerics; using Content.Shared.CCVar; using Content.Shared.Gravity; using Content.Shared.Interaction.Components; -using Content.Shared.Interaction.Events; using Content.Shared.Movement.Components; using Content.Shared.Movement.Events; using Content.Shared.Movement.Pulling.Components; @@ -28,6 +27,7 @@ namespace Content.Shared.Friction [Dependency] private readonly SharedMoverController _mover = default!; [Dependency] private readonly SharedMapSystem _map = default!; + [Dependency] private readonly EntityQuery _canMoveInAirQuery = default!; [Dependency] private readonly EntityQuery _frictionQuery = default!; [Dependency] private readonly EntityQuery _pullerQuery = default!; [Dependency] private readonly EntityQuery _pullableQuery = default!; @@ -73,8 +73,8 @@ namespace Content.Shared.Friction float friction; // If we're not touching the ground, don't use tileFriction. - // TODO: Make IsWeightless event-based; we already have grid traversals tracked so just raise events - if (body.BodyStatus == BodyStatus.InAir || _gravity.IsWeightless(uid) || !xform.Coordinates.IsValid(EntityManager)) + if (body.BodyStatus != BodyStatus.OnGround && !_canMoveInAirQuery.HasComp(uid) + || _gravity.IsWeightless(uid) || !xform.Coordinates.IsValid(EntityManager)) friction = xform.GridUid == null || !_gridQuery.HasComp(xform.GridUid) ? _offGridDamping : _airDamping; else friction = _frictionModifier * GetTileFriction(uid, body, xform);