prevent form-on-wing goals from overriding everything else

this should fix the AI bug that revision 2170 applied to all wings (not just starting wings)
this should also fix the bug where Alpha wing couldn't be issued orders via sexp, even in retail
This commit is contained in:
Goober5000 committed 2008-11-24 00:01:00 +00:00
1 parent 8c521c771b
commit 09d116f667
1 file changed
+4
+4
View File
@@ -1349,6 +1349,10 @@ void ai_add_goal_sub_player(int type, int mode, int submode, char *shipname, ai_
if ( (mode == AI_GOAL_STAY_NEAR_SHIP) || (mode == AI_GOAL_KEEP_SAFE_DISTANCE) )
aigp->priority = PLAYER_PRIORITY_SUPPORT_LOW;
// Goober5000 - same with form-on-wing, since it's a type of staying near
else if ( mode == AI_GOAL_FORM_ON_WING )
aigp->priority = PLAYER_PRIORITY_SUPPORT_LOW;
else if ( aigp->type == AIG_TYPE_PLAYER_WING )
aigp->priority = PLAYER_PRIORITY_WING; // player wing goals not as high as ship goals
else