Skip to content

Commit a3691ed

Browse files
authored
Merge pull request scp-fs2open#7043 from Goober5000/disable_form_on_wing_at_mission_start
add ai_profiles flag to disable form-on-wing at mission start
2 parents 973bd55 + 337b040 commit a3691ed

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

code/ai/ai_flags.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ namespace AI {
180180
Freespace_1_missile_behavior,
181181
ETS_uses_power_output,
182182
ETS_energy_same_regardless_of_system_presence,
183+
Dont_form_on_wing_at_mission_start,
183184

184185
NUM_VALUES
185186
};

code/ai/ai_profiles.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,8 @@ void parse_ai_profiles_tbl(const char *filename)
719719

720720
set_flag(profile, "$ETS energy same regardless of system presence:", AI::Profile_Flags::ETS_energy_same_regardless_of_system_presence);
721721

722+
set_flag(profile, "$don't issue form-on-wing goals at mission start:", AI::Profile_Flags::Dont_form_on_wing_at_mission_start);
723+
722724

723725
// end of options ----------------------------------------
724726

code/ai/aigoals.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,11 @@ void ai_maybe_add_form_goal(wing* wingp)
197197
return;
198198
}
199199

200+
// we may simply not want the mission to do this
201+
if (The_mission.ai_profile->flags[AI::Profile_Flags::Dont_form_on_wing_at_mission_start]) {
202+
return;
203+
}
204+
200205
int j;
201206

202207
// iterate through the ship_index list of this wing and check for orders. We will do

0 commit comments

Comments
 (0)