hedgewars/GSHandlers.inc
changeset 5899 0c3db82e9f4d
parent 5896 9ce1cf4e5a32
child 5913 1791f776b726
equal deleted inserted replaced
5897:0e0fc7e08a3d 5899:0c3db82e9f4d
  4207 
  4207 
  4208     if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] > 255) then
  4208     if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] > 255) then
  4209     begin
  4209     begin
  4210         Gear^.State := Gear^.State or gstCollision;
  4210         Gear^.State := Gear^.State or gstCollision;
  4211         Gear^.State := Gear^.State and not gstMoving;
  4211         Gear^.State := Gear^.State and not gstMoving;
  4212         if not calcSlopeTangent(Gear, x, y, tx, ty, 255)
  4212         if not CalcSlopeTangent(Gear, x, y, tx, ty, 255)
  4213            or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain
  4213            or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain
  4214         begin
  4214         begin
  4215             loadNewPortalBall(Gear, true);
  4215             loadNewPortalBall(Gear, true);
  4216             EXIT;
  4216             EXIT;
  4217         end;
  4217         end;