FireControl publishes every landed impact on the receiver's Capabilities; Feedback.Cue and DrawAhead.Carried

AbsorbEvent gains AbsorbLayer. Entity.Capabilities, four publish sites in ApplyDirectHit and Detonate (each before the damage it reports), Feedback.Cue, DrawAhead.Carried (Impact delegates), PlayerGraphicsSettings.ScreenShake. Not yet built or tested; tests follow in the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-12 03:58:34 +02:00
commit 8adda0b3de
10 changed files with 116 additions and 22 deletions

View file

@ -57,14 +57,22 @@ public static class DrawAhead
return drawn + (end - drawn) * steer;
}
// The impact cell's centre on the target's drawn pose: the cell at the sim pose, drawn ahead by the target's last
// step velocity and turned by its last step turn for lead seconds, as Position and Rotation draw the entity.
// The impact cell's centre on the target's drawn pose.
public static float3 Impact(Entity target, int2 cell, float lead)
{
var world = target.ToWorldPoint((float2) cell);
return Carried(target, float3(world.x, target.Position.y, world.y), lead);
}
// A world point on the target's sim pose, moved and turned with the target for lead seconds exactly as Position and
// Rotation draw the entity: the one owner of where a point on a hull is drawn, for the drawn round's end and for
// impact presenters.
public static float3 Carried(Entity target, float3 simPoint, float lead)
{
var at = Position(target, lead);
var offset = target.ToWorldPoint((float2) cell) - target.Position.xz;
var offset = float2(simPoint.x - target.Position.x, simPoint.z - target.Position.z);
var turned = mul(offset, CultMath.float2x2.Rotate(Turn(target, lead)));
return float3(at.x + turned.x, at.y, at.z + turned.y);
return float3(at.x + turned.x, at.y + (simPoint.y - target.Position.y), at.z + turned.y);
}
// Whether the drawn flight is over by time: only a published miss ends by the clock. A hit or burst ends on ShotResolved.