hedgewars/uGears.pas
changeset 6081 537bbd5c1a62
parent 5977 0b1bfdd95310
child 6096 a00dbbf49d6c
equal deleted inserted replaced
6080:ce02ddfe8aa1 6081:537bbd5c1a62
  1488                     Gear^.State:= Gear^.State or gstMoving;
  1488                     Gear^.State:= Gear^.State or gstMoving;
  1489 
  1489 
  1490                     if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
  1490                     if TestCollisionXwithGear(Gear, hwSign(Gear^.dX)) then
  1491                         begin
  1491                         begin
  1492                         if not (TestCollisionXwithXYShift(Gear, _0, -3, hwSign(Gear^.dX))
  1492                         if not (TestCollisionXwithXYShift(Gear, _0, -3, hwSign(Gear^.dX))
  1493                             or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1;
  1493                             or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1;
  1494                         if not (TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX))
  1494                         if not (TestCollisionXwithXYShift(Gear, _0, -2, hwSign(Gear^.dX))
  1495                             or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1;
  1495                             or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1;
  1496                         if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX))
  1496                         if not (TestCollisionXwithXYShift(Gear, _0, -1, hwSign(Gear^.dX))
  1497                             or TestCollisionYwithGear(Gear, -1)) then Gear^.Y:= Gear^.Y - _1;
  1497                             or (TestCollisionYwithGear(Gear, -1) <> 0)) then Gear^.Y:= Gear^.Y - _1;
  1498                         end;
  1498                         end;
  1499 
  1499 
  1500                     if (Ammo^.Kind <> gtFlame) or ((Ammo^.State and gsttmpFlag) = 0) then FollowGear:= Gear
  1500                     if (Ammo^.Kind <> gtFlame) or ((Ammo^.State and gsttmpFlag) = 0) then FollowGear:= Gear
  1501                     end;
  1501                     end;
  1502         end
  1502         end