hedgewars/GSHandlers.inc
changeset 8727 43b1487f02f6
parent 8679 a8bdcf7bec20
child 8730 b39f433f8ab4
equal deleted inserted replaced
8726:ef2abeafa7cb 8727:43b1487f02f6
  1018         y := hwRound(Gear^.Y);
  1018         y := hwRound(Gear^.Y);
  1019         
  1019         
  1020         if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] <> 0) then
  1020         if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] <> 0) then
  1021             inc(Gear^.Damage);
  1021             inc(Gear^.Damage);
  1022         // let's interrupt before a collision to give portals a chance to catch the bullet
  1022         // let's interrupt before a collision to give portals a chance to catch the bullet
  1023         if (Gear^.Damage = 1) and (Gear^.Tag = 0) and (Land[y, x] > 255) then
  1023         if (Gear^.Damage = 1) and (Gear^.Tag = 0) and not(CheckLandValue(x, y, $FF00)) then
  1024             begin
  1024             begin
  1025             Gear^.Tag := 1;
  1025             Gear^.Tag := 1;
  1026             Gear^.Damage := 0;
  1026             Gear^.Damage := 0;
  1027             Gear^.X := Gear^.X - Gear^.dX;
  1027             Gear^.X := Gear^.X - Gear^.dX;
  1028             Gear^.Y := Gear^.Y - Gear^.dY;
  1028             Gear^.Y := Gear^.Y - Gear^.dY;