hedgewars/uGearsHedgehog.pas
changeset 10895 bce67defd804
parent 10818 f642a28cab0c
child 10942 5d7dd938dedc
equal deleted inserted replaced
10893:b085cf83ab4c 10895:bce67defd804
   893     if (Gear^.dY.isNegative) and (land <> 0) then
   893     if (Gear^.dY.isNegative) and (land <> 0) then
   894         begin
   894         begin
   895         if land and lfBouncy <> 0 then
   895         if land and lfBouncy <> 0 then
   896             begin
   896             begin
   897             doStepFallingGear(Gear);
   897             doStepFallingGear(Gear);
       
   898             Gear^.AdvBounce:= 1;
   898             Gear^.dX:= Gear^.dX * _0_8
   899             Gear^.dX:= Gear^.dX * _0_8
   899             end;
   900             end;
   900         if (land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0) then
   901         if (land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0) then
   901             Gear^.dY:= _0;
   902             Gear^.dY:= _0;
   902         Gear^.State:= Gear^.State and (not gstCollision)
   903         Gear^.State:= Gear^.State and (not gstCollision)
   933     if not Gear^.dY.isNegative then
   934     if not Gear^.dY.isNegative then
   934         begin
   935         begin
   935         if land and lfBouncy <> 0 then
   936         if land and lfBouncy <> 0 then
   936             begin
   937             begin
   937             doStepFallingGear(Gear);
   938             doStepFallingGear(Gear);
       
   939             Gear^.AdvBounce:= 1;
   938             // hogs for some reason have very low friction. slippery little buggers
   940             // hogs for some reason have very low friction. slippery little buggers
   939             Gear^.dX:= Gear^.dX * _0_8
   941             Gear^.dX:= Gear^.dX * _0_8
   940             end;
   942             end;
   941 
   943 
   942         CheckHHDamage(Gear);
   944         CheckHHDamage(Gear);
  1070     if (not Gear^.dY.isNegative) and (TestCollisionYKick(Gear, 1) = 0) then
  1072     if (not Gear^.dY.isNegative) and (TestCollisionYKick(Gear, 1) = 0) then
  1071         begin
  1073         begin
  1072         land:= TestCollisionYwithXYShift(Gear, 0, 1, 1);
  1074         land:= TestCollisionYwithXYShift(Gear, 0, 1, 1);
  1073         if land and lfBouncy <> 0 then
  1075         if land and lfBouncy <> 0 then
  1074             doStepFallingGear(Gear);
  1076             doStepFallingGear(Gear);
       
  1077             Gear^.AdvBounce:= 1;
  1075 
  1078 
  1076         if (land <> 0) and ((land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0)) then
  1079         if (land <> 0) and ((land and lfBouncy = 0) or (Gear^.State and gstCollision <> 0)) then
  1077             begin
  1080             begin
  1078             CheckHHDamage(Gear);
  1081             CheckHHDamage(Gear);
  1079             Gear^.dY:= _0;
  1082             Gear^.dY:= _0;