Start the cooldown at a burst's first unrefused round; refused charged weapons never charge
A burst whose every round is refused fires nothing and leaves no cooldown: the cooldown moves from Trigger to the first round Execute does not refuse, and CanFire holds a triggered burst that has not yet fired. ChargedWeapon.Activate asks FireControl before it starts charging, so a refused weapon pays no charge heat or audio. InReach is deleted: Designated carries the one range test and the lock gate, and Combat reads it. GuidedProjectile answers Resolve while alive and keeps its binding through the shot's flight time, so a faded round still shows the simulation's detonation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d00d158007
commit
136fddf15a
7 changed files with 113 additions and 27 deletions
|
|
@ -19,6 +19,9 @@ public class GuidedProjectileManager : InstantWeaponEffectManager
|
|||
zone.ShotResolved.Where(o => o.ShotId == shotId)
|
||||
.Subscribe(o => p.Resolve(o.Result == ShotResult.Hit || o.Result == ShotResult.Burst, o.HasBurstPoint ? At(o) : (Vector3?) null))
|
||||
.AddTo(bindings);
|
||||
// The binding outlives a fade-out until the shot's own arrival (the moment the simulation resolves it), plus a
|
||||
// second of margin; a shot no longer pending has nothing left to resolve.
|
||||
p.BindingLifetime = zone.TryGetShot(shotId, out var shot) ? max(0f, shot.ArrivalTime - zone.Time) + 1f : 0f;
|
||||
p.Binding = bindings; // replaces, and so disposes, any binding the projectile already had
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue