using System.Linq;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
+using Content.Shared.Gravity;
using Content.Shared.Physics;
using Content.Shared.Physics.Pull;
using Robust.Shared.Physics;
[Dependency] private readonly SharedBroadphaseSystem _broadphase = default!;
[Dependency] private readonly FixtureSystem _fixtures = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
+ [Dependency] private readonly SharedGravitySystem _gravity = default!;
private const string ThrowingFixture = "throw-fixture";
}
}
- EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent {User = thrownItemComponent.Thrower}, true);
+ EntityManager.EventBus.RaiseLocalEvent(uid, new StopThrowEvent { User = thrownItemComponent.Thrower }, true);
EntityManager.RemoveComponent<ThrownItemComponent>(uid);
}
public void LandComponent(EntityUid uid, ThrownItemComponent thrownItem, PhysicsComponent physics, bool playSound)
{
- if (thrownItem.Landed || thrownItem.Deleted || Deleted(uid))
+ if (thrownItem.Landed || thrownItem.Deleted || _gravity.IsWeightless(uid) || Deleted(uid))
return;
thrownItem.Landed = true;