Skip to content

Commit

Permalink
Fixed issue with the site_game_data::change_population_type_populatio…
Browse files Browse the repository at this point in the history
…n() function
  • Loading branch information
Andrettin committed Jan 31, 2022
1 parent 6316fb9 commit 3c3119e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/site_game_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ void site_game_data::change_population_type_population(const population_type *po
continue;
}

this->change_population_unit_population(population_unit, change);
this->change_population_unit_population(population_unit, population_unit_change);

remaining_change -= population_unit_change;

Expand Down Expand Up @@ -820,7 +820,7 @@ void site_game_data::do_population_promotion()
}

const int64_t promotion_quantity = population_unit->calculate_promotion_quantity(available_capacity);
const bool removed_pop = promotion_quantity == population_unit->get_population();
const bool removed_pop = promotion_quantity >= population_unit->get_population();

this->change_population_unit_to_type(population_unit->get_key(), promotion_type, promotion_quantity);

Expand Down

0 comments on commit 3c3119e

Please sign in to comment.