From 845f6c3aadf3196559821a73eae76806b0030229 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 29 Oct 2026 08:33:26 +0100 Subject: [PATCH] No drag below top speed: ships coast and orbits no longer decay; drag acts only on the excess over the hull's top speed Carries out aetheria-gravity:ruling:no-drag-below-top-speed (2026-10-14), which the code never implemented (operator, 2026-10-29). The VelocityLimit clamp still caps speed; the soft cap is the ruling's remaining half. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/ServerShared/Ship.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/ServerShared/Ship.cs b/Assets/Scripts/ServerShared/Ship.cs index e151ed3d7..b4a6ff93e 100644 --- a/Assets/Scripts/ServerShared/Ship.cs +++ b/Assets/Scripts/ServerShared/Ship.cs @@ -164,9 +164,14 @@ public class Ship : Entity public override void Update(float delta) { + // No drag below top speed: ships coast and orbits do not decay; drag bleeds off only the excess over the hull's top + // speed (aetheria-gravity:ruling:no-drag-below-top-speed). The VelocityLimit clamp still caps it, so the excess is + // what this step's forces added; a soft cap, where surfing the beat is a temporary boost, is the ruling's other half. var velocityMagnitude = length(Velocity); - if(velocityMagnitude > .01f) - Velocity = normalize(Velocity) * decay(velocityMagnitude, HullData.Drag * ItemManager.GameplaySettings.DragScale, delta); + var topSpeed = float.PositiveInfinity; + foreach (var limit in GetBehaviors()) topSpeed = min(topSpeed, limit.Limit); + if (velocityMagnitude > topSpeed) + Velocity = normalize(Velocity) * (topSpeed + decay(velocityMagnitude - topSpeed, HullData.Drag * ItemManager.GameplaySettings.DragScale, delta)); Position.xz += Velocity * delta;