hedgewars/uGearsHedgehog.pas
changeset 9499 bbc093acb91e
parent 9477 0463f747e839
child 9501 dc3d658de350
equal deleted inserted replaced
9497:1813b682c6bd 9499:bbc093acb91e
   846 if isFalling then
   846 if isFalling then
   847     begin
   847     begin
   848     if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then
   848     if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then
   849         Gear^.dY:= _0;
   849         Gear^.dY:= _0;
   850     Gear^.State:= Gear^.State or gstMoving;
   850     Gear^.State:= Gear^.State or gstMoving;
   851     if (CurrentHedgehog^.Gear = Gear)
   851     if (CurrentHedgehog^.Gear = Gear) and (CurrentHedgehog^.Gear^.State and gstDriven <> 0) and
   852         and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
   852        (not CurrentTeam^.ExtDriven) and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then
   853         begin
   853         begin
   854         // TODO: why so aggressive at setting FollowGear when falling?
   854         // TODO: why so aggressive at setting FollowGear when falling?
       
   855         // because hog was being yanked out of frame by other stuff when doing a complicated jump/chute/saucer/roping.
       
   856         // added a couple more conditions to make it a bit less aggressive, at cost of possibly spectator failing to follow a maneuver
   855         FollowGear:= Gear;
   857         FollowGear:= Gear;
   856         end;
   858         end;
   857     if isUnderwater then
   859     if isUnderwater then
   858        Gear^.dY:= Gear^.dY + cGravity / _2
   860        Gear^.dY:= Gear^.dY + cGravity / _2
   859     else
   861     else