# HG changeset patch # User nemo # Date 1342088372 14400 # Node ID ac9ce7f033df4a80483f1b68fdd215f077432c95 # Parent 16ae2e1c9005ed9115bf76f620f96c25a9cbc204 Reduce number of walk bonuses further, doubt even 128 are needed. Fix count reset. diff -r 16ae2e1c9005 -r ac9ce7f033df hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Wed Jul 11 22:18:43 2012 -0400 +++ b/hedgewars/uAIMisc.pas Thu Jul 12 06:19:32 2012 -0400 @@ -83,7 +83,7 @@ walkbonuses: record Count: Longword; - ar: array[0..Pred(MAXBONUS div 4)] of TBonus; // don't use too many + ar: array[0..Pred(MAXBONUS div 8)] of TBonus; // don't use too many end; implementation @@ -148,7 +148,7 @@ procedure AddWalkBonus(x, y: LongInt; r: Longword; s: LongInt); inline; begin -if(walkbonuses.Count < MAXBONUS div 4) then +if(walkbonuses.Count < MAXBONUS div 8) then begin walkbonuses.ar[walkbonuses.Count].x:= x; walkbonuses.ar[walkbonuses.Count].y:= y; @@ -210,10 +210,12 @@ with KnownExplosion do AddBonus(X, Y, Radius + 10, -Radius); if isAfterAttack then + begin for i:= 0 to Pred(walkbonuses.Count) do with walkbonuses.ar[i] do AddBonus(X, Y, Radius, Score); -walkbonuses.Count:= 0 + walkbonuses.Count:= 0 + end; end; procedure AwareOfExplosion(x, y, r: LongInt); inline;