Fix bug with hedgehog getting into ground while throwing rope (http://hedgewars.org/node/1722)
authorunc0rr
Sun, 23 Aug 2009 12:01:55 +0000
changeset 2329 1cfb7d184ee1
parent 2328 e74f2db28b21
child 2330 ba46dcda3676
Fix bug with hedgehog getting into ground while throwing rope (http://hedgewars.org/node/1722)
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed Aug 19 18:55:40 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Sun Aug 23 12:01:55 2009 +0000
@@ -953,6 +953,8 @@
 if (HHGear^.State and gstMoving) <> 0 then
 	begin
 	if TestCollisionXwithGear(HHGear, hwSign(HHGear^.dX)) then SetLittle(HHGear^.dX);
+	if HHGear^.dY.isNegative and TestCollisionYwithGear(HHGear, -1) then HHGear^.dY:= _0;
+	
 	HHGear^.X:= HHGear^.X + HHGear^.dX;
 	Gear^.X:= Gear^.X + HHGear^.dX;