equal
deleted
inserted
replaced
393 if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then |
393 if Ammoz[CurAmmoType].Ammo.Propz and ammoprop_NeedTarget <> 0 then |
394 begin |
394 begin |
395 newGear^.Target.X:= TargetPoint.X; |
395 newGear^.Target.X:= TargetPoint.X; |
396 newGear^.Target.Y:= TargetPoint.Y |
396 newGear^.Target.Y:= TargetPoint.Y |
397 end; |
397 end; |
|
398 if newGear <> nil then newGear^.CollisionMask:= $FF7F; |
398 |
399 |
399 // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement |
400 // Clear FollowGear if using on a rope/parachute/saucer etc so focus stays with the hog's movement |
400 if altUse then |
401 if altUse then |
401 FollowGear:= nil; |
402 FollowGear:= nil; |
402 |
403 |
705 |
706 |
706 PrevdX:= hwSign(Gear^.dX); |
707 PrevdX:= hwSign(Gear^.dX); |
707 if (Gear^.Message and gmLeft )<>0 then |
708 if (Gear^.Message and gmLeft )<>0 then |
708 Gear^.dX:= -cLittle else |
709 Gear^.dX:= -cLittle else |
709 if (Gear^.Message and gmRight )<>0 then |
710 if (Gear^.Message and gmRight )<>0 then |
710 Gear^.dX:= cLittle else exit; |
711 Gear^.dX:= cLittle |
711 |
712 else exit; |
712 if (Gear^.Message and (gmLeft or gmRight)) <> 0 then |
713 |
713 begin |
714 StepSoundTimer:= cHHStepTicks; |
714 StepSoundTimer:= cHHStepTicks; |
|
715 end; |
|
716 |
715 |
717 GHStepTicks:= cHHStepTicks; |
716 GHStepTicks:= cHHStepTicks; |
718 if PrevdX <> hwSign(Gear^.dX) then |
717 if PrevdX <> hwSign(Gear^.dX) then |
719 begin |
718 begin |
720 FollowGear:= Gear; |
719 FollowGear:= Gear; |
835 Gear^.dY:= _0; |
834 Gear^.dY:= _0; |
836 Gear^.State:= Gear^.State or gstMoving; |
835 Gear^.State:= Gear^.State or gstMoving; |
837 if (CurrentHedgehog^.Gear = Gear) |
836 if (CurrentHedgehog^.Gear = Gear) |
838 and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then |
837 and (hwSqr(Gear^.dX) + hwSqr(Gear^.dY) > _0_003) then |
839 begin |
838 begin |
|
839 // TODO: why so aggressive at setting FollowGear when falling? |
840 FollowGear:= Gear; |
840 FollowGear:= Gear; |
841 end; |
841 end; |
842 if isUnderwater then |
842 if isUnderwater then |
843 Gear^.dY:= Gear^.dY + cGravity / _2 |
843 Gear^.dY:= Gear^.dY + cGravity / _2 |
844 else |
844 else |