Skip to content

Commit ba201c9

Browse files
committed
city: dont update sentiment for empty houses
1 parent fb7b2c5 commit ba201c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/city/sentiment.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ void city_sentiment_update() {
288288
return;
289289
}
290290

291-
if (!b.house_population) {
291+
if (b.house_population <= 0) {
292292
b.sentiment.house_happiness = 10 + default_sentiment;
293293
return;
294294
}
@@ -361,7 +361,7 @@ void city_sentiment_update() {
361361
int total_sentiment = 0;
362362
int total_houses = 0;
363363
buildings_valid_do([&total_houses, &total_sentiment] (building &b) {
364-
if (b.house_size && b.house_population) {
364+
if (b.house_size && b.house_population > 0) {
365365
total_houses++;
366366
total_sentiment += b.sentiment.house_happiness;
367367
}

0 commit comments

Comments
 (0)