Several related bugs and problems concerning AI units firing hand held weapons with automatic fire:
When the distance between the shooter and the player is less than 100 meters, then the ai is unable to compensate for recoil, and all but the first one or two shots in a burst always misses the target. One of the consequences of this is that AI machine gunners in the player's squad are almost never accurate.
However, when the distance between the shooter and the player is greater than 100 meters, then the ai is able to compensate for recoil, and most shots in the whole burst are fairly accurate.
Additionally, if the shooter is more than 100 meters from the player, or the shooter is more than 237 meters from its target, then the shooter's rate of fire drops dramatically.
Additionally, the cadence of shots is faulty. The spacing between the first two shots, is usually much smaller than between subsequent ones. Somtimes the spacing between the first two shots is zero.
Video Demonstrating the problems:
https://youtu.be/g8V4T9oxMMQ
[There is occasional stuttering in the video, please ignore that].
Mission demonstrating the problems is attached below:
[updated repo mission so the cadence readout still works after switching SHOOTER's weapons]