Skip to content

Commit ddef6ea

Browse files
authored
Merge pull request #4498 from Baezon/clear-goals-fix
Bugfix for not present ships in `clear-goals`
2 parents 2b2333f + a79dd70 commit ddef6ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/parse/sexp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11846,7 +11846,7 @@ void sexp_clear_goals(int n)
1184611846
if (ship_entry)
1184711847
{
1184811848
if (ship_entry->status != ShipStatus::PRESENT)
11849-
return; // ship not around anymore???? then forget it!
11849+
continue; // ship not around anymore???? then forget it!
1185011850

1185111851
ai_clear_ship_goals(&(Ai_info[ship_entry->shipp->ai_index]));
1185211852
continue;
@@ -11856,7 +11856,7 @@ void sexp_clear_goals(int n)
1185611856
if (wingp)
1185711857
{
1185811858
if (wingp->flags[Ship::Wing_Flags::Gone])
11859-
return; // wing not around anymore???? then forget it!
11859+
continue; // wing not around anymore???? then forget it!
1186011860

1186111861
ai_clear_wing_goals(wingp);
1186211862
}

0 commit comments

Comments
 (0)