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:
@@ -18,6 +18,8 @@ type
|
||||
enemies*: Table[int, EnemyState]
|
||||
|
||||
proc update*(et: var EnemyTracker, botId: int, x, y, heading, speed, energy: float, tick: int) =
|
||||
if botId in et.enemies and not et.enemies[botId].alive:
|
||||
return # don't resurrect dead bots
|
||||
et.enemies[botId] = EnemyState(id: botId, x: x, y: y, heading: heading,
|
||||
speed: speed, energy: energy,
|
||||
lastSeenTick: tick, alive: true)
|
||||
|
||||
Reference in New Issue
Block a user