Skip to content

Commit a06da31

Browse files
authored
Merge pull request #7114 from Goober5000/quick_anchor_fix
quick fix to arrival anchor bug
2 parents fb229cc + 77c7569 commit a06da31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/ship/ship.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9271,7 +9271,7 @@ void ship_cleanup(int shipnum, int cleanup_mode)
92719271
if (The_mission.ai_profile->flags[AI::Profile_Flags::Cancel_future_waves_of_any_wing_launched_from_an_exited_ship]) {
92729272
for (int child_wingnum = 0; child_wingnum < Num_wings; ++child_wingnum) {
92739273
auto child_wingp = &Wings[child_wingnum];
9274-
if (child_wingp->arrival_location == ArrivalLocation::FROM_DOCK_BAY && child_wingp->arrival_anchor == shipnum) {
9274+
if (child_wingp->arrival_location == ArrivalLocation::FROM_DOCK_BAY && Parse_names.in_bounds(child_wingp->arrival_anchor) && !stricmp(Parse_names[child_wingp->arrival_anchor].c_str(), shipp->ship_name)) {
92759275
// prevent any more waves from arriving by marking this as the last wave
92769276
child_wingp->num_waves = child_wingp->current_wave;
92779277

0 commit comments

Comments
 (0)