hedgewars/GSHandlers.inc
changeset 8992 5b0be812dcdb
parent 8990 e64a1a851b69
child 8993 839ce342474a
equal deleted inserted replaced
8991:82e3a6e5d51b 8992:5b0be812dcdb
   176     if Gear^.dX.Round > 2 then
   176     if Gear^.dX.Round > 2 then
   177         Gear^.dX.QWordValue:= 8589934592;
   177         Gear^.dX.QWordValue:= 8589934592;
   178     if Gear^.dY.Round > 2 then
   178     if Gear^.dY.Round > 2 then
   179         Gear^.dY.QWordValue:= 8589934592;
   179         Gear^.dY.QWordValue:= 8589934592;
   180 
   180 
       
   181     if (Gear^.State and gstSubmersible <> 0) and (hwRound(Gear^.Y) > cWaterLine) then
       
   182         begin
       
   183         Gear^.dX:= Gear^.dX * _0_999;
       
   184         Gear^.dY:= Gear^.dY * _0_999
       
   185         end;
       
   186 
   181     Gear^.State := Gear^.State and (not gstCollision);
   187     Gear^.State := Gear^.State and (not gstCollision);
   182     collV := 0;
   188     collV := 0;
   183     collH := 0;
   189     collH := 0;
   184     tdX := Gear^.dX;
   190     tdX := Gear^.dX;
   185     tdY := Gear^.dY;
   191     tdY := Gear^.dY;
       
   192 
   186 
   193 
   187 
   194 
   188 // might need some testing/adjustments - just to avoid projectiles to fly forever (accelerated by wind/skips)
   195 // might need some testing/adjustments - just to avoid projectiles to fly forever (accelerated by wind/skips)
   189     if (hwRound(Gear^.X) < min(LAND_WIDTH div -2, -2048))
   196     if (hwRound(Gear^.X) < min(LAND_WIDTH div -2, -2048))
   190     or (hwRound(Gear^.X) > max(LAND_WIDTH * 3 div 2, 6144)) then
   197     or (hwRound(Gear^.X) > max(LAND_WIDTH * 3 div 2, 6144)) then