Add IEntity.IsWeightless extension method (#2255)
Checking manually every time wasn't that cool
This commit is contained in:
@@ -14,8 +14,7 @@ namespace Content.Shared.Physics
|
||||
|
||||
public void Move(Vector2 velocityDirection, float speed)
|
||||
{
|
||||
if (ControlledComponent?.Owner.HasComponent<MovementIgnoreGravityComponent>() == false &&
|
||||
IoCManager.Resolve<IPhysicsManager>().IsWeightless(ControlledComponent.Owner.Transform.Coordinates))
|
||||
if (ControlledComponent?.Owner.IsWeightless() ?? false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user