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:
@@ -7,14 +7,15 @@ import guns/circular
|
||||
import guns/wall_bounce
|
||||
|
||||
type AveragedLeadGun* = object
|
||||
linear: LinearGun
|
||||
circular: CircularGun
|
||||
wallBounce: WallBounceGun
|
||||
cachedTick: int
|
||||
cachedPred: GunPrediction # per-tick cache; ponytail: single cache, extend if multi-power needed
|
||||
linear: LinearGun
|
||||
circular: CircularGun
|
||||
wallBounce: WallBounceGun
|
||||
cachedTick: int
|
||||
cachedPred: GunPrediction # per-tick cache; ponytail: single cache, extend if multi-power needed
|
||||
debugGraphics*: bool
|
||||
|
||||
proc initAveragedLeadGun*(): AveragedLeadGun =
|
||||
AveragedLeadGun(wallBounce: initWallBounceGun())
|
||||
AveragedLeadGun(wallBounce: initWallBounceGun(), debugGraphics: false)
|
||||
|
||||
proc predict*(g: var AveragedLeadGun, state: WorldState, bulletSpeed: float): GunPrediction =
|
||||
if state.tick == g.cachedTick:
|
||||
|
||||
Reference in New Issue
Block a user