Do you insert this into OnTickGame method?
Maybe you need to delete an old waypoint after the new one is created.
Checking every second (30 ticks ~ 1 second) could be too much load on server if you have many airgroups. I know that bombers look for targets within 5 km radius automatically. Probably fighters do at least the same. Therefore you do not have to adjust waypoint every second.
|