Lock warning fix 1: publish paints in a zone phase, one lock-indicator curve, strength and progress-term pins

- Zone.Update publishes every entity's paints before any entity updates (Entity.PublishPaints), so a broken lock clears on the same tick whatever the entity order.
- ActionGameManager.ApplyLockProgress is the one lock-indicator curve, called by the outgoing and the incoming indicator.
- LockWarningTests drive the real LockWeapon through Zone.Update; pins on strength across 0.15..1.0, the direction and sensor progress terms, and both entity orders.

Not yet run: this commit's tests have not been built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-10 23:29:27 +02:00
commit 1c5c602054
4 changed files with 199 additions and 109 deletions

View file

@ -793,6 +793,16 @@ public abstract class Entity
_incomingLocks.Clear();
}
// Zone.Update runs this on every entity before any entity updates, so a paint made during tick N is published
// at the start of tick N+1 whatever order the emitter and this ship update in; a paint that stops is gone
// one tick later for every ordering.
internal void PublishPaints()
{
_incomingLocks.Clear();
_incomingLocks.AddRange(_paintInbox);
_paintInbox.Clear();
}
// The only caller is LockWeapon.Execute; strength is the emitter's own Lock at that paint.
internal void ReceivePaint(float3 emitterPosition, EquippableItemData emitterClass, float strength)
{
@ -1393,10 +1403,6 @@ public abstract class Entity
TurnRate = 0;
if (!_active) return;
_incomingLocks.Clear();
_incomingLocks.AddRange(_paintInbox);
_paintInbox.Clear();
var velocityBefore = Velocity;
LimitClamp = float2(0, 0);
var hullData = ItemManager.GetData(Hull) as HullData;