Sim speed: one SimClock steps the zone; presenters draw ahead by Lead

SimClock (engine-free) turns real frame seconds into whole fixed steps; ActionGameManager.Update feeds it outside the pause gate and Zone.Update(Time.deltaTime) is gone, with IntroCutscene (dead, Unity-driven pose writes). Entity.TurnRate is the sum of the rotation actuators' applied turn per sim second, zeroed each Update; DrawAhead reads it so EntityInstance and ShipInstance draw the latest sim state ahead by Lead. Unverified at this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-08 18:26:02 +02:00
commit c4bd6e153e
11 changed files with 393 additions and 40 deletions

View file

@ -27,6 +27,10 @@ public abstract class Entity
public float3 Position;
public float2 Direction = float2(0,1);
public float2 Velocity;
// Rad per sim second, signed as the step turns Direction: the sum of this step's rotation actuators' applied
// angle over the step. Runtime only, zeroed at the start of Update, so a staged, loaded or wormhole write to
// Direction is never a turn. Read only by DrawAhead.
public float TurnRate;
// Runtime only, never saved; Entity.Update is the one writer of both. Acceleration is the planar velocity change
// across the base update over its delta (thrust, not the drag or gravity a subclass applies before calling it),
@ -1359,6 +1363,7 @@ public abstract class Entity
public virtual void Update(float delta)
{
TurnRate = 0;
if (!_active) return;
var velocityBefore = Velocity;