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:
@@ -9,17 +9,18 @@ import gun_harness/gun_interface
|
||||
const MaxSpeed = 8.0 ## TR bot max speed (px/tick)
|
||||
|
||||
type AccelGun* = object
|
||||
prevSpeed: float
|
||||
prevHeading: float
|
||||
prevPrevSpeed: float
|
||||
prevTick: int
|
||||
frames: int ## how many observations we have
|
||||
cachedAccel: float ## accel (px/tick²) cached per tick
|
||||
prevSpeed: float
|
||||
prevHeading: float
|
||||
prevPrevSpeed: float
|
||||
prevTick: int
|
||||
frames: int ## how many observations we have
|
||||
cachedAccel: float ## accel (px/tick²) cached per tick
|
||||
cachedTurnRate: float ## turn rate (deg/tick) cached per tick
|
||||
cachedTick: int
|
||||
cachedTick: int
|
||||
debugGraphics*: bool
|
||||
|
||||
proc initAccelGun*(): AccelGun =
|
||||
AccelGun()
|
||||
AccelGun(debugGraphics: false)
|
||||
|
||||
proc predict*(g: var AccelGun, state: WorldState, bulletSpeed: float): GunPrediction =
|
||||
if bulletSpeed <= 0.0:
|
||||
|
||||
Reference in New Issue
Block a user