j127: fix TR_RACK_SHARE round-boundary dwell lock (bot.tick resets, tracker currentSince persists) - share path only

This commit is contained in:
2026-09-26 10:29:45 +02:00
parent 6fd5fe6328
commit 2a3a62a0ab
+7 -2
View File
@@ -1202,8 +1202,13 @@ proc selectSharedGun*(t: var VirtualTracker, share: openArray[float],
# Hold the incumbent through its dwell window (it is already one of the
# admitted share guns). This is what keeps aim convergence; the deficit below
# is NOT advanced on a held tick.
if t.currentGun in guns and (tick - t.currentSince) < ActiveDwellTicks:
# is NOT advanced on a held tick. The `tick >= t.currentSince` guard is
# load-bearing: `bot.tick` RESETS to 0 each round while the tracker (and its
# `currentSince`) persists, so without it a negative elapsed would lock the
# round-1-end gun for every later round. The shipped ranking path keeps its
# own (single-gun-in-practice) dwell untouched.
if t.currentGun in guns and tick >= t.currentSince and
(tick - t.currentSince) < ActiveDwellTicks:
return t.currentGun
if t.shareDeficit.len != share.len: