Cleanup: Remove questionable syntax in HQ size calculation
This commit is contained in:

committed by
PeterN

parent
ba3d7122df
commit
234f1007f7
@@ -158,12 +158,11 @@ void UpdateCompanyHQ(TileIndex tile, uint score)
|
|||||||
{
|
{
|
||||||
if (tile == INVALID_TILE) return;
|
if (tile == INVALID_TILE) return;
|
||||||
|
|
||||||
byte val;
|
byte val = 0;
|
||||||
(val = 0, score < 170) ||
|
if (score >= 170) val++;
|
||||||
(val++, score < 350) ||
|
if (score >= 350) val++;
|
||||||
(val++, score < 520) ||
|
if (score >= 520) val++;
|
||||||
(val++, score < 720) ||
|
if (score >= 720) val++;
|
||||||
(val++, true);
|
|
||||||
|
|
||||||
while (GetCompanyHQSize(tile) < val) {
|
while (GetCompanyHQSize(tile) < val) {
|
||||||
IncreaseCompanyHQSize(tile);
|
IncreaseCompanyHQSize(tile);
|
||||||
|
Reference in New Issue
Block a user