Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly cancel unit activities on climate change #2462

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions server/maphand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,12 @@ void climate_change(bool warming, int effect)
update_tile_knowledge(ptile);

// Check the unit activities.
unit_list_iterate(ptile->units, punit)
unit_activities_cancel_all_illegal(ptile);
adjc_iterate(&(wld.map), ptile, n_tile)
{
if (!can_unit_continue_current_activity(punit)) {
unit_activity_handling(punit, ACTIVITY_IDLE);
}
unit_activities_cancel_all_illegal(n_tile);
}
unit_list_iterate_end;
adjc_iterate_end;
} else if (old == tnew) {
// This counts toward a climate change although nothing is changed.
effect--;
Expand Down
Loading