hedgewars/GSHandlers.inc
changeset 1919 390d3f685a80
parent 1918 975d5061712f
child 1920 302835d554d8
equal deleted inserted replaced
1918:975d5061712f 1919:390d3f685a80
    26 if cWaterLine < hwRound(Gear^.Y) + Gear^.Radius then
    26 if cWaterLine < hwRound(Gear^.Y) + Gear^.Radius then
    27     begin
    27     begin
    28     skipSpeed:= _0_25;  // was 0.36 - couldn't manage baseball bat. Tiy's build is 0.36...
    28     skipSpeed:= _0_25;  // was 0.36 - couldn't manage baseball bat. Tiy's build is 0.36...
    29     skipAngle:= _1 + _0_9;  // these should perhaps also be constants, once work out what proper values are
    29     skipAngle:= _1 + _0_9;  // these should perhaps also be constants, once work out what proper values are
    30     skipDecay:= _0_87;  // this could perhaps be a tiny bit higher.
    30     skipDecay:= _0_87;  // this could perhaps be a tiny bit higher.
    31     if  ((Gear^.dX*Gear^.dX+Gear^.dY*Gear^.dY) > skipSpeed) and
    31     if  (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > skipSpeed) and
    32         (hwAbs(Gear^.dX/Gear^.dY) > skipAngle) then
    32         (hwAbs(Gear^.dX) > skipAngle * hwAbs(Gear^.dY) then
    33        begin
    33        begin
    34        Gear^.dY.isNegative:= true;
    34        Gear^.dY.isNegative:= true;
    35        Gear^.dY:=Gear^.dY*skipDecay;
    35        Gear^.dY:= Gear^.dY * skipDecay;
    36        Gear^.dX:=Gear^.dX*skipDecay;
    36        Gear^.dX:= Gear^.dX * skipDecay;
    37        CheckGearDrowning:= false
    37        CheckGearDrowning:= false
    38        end
    38        end
    39     else
    39     else
    40         begin
    40         begin
    41         CheckGearDrowning:= true;
    41         CheckGearDrowning:= true;