CombatState: drop the StatsKnown gate; a stale optimum is re-derived at the next agent Update

Agents update before the entities, so a weapon that came online this tick has evaluated by the next Update;
the Weapon.StatsKnown flag and the gate on it were dead machinery and are removed. The add handler no longer
marks stale itself (a new item's Online subscription does). The refit test fits and removes a dominating gun.

Not yet verified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-16 19:28:29 +02:00
commit 1e9a89e401
3 changed files with 43 additions and 28 deletions

View file

@ -173,13 +173,9 @@ public abstract class Weapon : Behavior, IActivatedBehavior
Tracking = Evaluate(_data.Tracking);
}
// False until the first active tick has evaluated the stats above: before it they all read zero.
public bool StatsKnown { get; private set; }
public override bool Execute(float dt)
{
UpdateStats();
StatsKnown = true;
return true;
}