hedgewars/GSHandlers.inc
changeset 803 3f73901a350a
parent 801 0323e5c7ee54
child 809 b33c2def1576
equal deleted inserted replaced
802:ed5450a89b96 803:3f73901a350a
   104 Gear^.Y:= Gear^.Y + Gear^.dY;
   104 Gear^.Y:= Gear^.Y + Gear^.dY;
   105 CheckGearDrowning(Gear);
   105 CheckGearDrowning(Gear);
   106 if (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) < _0_0002) and
   106 if (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) < _0_0002) and
   107    (not isFalling) then Gear^.State:= Gear^.State and not gstMoving
   107    (not isFalling) then Gear^.State:= Gear^.State and not gstMoving
   108                    else Gear^.State:= Gear^.State or      gstMoving
   108                    else Gear^.State:= Gear^.State or      gstMoving
   109 end;
       
   110 
       
   111 ////////////////////////////////////////////////////////////////////////////////
       
   112 procedure doStepCloud(Gear: PGear);
       
   113 begin
       
   114 Gear^.X:= Gear^.X + cWindSpeed * 200 + Gear^.dX;
       
   115 if hwRound(Gear^.Y) > -160 then Gear^.dY:= Gear^.dY - _1div50000
       
   116                            else Gear^.dY:= Gear^.dY + _1div50000;
       
   117 Gear^.Y:= Gear^.Y + Gear^.dY;
       
   118 if hwRound(Gear^.X) < -cScreenWidth - 256 then Gear^.X:= int2hwFloat(cScreenWidth + 2048) else
       
   119 if hwRound(Gear^.X) > cScreenWidth + 2048 then Gear^.X:= int2hwFloat(-cScreenWidth - 256)
       
   120 end;
   109 end;
   121 
   110 
   122 ////////////////////////////////////////////////////////////////////////////////
   111 ////////////////////////////////////////////////////////////////////////////////
   123 procedure doStepBomb(Gear: PGear);
   112 procedure doStepBomb(Gear: PGear);
   124 var i: LongInt;
   113 var i: LongInt;