Fix nullspace floating (#13621)

This commit is contained in:
Leon Friedrich
2023-01-21 12:51:12 +13:00
committed by GitHub
parent b20b4b11cc
commit a0b6e052a1

View File

@@ -28,6 +28,12 @@ public abstract class SharedFloatingVisualizerSystem : EntitySystem
protected bool CanFloat(EntityUid uid, FloatingVisualsComponent component, TransformComponent? transform = null)
{
if (!Resolve(uid, ref transform))
return false;
if (transform.MapID == MapId.Nullspace)
return false;
component.CanFloat = GravitySystem.IsWeightless(uid, xform: transform);
Dirty(component);
return component.CanFloat;