I poked around a bit more at this squadsight flanking issue to see if it was something that could be fixable.
I've come to the conclusion that isn't fixable via upk edits, as the relevant flanking code is a native function.
XGUnit defines the following functions:
These are all only called from the native code via a function defined in XGUnitNativeBase.
The game maintains the var privatewrite array<XGUnit> m_arrFlankingUnits in XGUnitNativeBase, but it is set in the native code.
Ultimately the code that checks for flanking must be drawing only from units that are in sight, and not considering units that are in squadsight. The most likely array is the XGUnitNativeBase array : m_arrEnemiesSeenBy.
However, it's also possible that the flanking code calls the native function XGUnitNativeBase.CallGetTargetsInRange. This function has as one of its parameters int iRangeType which is of type:
If this function is used to generate the list of enemies to test flanking conditions against, and if it can be found in the native code, then changing the iRangeType parameter from 2 (eRange_Sight) to 3 (eRange_Squadsight) would allow units with squadsight to flank.