diff options
-rw-r--r-- | src/object_cmd.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp index 9f03813df..0b18dd4b1 100644 --- a/src/object_cmd.cpp +++ b/src/object_cmd.cpp @@ -158,12 +158,11 @@ void UpdateCompanyHQ(TileIndex tile, uint score) { if (tile == INVALID_TILE) return; - byte val; - (val = 0, score < 170) || - (val++, score < 350) || - (val++, score < 520) || - (val++, score < 720) || - (val++, true); + byte val = 0; + if (score >= 170) val++; + if (score >= 350) val++; + if (score >= 520) val++; + if (score >= 720) val++; while (GetCompanyHQSize(tile) < val) { IncreaseCompanyHQSize(tile); |