FS#13445: Fix AI regression in Superdom (Uwe Schächterle)

The fix in e72bae7c3f was subtly wrong due to variable re-use.

Change-Id: Ibad3ad675a70682580dda0e7b2097702aa880524
This commit is contained in:
Solomon Peachy 2024-07-20 08:19:44 -04:00
parent f24271c73c
commit 66b0280bb1
2 changed files with 3 additions and 3 deletions

View file

@ -1951,7 +1951,7 @@ static void computer_allocate(void)
} }
if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100) if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100)
{ {
int i = 0; int cnt = 0;
do do
{ {
if(compres.farms<compres.inds) if(compres.farms<compres.inds)
@ -1974,7 +1974,7 @@ static void computer_allocate(void)
break; break;
} }
} }
} while(compres.cash>=PRICE_FACTORY + 100 && i++ < 3); } while(compres.cash>=PRICE_FACTORY + 100 && cnt++ < 3);
} }
/* AI will buy nukes first if possible */ /* AI will buy nukes first if possible */
if(compres.cash > PRICE_NUKE + PRICE_TANK && superdom_settings.compdiff>=AI_BUILD_NUKES_LEVEL) if(compres.cash > PRICE_NUKE + PRICE_TANK && superdom_settings.compdiff>=AI_BUILD_NUKES_LEVEL)

View file

@ -724,7 +724,7 @@ Pierluigi Vicinanza
Matteo Italia Matteo Italia
Evan Kenny Evan Kenny
Medu Hedan Medu Hedan
Uwe Schächterle
The libmad team The libmad team
The wavpack team The wavpack team
The FFmpeg team The FFmpeg team