hedgewars/HHHandlers.inc
changeset 5851 e6151aca2d7c
parent 5838 180ffae2c039
child 5954 2aead3f940b0
child 5955 07f6fa51ea58
equal deleted inserted replaced
5850:f07e2a5e6ad0 5851:e6151aca2d7c
   772 isFalling:= (Gear^.dY.isNegative) or not TestCollisionYKick(Gear, 1);
   772 isFalling:= (Gear^.dY.isNegative) or not TestCollisionYKick(Gear, 1);
   773 if isFalling then
   773 if isFalling then
   774    begin
   774    begin
   775    if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then Gear^.dY:= _0;
   775    if (Gear^.dY.isNegative) and TestCollisionYKick(Gear, -1) then Gear^.dY:= _0;
   776    Gear^.State:= Gear^.State or gstMoving;
   776    Gear^.State:= Gear^.State or gstMoving;
       
   777    if (CurrentHedgehog^.Gear = Gear)
       
   778         and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then 
       
   779         begin
       
   780         FollowGear:= Gear;
       
   781         end;
   777    if isUnderwater then Gear^.dY:= Gear^.dY + cGravity / _2
   782    if isUnderwater then Gear^.dY:= Gear^.dY + cGravity / _2
   778    else
   783    else
   779        begin
   784        begin
   780        Gear^.dY:= Gear^.dY + cGravity;
   785        Gear^.dY:= Gear^.dY + cGravity;
   781 // this set of circumstances could be less complex if jumping was more clearly identified
   786 // this set of circumstances could be less complex if jumping was more clearly identified