Ship contact is a simulation rule: Zone steps Contacts, Unity physics writes no Entity

Contacts.Step exchanges normal velocity between touching hull discs (PostCollisionVelocity moved verbatim
from ShieldManager) and publishes Zone.Contacted; ShieldManager presents it; HullCollider.OnCollisionEnter
and ShieldManager's ship-on-ship branch are deleted. Not yet built or tested (verification follows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-12 05:46:32 +02:00
commit 7392bc8fe1
6 changed files with 363 additions and 26 deletions

View file

@ -54,6 +54,8 @@ public class Zone
public List<PendingShot> PendingShots = new List<PendingShot>();
public Subject<ShotOutcome> ShotCommitted = new Subject<ShotOutcome>();
public Subject<ShotOutcome> ShotResolved = new Subject<ShotOutcome>();
// Contacts.Step publishes each hull-on-hull contact it resolves; presentations are the only readers.
public Subject<ContactEvent> Contacted = new Subject<ContactEvent>();
private int _nextShotId;
public int NextShotId() => ++_nextShotId;
@ -241,6 +243,10 @@ public class Zone
StepMines(deltaTime);
StepClouds(deltaTime);
// Hull contact (cut sim-contact): after every entity has moved and the mines and clouds have taken
// their toll, so only hulls still in the zone touch, and before shots resolve against the result.
Contacts.Step(this);
// Cut 3: after every entity has had its chance to fire this tick, age and resolve the shots that
// firing queued. A shot fired this tick with a flight time shorter than CommitHorizon commits and
// resolves in this same call.