Open jaj22 opened 11 months ago
Tested a bit. There's definitely something odd going on with some contacts not showing up in targets
. Haven't pinned it down yet though. Might be some kind of priority system so weaker targets get dropped if there are enough prominent ones, which would be acceptable.
Ok, I think it's fine to strip out the allUnits check. There are two common differences that I noticed:
In retrospect I don't think it's as simple as speeding up the knownEnemies check and reducing the sleep time. Some of the patrol modes do other fairly expensive stuff on each call, notably the static manning. We do also need an additional mode for defensive combat, as there's currently nothing between safe patrol and attacking outside the garrison.
Currently it's possible for patcom AI groups to stay locked in safe mode for an excessively long time after taking fire. Need to look into ways to speed this up without eating performance.