summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-07-20 08:19:44 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-07-20 08:25:05 -0400
commit66b0280bb144528e98f59b3b7cf7aace6723dc9c (patch)
treee800e560126dc91d1998eab4de5bf7fafaa5d318
parentf24271c73c32f0bb9443819de643574891ecd5ba (diff)
downloadrockbox-66b0280bb144528e98f59b3b7cf7aace6723dc9c.tar.gz
rockbox-66b0280bb144528e98f59b3b7cf7aace6723dc9c.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.c4
-rw-r--r--docs/CREDITS2
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)
1951 } 1951 }
1952 if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100) 1952 if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100)
1953 { 1953 {
1954 int i = 0; 1954 int cnt = 0;
1955 do 1955 do
1956 { 1956 {
1957 if(compres.farms<compres.inds) 1957 if(compres.farms<compres.inds)
@@ -1974,7 +1974,7 @@ static void computer_allocate(void)
1974 break; 1974 break;
1975 } 1975 }
1976 } 1976 }
1977 } while(compres.cash>=PRICE_FACTORY + 100 && i++ < 3); 1977 } while(compres.cash>=PRICE_FACTORY + 100 && cnt++ < 3);
1978 } 1978 }
1979 /* AI will buy nukes first if possible */ 1979 /* AI will buy nukes first if possible */
1980 if(compres.cash > PRICE_NUKE + PRICE_TANK && superdom_settings.compdiff>=AI_BUILD_NUKES_LEVEL) 1980 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
724Matteo Italia 724Matteo Italia
725Evan Kenny 725Evan Kenny
726Medu Hedan 726Medu Hedan
727 727Uwe Schächterle
728The libmad team 728The libmad team
729The wavpack team 729The wavpack team
730The FFmpeg team 730The FFmpeg team