fix(ModularBot): ram loop prevention, dead-target guards, cleaner logging

- 30-tick cooldown after ghost-stuck/timeout ram exit prevents re-entry loop
- enemy_tracker.update() skips dead bots to prevent same-tick scan resurrection
- TFIL graphics cleared when ramming is active movement
- [config] logs: white base with green-highlighted changes only
- [ram:enter] logs trigger reason and key values on false→true transition
- [death] and [target-invalid] logs retained for diagnostics
This commit is contained in:
2026-09-20 20:44:45 +02:00
parent 1f8574db1d
commit 2cc2a3bd87
30 changed files with 927 additions and 161 deletions
+9 -8
View File
@@ -10,13 +10,14 @@ const WindowSize = 15 # ticks; N+1 frames stored
type
DisplacementGun* = object
posX: array[WindowSize + 1, float]
posY: array[WindowSize + 1, float]
count: int # frames collected so far
head: int # ring-buffer head
lastTick: int # for per-tick cache
cacheSpeed: float
cachePred: GunPrediction
posX: array[WindowSize + 1, float]
posY: array[WindowSize + 1, float]
count: int # frames collected so far
head: int # ring-buffer head
lastTick: int # for per-tick cache
cacheSpeed: float
cachePred: GunPrediction
debugGraphics*: bool
proc predict*(g: var DisplacementGun, state: WorldState, bulletSpeed: float): GunPrediction =
# Per-tick cache: same tick + same speed => same prediction
@@ -62,4 +63,4 @@ proc onResult*(g: var DisplacementGun, e: FeedbackEvent) =
discard # analytical gun — no learning
proc initDisplacementGun*(): DisplacementGun =
DisplacementGun(count: 0, head: 0, lastTick: -1)
DisplacementGun(count: 0, head: 0, lastTick: -1, debugGraphics: false)