hedgewars/uAIAmmoTests.pas
branchwebgl
changeset 9136 78f087fd3e5b
parent 9127 e350500c4edb
child 9160 fc46e75f6b72
equal deleted inserted replaced
9133:a269fe7090a0 9136:78f087fd3e5b
   242                 until (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 22)
   242                 until (Abs(Targ.Point.X - trunc(x)) + Abs(Targ.Point.Y - trunc(y)) < 22)
   243                     or (x < 0)
   243                     or (x < 0)
   244                     or (y < 0)
   244                     or (y < 0)
   245                     or (trunc(x) > LAND_WIDTH)
   245                     or (trunc(x) > LAND_WIDTH)
   246                     or (trunc(y) > LAND_HEIGHT)
   246                     or (trunc(y) > LAND_HEIGHT)
   247                     or not TestCollExcludingObjects(trunc(x), trunc(y), 5)
   247                     or (not TestCollExcludingObjects(trunc(x), trunc(y), 5))
   248                     or (timer = 0)
   248                     or (timer = 0)
   249                 end;
   249                 end;
   250             EX:= trunc(x);
   250             EX:= trunc(x);
   251             EY:= trunc(y);
   251             EY:= trunc(y);
   252             // Try to prevent AI from thinking firing into water will cause a drowning
   252             // Try to prevent AI from thinking firing into water will cause a drowning