hedgewars/GSHandlers.inc
branchwebgl
changeset 8839 caa57115d7ea
parent 8833 c13ebed437cb
child 8847 ff7fbab7cd56
equal deleted inserted replaced
8836:7a474fcc343d 8839:caa57115d7ea
  1019         y := hwRound(Gear^.Y);
  1019         y := hwRound(Gear^.Y);
  1020 
  1020 
  1021         if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] <> 0) then
  1021         if ((y and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y, x] <> 0) then
  1022             inc(Gear^.Damage);
  1022             inc(Gear^.Damage);
  1023         // let's interrupt before a collision to give portals a chance to catch the bullet
  1023         // let's interrupt before a collision to give portals a chance to catch the bullet
  1024         if (Gear^.Damage = 1) and (Gear^.Tag = 0) and not(CheckLandValue(x, y, lfLandMask)) then
  1024         if (Gear^.Damage = 1) and (Gear^.Tag = 0) and (not(CheckLandValue(x, y, lfLandMask))) then
  1025             begin
  1025             begin
  1026             Gear^.Tag := 1;
  1026             Gear^.Tag := 1;
  1027             Gear^.Damage := 0;
  1027             Gear^.Damage := 0;
  1028             Gear^.X := Gear^.X - Gear^.dX;
  1028             Gear^.X := Gear^.X - Gear^.dX;
  1029             Gear^.Y := Gear^.Y - Gear^.dY;
  1029             Gear^.Y := Gear^.Y - Gear^.dY;