Files
WT-Offline/game-ai/ground
N0VAN0M4LY f8bd79042b fix(ground-ai): command the turret servo with the wished angle
The turret command led the current yaw by one frame's traverse step, so
the stock servo crawled: the replay trace measured about 4 deg/s relative
to the hull while the barrel was more than 20 deg off, against a median
stock traverse of 24 deg/s. Bots kept their barrels on the hull and were
mostly denied by aim error at close range.

yawLim and pitchLim now carry the wished angles, clipped to the mount's
yaw arc and to the elevation sector the barrel is in. A full-traverse
command leads the turret by at most 90 deg so it always turns the short
way. Secondary mounts use the same command, and the unused frame time
argument of their aiming path is dropped.

In a lab battle the 90th percentile turret rate rose to 28 deg/s, the
median aim error to target fell from 15-22 deg to 2 deg, and moving
shots rose from under 20% to 49% of main gun shots.
2026-12-06 13:53:52 +08:00
..