Fix rope disappearing bug
authorunc0rr
Sat, 16 May 2009 20:54:43 +0000
changeset 2068 9d683de175d7
parent 2067 7524a783bd8c
child 2069 f7fad4ad4455
Fix rope disappearing bug
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Sat May 16 19:03:08 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sat May 16 20:54:43 2009 +0000
@@ -979,15 +979,17 @@
 CheckCollision(Gear);
 
 if (Gear^.State and gstCollision) <> 0 then
-	begin
-	Gear^.doStep:= @doStepRopeWork;
-	with HHGear^ do State:= State and not (gstAttacking or gstHHHJump);
+	if Gear^.Elasticity < _10 then
+		Gear^.Elasticity:= _10000
+	else
+		begin
+		Gear^.doStep:= @doStepRopeWork;
+		with HHGear^ do State:= State and not (gstAttacking or gstHHHJump);
 
-	RemoveFromAmmo;
-	
-	if Gear^.Elasticity < _10 then
-		Gear^.Elasticity:= _10000;
-	end;
+		RemoveFromAmmo;
+		
+		exit
+		end;
 
 if (Gear^.Elasticity > Gear^.Friction)
 or ((Gear^.Message and gm_Attack) = 0)