# HG changeset patch # User nemo # Date 1268956566 0 # Node ID 94afd5fc573825e9d47c202ba4136e8d5f545558 # Parent 1d3302ac371fa344e3e593984918908dac5bc8a3 Adjust increment since there is no timer diff -r 1d3302ac371f -r 94afd5fc5738 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Thu Mar 18 23:25:32 2010 +0000 +++ b/hedgewars/uAIAmmoTests.pas Thu Mar 18 23:56:06 2010 +0000 @@ -161,7 +161,6 @@ end; function TestMolotov(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt; -const tDelta = 24; var Vx, Vy, r: hwFloat; Score, EX, EY, valueResult: LongInt; TestTime: Longword; @@ -190,9 +189,9 @@ TestTime:= 0; ap.ExplR:= 0; repeat - inc(TestTime, 1000); - Vx:= (int2hwFloat(Targ.X) - Me^.X) / int2hwFloat(TestTime + tDelta); - Vy:= cGravity * ((TestTime + tDelta) div 2) - (int2hwFloat(Targ.Y) - Me^.Y) / int2hwFloat(TestTime + tDelta); + inc(TestTime, 300); + Vx:= (int2hwFloat(Targ.X) - Me^.X) / int2hwFloat(TestTime); + Vy:= cGravity * (TestTime div 2) - (int2hwFloat(Targ.Y) - Me^.Y) / int2hwFloat(TestTime); r:= Distance(Vx, Vy); if not (r > _1) then begin @@ -208,7 +207,7 @@ valueResult:= Score end; end -until (TestTime = 4000); +until (TestTime > 4250); TestMolotov:= valueResult end;