Commit fb7b2c5 1 parent da37ea3 commit fb7b2c5 Copy full SHA for fb7b2c5
File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ void city_t::house_population_update_room() {
90
90
if (b->house_population > b->house_highest_population )
91
91
b->house_highest_population = b->house_population ;
92
92
93
- } else if (b->house_population ) {
93
+ } else if (b->house_population > 0 ) {
94
94
// not connected to Rome, mark people for eviction
95
95
b->house_population_room = -b->house_population ;
96
96
}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ void city_t::houses_reset_demands() {
36
36
void city_t::house_service_update_health () {
37
37
OZZY_PROFILER_SECTION (" Game/Update/House Service Update Health" );
38
38
buildings_valid_do ([] (building &b) {
39
- if (!b.house_size ) {
39
+ if (!b.house_size || b. house_population <= 0 ) {
40
40
return ;
41
41
}
42
42
@@ -55,7 +55,7 @@ void city_t::house_service_update_health() {
55
55
int chance_death = std::max (100 - b.common_health , 10 );
56
56
int randm = (random_short () % 99 + 1 );
57
57
bool has_death_today = (randm < chance_death);
58
- if (has_death_today) {
58
+ if (has_death_today && b. house_population > 0 ) {
59
59
--b.house_population ;
60
60
}
61
61
}
You can’t perform that action at this time.
0 commit comments