Layers: one owner puts orbitals above the ship plane and floaters below; per-hull GridOffset is deleted

GameplaySettings carries ShipLayerHeight 3, OrbitalLayerHeight 15, FloaterLayerHeight 0 (authored in Settings.asset).
Entity.LayerHeight (Ship, OrbitalEntity) is the one offset RideHeight adds; DrawAhead.FloaterHeight is the floater
height ItemPickup and MineInstance draw at. HullData.GridOffset (Key 26) and the pickup/mine/prefab GridOffset fields
are gone with every reader. Fixtures (DrawnPose, FireControl*, ImpactFeedback) take heights from the layer owner;
LayerTests pin each kind's layer. FloatingItemsDrawnSmoke follows. ItemPickup/MineInstance.Bind take the settings from
ZoneRenderer. Builds as one commit with its tests; not compile-verified until the cut's head run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-16 02:35:07 +02:00
commit be7f2b0787
23 changed files with 205 additions and 51 deletions

View file

@ -1974,9 +1974,13 @@ public abstract class Entity
Manoeuvre.Observe(Acceleration, delta, ItemManager.GameplaySettings.SolutionWindow);
}
// Where an unparented entity sits on the field at a planar point: the zone's height there plus the hull's grid offset.
// The step rides at its own time and xz, the presenter at the drawn time and its drawn xz (DrawAhead).
public float RideHeight(float2 planar, double time) => Zone.GetHeight(planar, time) + (ItemManager.GetData(Hull) as HullData).GridOffset;
// The height above the field of the layer this kind of entity rides on (GameplaySettings): ships the ship plane,
// orbital entities the orbital layer above it.
public abstract float LayerHeight { get; }
// Where an unparented entity sits on the field at a planar point: the zone's height there plus the layer this kind of
// entity rides on. The step rides at its own time and xz, the presenter at the drawn time and its drawn xz (DrawAhead).
public float RideHeight(float2 planar, double time) => Zone.GetHeight(planar, time) + LayerHeight;
public float RideHeight(float2 planar) => RideHeight(planar, Zone.ExactTime);