diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-20 08:19:44 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-20 08:25:05 -0400 |
commit | 66b0280bb144528e98f59b3b7cf7aace6723dc9c (patch) | |
tree | e800e560126dc91d1998eab4de5bf7fafaa5d318 | |
parent | f24271c73c32f0bb9443819de643574891ecd5ba (diff) | |
download | rockbox-66b0280bb1.tar.gz rockbox-66b0280bb1.zip |
FS#13445: Fix AI regression in Superdom (Uwe Schächterle)
The fix in e72bae7c3ff was subtly wrong due to variable re-use.
Change-Id: Ibad3ad675a70682580dda0e7b2097702aa880524
-rw-r--r-- | apps/plugins/superdom.c | 4 | ||||
-rw-r--r-- | docs/CREDITS | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index 2af290bc23..10373e1cc9 100644 --- a/apps/plugins/superdom.c +++ b/apps/plugins/superdom.c @@ -1951,7 +1951,7 @@ static void computer_allocate(void) } if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100) { - int i = 0; + int cnt = 0; do { if(compres.farms<compres.inds) @@ -1974,7 +1974,7 @@ static void computer_allocate(void) break; } } - } while(compres.cash>=PRICE_FACTORY + 100 && i++ < 3); + } while(compres.cash>=PRICE_FACTORY + 100 && cnt++ < 3); } /* AI will buy nukes first if possible */ if(compres.cash > PRICE_NUKE + PRICE_TANK && superdom_settings.compdiff>=AI_BUILD_NUKES_LEVEL) diff --git a/docs/CREDITS b/docs/CREDITS index a5997dcd9d..cdbb119db9 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -724,7 +724,7 @@ Pierluigi Vicinanza Matteo Italia Evan Kenny Medu Hedan - +Uwe Schächterle The libmad team The wavpack team The FFmpeg team |