Quote:
Originally Posted by LuftWolf
Just to be sure it wasn't the anti-cavitation routine the Mod uses, I tested the stock SubAvoidWeap doctrine, and the same grounding problem exists, so it isn't anything we've done, just something we haven't fixed yet. 
|
Hm.... how to fix this... :hmm: It might be with the subs preception of the layer in the SubAvoidWeap doctrine, or maybe the minalt settings.
In the stock SubAvoidWep doctrine
Code:
; Set Depth Opposite Layer
IF TgtAlt < LAYER THEN {
SETALT ( -100 - RND 50 )
} ELSE {
SETALT ( LAYER - 100 ) ;set depth to 100 ft below layer
} ENDIF
It could be a layer problem. In the FFGatekeeper mission, the seafloor is at 200meters, but an XBT launch will report a layer depth of 300meters. Perhaps the AI is trying to set its evasion depth to an obtainable layer depth.
But in the modded doctrince...
Code:
; Set Depth Opposite Layer
IF TgtAlt < LAYER THEN {
SETALT ( -600 - RND 50 )
} ELSE {
SETALT ( LAYER - 400 )
; set depth to 400 ft below layer
} ENDIF
; Setalt ( ( MinAlt / 0.3048 ) + 100 )
; DebugOut "MinAlt + 100 feet set"
Seems like it could be the same problem. The AI might be using a layer depth that is actually below the seafloor depth. It probably happens when part of the map is above the continental shelf and the other part in the open ocean.... The AI might be using a layer thats inappropriate.
Perhaps another IF statement could remedy the problem...
Code:
IF MinAlt > LAYER
Setalt ( (MinAlt / 0.3048) + 100)
ELSE
IF TgtAlt < LAYER THEN {
SETALT ( -600 - RND 50 )
} ELSE {
SETALT ( LAYER - 400 )
; set depth to 400 ft below layer
} ENDIF
ENDIF
Just guessing for now.