Add a tracing message to help debug rope bugs
authorunc0rr
Wed, 06 May 2009 16:56:01 +0000 (2009-05-06)
changeset 2029 51e164a40b41
parent 2028 260a3a2094dc
child 2030 8eaf3d7c54b2
Add a tracing message to help debug rope bugs
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Mon May 04 01:36:39 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Wed May 06 16:56:01 2009 +0000
@@ -739,7 +739,12 @@
 
 HedgehogChAngle(HHGear);
 
-if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then SetLittle(HHGear^.dX);
+if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then
+	begin
+	{$IFDEF DEBUGFILE}if HHGear^.dX.QWordValue > 1 then AddFileLog('Stopping hedgehog after rope attack due to wall collision');{$ENDIF}
+	SetLittle(HHGear^.dX);
+	end;
+
 if HHGear^.dY.isNegative and TestCollisionYwithGear(HHGear, -1) then HHGear^.dY:= _0;
 HHGear^.X:= HHGear^.X + HHGear^.dX;
 HHGear^.Y:= HHGear^.Y + HHGear^.dY;