# HG changeset patch # User unc0rr # Date 1343219494 -14400 # Node ID bf80e66d61316aebd14f18ca0128888f4a490b5b # Parent c7fff3e61d49a2760fdbefb6c2b11b79553ec5d9 Commit commented out code which I used to debug AI walking diff -r c7fff3e61d49 -r bf80e66d6131 hedgewars/uAIMisc.pas --- a/hedgewars/uAIMisc.pas Wed Jul 25 16:24:30 2012 +0400 +++ b/hedgewars/uAIMisc.pas Wed Jul 25 16:31:34 2012 +0400 @@ -371,13 +371,13 @@ x:= x + dX; y:= y + dY; dY:= dY + cGravityf; -(* - if ((trunc(y) and LAND_HEIGHT_MASK) = 0) and ((trunc(x) and LAND_WIDTH_MASK) = 0) then + +{ if ((trunc(y) and LAND_HEIGHT_MASK) = 0) and ((trunc(x) and LAND_WIDTH_MASK) = 0) then begin LandPixels[trunc(y), trunc(x)]:= v; UpdateLandTexture(trunc(X), 1, trunc(Y), 1, true); - end; -*) + end;} + // consider adding dX/dY calc here for fall damage if TestCollExcludingObjects(trunc(x), trunc(y), cHHRadius) then @@ -624,6 +624,12 @@ end; repeat + {if ((hwRound(Gear^.Y) and LAND_HEIGHT_MASK) = 0) and ((hwRound(Gear^.X) and LAND_WIDTH_MASK) = 0) then + begin + LandPixels[hwRound(Gear^.Y), hwRound(Gear^.X)]:= Gear^.Hedgehog^.Team^.Clan^.Color; + UpdateLandTexture(hwRound(Gear^.X), 1, hwRound(Gear^.Y), 1, true); + end;} + if not (hwRound(Gear^.Y) + cHHRadius < cWaterLine) then exit(false); if (Gear^.State and gstMoving) <> 0 then @@ -681,6 +687,12 @@ GoInfo.JumpType:= jmpNone; tY:= hwRound(Gear^.Y); repeat + {if ((hwRound(Gear^.Y) and LAND_HEIGHT_MASK) = 0) and ((hwRound(Gear^.X) and LAND_WIDTH_MASK) = 0) then + begin + LandPixels[hwRound(Gear^.Y), hwRound(Gear^.X)]:= random($FFFFFFFF);//Gear^.Hedgehog^.Team^.Clan^.Color; + UpdateLandTexture(hwRound(Gear^.X), 1, hwRound(Gear^.Y), 1, true); + end;} + pX:= hwRound(Gear^.X); pY:= hwRound(Gear^.Y); if pY + cHHRadius >= cWaterLine then