Open chrishayesmu opened 2 years ago
My current speculation is that this has to do with XGUnitNativeBase.IsFlankedByLoc
, and how it handles situations where a unit is flanked on the X or Y axis but the positions aren't quite the same between the two units. I'm doing some native debugging to try and figure out the math it uses. Here are a couple of observations I've made with a console command that calls IsFlankedByLoc
:
Target pos: -913.00, 249.01, 250.15
Unit pos (flank not working): -1008.999512, 238.998413, 259.147491
Unit pos (flank working): -816.998291, 249.013000, 259.147034
Target pos: 437.00, 1679.00, 74.15
Unit pos (flank not working): 430.999908, 1583.000000, 83.149902
Unit pos (flank working): 437.000793, 1775.000000, 83.149788
This seems to occur when:
For some reason, this tends to only occur on one side of the enemy; moving the unit to the other side (but still meeting the requirements above) will result in the expected flank. Moving one tile away from the enemy so that you're no longer immediately adjacent will also result in flanking.