hedgewars/HHHandlers.inc
changeset 3909 4ba25a3d15af
parent 3907 5b516f0d9957
child 3915 c05855146440
equal deleted inserted replaced
3908:1429c303858d 3909:4ba25a3d15af
   619 isFalling:= (Gear^.dY.isNegative) or not TestCollisionYKick(Gear, 1);
   619 isFalling:= (Gear^.dY.isNegative) or not TestCollisionYKick(Gear, 1);
   620 if isFalling then
   620 if isFalling then
   621    begin
   621    begin
   622    if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then Gear^.dY:= _0;
   622    if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then Gear^.dY:= _0;
   623    Gear^.State:= Gear^.State or gstMoving;
   623    Gear^.State:= Gear^.State or gstMoving;
   624    Gear^.dY:= Gear^.dY + cGravity
   624    if isUnderwater then Gear^.dY:= Gear^.dY + cGravity / _2
   625    end else
   625    else Gear^.dY:= Gear^.dY + cGravity
       
   626    end 
       
   627 else
   626    begin
   628    begin
   627    if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55)
   629    if ((hwAbs(Gear^.dX) + hwAbs(Gear^.dY)) < _0_55)
   628       and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX);
   630       and ((Gear^.State and gstHHJumping) <> 0) then SetLittle(Gear^.dX);
   629 
   631 
   630    if not Gear^.dY.isNegative then
   632    if not Gear^.dY.isNegative then