Cleanup: Remove questionable syntax in HQ size calculation

pull/82/head
Johannes E. Krause 5 years ago committed by PeterN
parent ba3d7122df
commit 234f1007f7

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

Loading…
Cancel
Save