1
0
Fork 0

Cleanup: Remove questionable syntax in HQ size calculation

pull/7375/head
Johannes E. Krause 2019-03-12 14:55:56 +01:00 committed by PeterN
parent ba3d7122df
commit 234f1007f7
1 changed files with 5 additions and 6 deletions

View File

@ -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);