hedgewars/HHHandlers.inc
changeset 958 92bb9fa046f9
parent 952 9dd48265e0b9
child 979 edb8f208c1d9
--- a/hedgewars/HHHandlers.inc	Wed May 28 17:58:41 2008 +0000
+++ b/hedgewars/HHHandlers.inc	Wed May 28 18:40:42 2008 +0000
@@ -373,10 +373,15 @@
 end;
 
 procedure HedgehogChAngle(Gear: PGear);
+var da: LongWord;
 begin
-if ((Gear^.Message and gm_Up) <> 0) and (Gear^.Angle > CurMinAngle) then dec(Gear^.Angle)
+with PHedgehog(Gear^.Hedgehog)^ do
+	if (Ammo^[CurSlot, CurAmmo].AmmoType = amRope)
+	and ((Gear^.State and (gstMoving or gstHHJumping)) = gstMoving) then da:= 2 else da:= 1;
+
+if ((Gear^.Message and gm_Up) <> 0) and (Gear^.Angle - da >= CurMinAngle) then dec(Gear^.Angle, da)
 else
-if ((Gear^.Message and gm_Down) <> 0) and (Gear^.Angle < CurMaxAngle) then inc(Gear^.Angle);
+if ((Gear^.Message and gm_Down) <> 0) and (Gear^.Angle + da <= CurMaxAngle) then inc(Gear^.Angle, da);
 end;
 
 procedure doStepHedgehog(Gear: PGear); forward;