Files
WT-Offline/apps/server/tuning
N0VAN0M4LY 9229045042 feat(ground-ai): add exposure perception and single ballistic fire gate
Replace the old foliage-ignoring LOS check and 45 m pre-fire ray with
separate vision/hard-occlusion queries, exposure-integrated spotting, and
a single fire-permission gate for every ground weapon:

- Add perception and fire-gate distance/ballistics/budget parameters to
  tuning/ground-ai.jsonc, validated in ground-ai-tuning.ts and compiled
  into wto_ai_config_common.das.
- Extract wto_ai_combat_types_common.das and add wto_ai_sight_common.das:
  visual checks use smoke occluders, ETF_ALL with aimRay material,
  traceTransparencyRayRIGenNormalized foliage transparency, and vehicle/
  wreck checks; hard-occlusion checks test terrain/structures plus both
  ETF_RI and ETF_RI_PHYS without skipping soft foliage, plus swept
  sphere_cast and wreck/vehicle bounds along the full shot distance.
- Rewrite wto_ai_perceive_common.das with per-target exposure integration
  (fast/normal/far fill times and occlusion decay), 4-point visibility
  sampling with continuous >=2-point LOS tracking for the 800 m 4-second
  window, frozen last-seen coordinates with zeroed velocity on LOS loss,
  and impact-time hit direction (no live offender lookup).
- Record per-shell ballistics profiles (speed, Cx, mass, ballisticCaliber)
  in wto_ai_specs_common.das and sync the currently loaded shell from
  gun.chosenBulletType / bulletSets at runtime.
- Add wto_ai_fire_gate_common.das as the sole ground trigger exit: checks
  visual lock, weapon readiness, distance-tier measured chassis speed
  limits (100/300/800 m), 800 m 4-second window, aim settle, per-frame
  check budget, straight muzzle hard-ray, drag-integrated ballistic arc
  sweep, predicted friendly corridor, and every barrel in the primary
  trigger group. Confirm real shot departure from loaded ammo/readiness,
  remove the pure-launcher stock bypass and add_unit_for_target leak, and
  log exact deny/shot reasons.

Verified root and launcher type checks, isolated 2.61.0.58 build (21
ground AI modules packed), and clean in-engine daScript compilation/load
(wto_ai_runtime.das loaded in 186 ms, 0 compile errors). Live battle
acceptance deferred until the full pipeline is wired.
2026-12-03 17:34:59 +08:00
..