# HG changeset patch # User unC0Rr # Date 1566909459 -7200 # Node ID 381c828865e72b84f04001ed31c9bda93aa1e5bb # Parent fcdb6e3a9d36d69e356e91aa469b5de55fea1aac Fix a couple more uses of uninitialized variables diff -r fcdb6e3a9d36 -r 381c828865e7 hedgewars/uAIAmmoTests.pas --- a/hedgewars/uAIAmmoTests.pas Tue Aug 27 08:41:48 2019 +0200 +++ b/hedgewars/uAIAmmoTests.pas Tue Aug 27 14:37:39 2019 +0200 @@ -1367,10 +1367,13 @@ cake.Radius:= 7; cake.CollisionMask:= lfNotCurHogCrate; cake.Hedgehog:= Me^.Hedgehog; + cake.Kind:= gtCake; // check left direction cake.Angle:= 3; cake.dX.isNegative:= true; + cake.dX.QWordValue:= 0; + cake.dY:= _0; cake.X:= Me^.X - _3; cake.Y:= Me^.Y; checkCakeWalk(Me, @cake, ap); diff -r fcdb6e3a9d36 -r 381c828865e7 hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Tue Aug 27 08:41:48 2019 +0200 +++ b/hedgewars/uAIMisc.pas Tue Aug 27 14:37:39 2019 +0200 @@ -57,7 +57,7 @@ TBonuses = record activity: boolean; - Count : Longword; + Count : LongInt; ar : array[0..Pred(MAXBONUS)] of TBonus; end; @@ -799,7 +799,7 @@ begin dead:= true; Targets.reset:= true; - if gdX < 0.035 then + if abs(gdX) < 0.035 then begin subrate:= RealRateExplosion(Me, round(pX), round(pY), 61, afErasesLand or afTrackFall); if abs(subrate) > 2000 then inc(Rate,subrate div 1024)