The gun is same to Smog's,its (gun turn angle) = (linear gun need turn angle) * (1+Math.random()*(0.4-Math.abs(e.getVelocity())/10)),just added some random on linear based on enemy's velocity. -- iiley But the random is not use all time,you can see,it random the gun turn,if you go straight for a long time,once Math.random()==0,then next gun need turn angle will be very little,so the next time the random*a little number,the gun followed you.I can hardly to explain it,test it with some bot you will see it muck like a basic linear gun,but only some times with some random shoot. -- iiley
|