Cut 12.4(b): Detonate replaces Splash and Entity.Absorb
FireControl.Apply now switches on the frozen shot.Fuse: a null fuse keeps 12.3's lane path (ApplyDirectHit), a proximity fuse detonates at arrival with no roll, and a contact or delayed fuse detonates only on a committed hit (ApplyBlastHit), locating P through Lane and the new Reach owner (moved verbatim from Apply's own inline penetration clip; the delayed fuse point reads the identical rule). Step has no damage branch left. Detonate (FireControl.cs) is the one owner of blast damage: candidates by centre-plus-half-diagonal, exact circle/cell overlap shares computed once, every blast's shield decided live per Q12-9 = A (including the host of a contact/delayed blast -- Commit now gates its own shield decision on shot.Fuse == null), armour absorbed per cell, and each item's covered cells pooled into one ItemAbsorb call. Entity.Absorb and FireControl.Splash are deleted; Entity gains ToSchematicPoint/ToWorldPoint for the point conversion Detonate and the delayed fuse point need. Mine.Explode now calls Detonate. Existing Splash/Absorb-era tests across Cut4/5/6/11/123 are rewritten or retargeted to the new public owners; behavioural coverage for the blast model itself lands separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
77be5cf433
commit
7c99909d2b
12 changed files with 441 additions and 251 deletions
|
|
@ -277,10 +277,11 @@ public class EntityInstance : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
// Cut 3 (docs/fire-control-cut.md): DamageSchematic and both HullCollider subscriptions (Splash, Hit)
|
||||
// are deleted -- FireControl decides hits now and applies them through Entity.Absorb/DamageHull
|
||||
// (ServerShared, Cut 12.3; DamageSchematic and ApplyHit are gone), the single owner in place of what
|
||||
// used to exist once per Unity effect. HullColliders no longer publish Hit/Splash at all (R8).
|
||||
// Cut 3 (docs/fire-control-cut.md): DamageSchematic and both HullCollider subscriptions (blast, Hit)
|
||||
// are deleted -- FireControl decides hits now and applies them through Entity.ArmorAbsorb/ItemAbsorb/
|
||||
// DamageHull (ServerShared, Cut 12.3/12.4(b); DamageSchematic, the old per-cell single-lane absorb path
|
||||
// and ApplyHit are all gone), the single owner in place of what used to exist once per Unity effect.
|
||||
// HullColliders no longer publish Hit or a blast event at all (R8).
|
||||
|
||||
LookAtPoint = new GameObject($"{entity.Name} Look Point").transform;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ using CultMath.UnityBridge;
|
|||
|
||||
// Cut 4 (docs/fire-control-cut.md): Hit, Splash, SendHit and SendSplash are deleted -- their last callers
|
||||
// (ConstantLaser, ConstantLightning, ConstantParticleWeapon, HitscanEffect, Mine) are gone too (see those
|
||||
// files and FireControl.Splash). Nothing decides or applies damage through a Unity collider any more (R8):
|
||||
// files and FireControl.Detonate, 12.4(b)'s renamed Splash). Nothing decides or applies damage through a Unity
|
||||
// collider any more (R8):
|
||||
// this component is now purely a physics surface for ship-on-ship collision impulse and Mine's own proximity
|
||||
// arming query (Q7), neither of which is hit detection.
|
||||
public class HullCollider : MonoBehaviour
|
||||
|
|
|
|||
|
|
@ -88,15 +88,16 @@ public class Mine : MonoBehaviour
|
|||
}
|
||||
|
||||
// Cut 4 (docs/fire-control-cut.md, Q7): the arming OverlapSphere above stays -- that is contact detection,
|
||||
// not hit detection. Blast damage is not: it goes through the same FireControl.Splash every splash-shaped
|
||||
// weapon uses now, over the zone's own planar entities, not a Unity collider query. Presentation (ShowHit)
|
||||
// goes with the query it depended on -- nothing here decides who was hit any more, so nothing here can
|
||||
// point a hit effect at them; a future pass can rebuild that off FireControl-published state if the mine
|
||||
// ever ships (R9 keeps it regardless).
|
||||
// not hit detection. Blast damage is not: it goes through the same FireControl.Detonate every blast-shaped
|
||||
// weapon uses now (12.4(b) renamed Splash), over the zone's own planar entities, not a Unity collider
|
||||
// query. Presentation (ShowHit) goes with the query it depended on -- nothing here decides who was hit any
|
||||
// more, so nothing here can point a hit effect at them; a future pass can rebuild that off
|
||||
// FireControl-published state if the mine ever ships (R9 keeps it regardless). F12-6: BlastRange stays a
|
||||
// presentation-side input -- Mine has no catalog weapon record carrying Fuse/BlastRadius.
|
||||
public void Explode()
|
||||
{
|
||||
var position = transform.position;
|
||||
FireControl.Splash(Source.Entity.Zone, position.ToCultMath(), BlastRange, Damage, DamageType);
|
||||
FireControl.Detonate(Source.Entity.Zone, position.ToCultMath().xz, BlastRange, Damage, DamageType);
|
||||
|
||||
var ht = HitEffect.Instantiate<Transform>();
|
||||
ht.position = position;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ using static CultMath.math;
|
|||
// Cut 3 (docs/fire-control-cut.md): the raycast, shield branch and SendHit are deleted -- FireControl already
|
||||
// decided this shot's fate before this object was ever spawned (R8). What is left is pure flight-path
|
||||
// presentation: fly, and disappear at Range or ShotId's resolution, whichever comes first.
|
||||
// Cut 6b, 6.2: the flak-round blast now resolves in the simulation (FireControl.Step calls Splash instead of
|
||||
// Apply at arrival) -- a MonoBehaviour calling Splash would be exactly the authority Cut 3 spent itself
|
||||
// deleting, so the blast-distance/blast-radius fields this object used to carry for that are gone. This
|
||||
// object's job stays fly-and-disappear.
|
||||
// Cut 6b, 6.2 (12.4(b): Apply's own switch on the frozen Fuse decides this now, not Step): the flak-round
|
||||
// blast resolves in the simulation, through FireControl.Detonate -- a MonoBehaviour calling it would be
|
||||
// exactly the authority Cut 3 spent itself deleting, so the blast-distance/blast-radius fields this object
|
||||
// used to carry for that are gone. This object's job stays fly-and-disappear.
|
||||
public class Projectile : MonoBehaviour
|
||||
{
|
||||
public TrailRenderer Trail;
|
||||
|
|
|
|||
Loading…
Reference in a new issue