fix bug reported by S.D.: throwing a sticking mine into a bouncy pit never ends turn. see also http://hedgewars.org/node/6350
authorsheepluva
Thu, 05 Nov 2015 04:42:22 +0100
changeset 11305 a20f416c91ec
parent 11300 f9fa0d6dc69f
child 11312 966ae86aac75
child 11315 5b2f07e56b93
fix bug reported by S.D.: throwing a sticking mine into a bouncy pit never ends turn. see also http://hedgewars.org/node/6350
hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Wed Nov 04 16:53:43 2015 +0100
+++ b/hedgewars/uGearsHandlersMess.pas	Thu Nov 05 04:42:22 2015 +0100
@@ -1960,7 +1960,7 @@
     if land = 0 then land:= TestCollisionYwithGear(Gear,-2);
     if land = 0 then land:= TestCollisionXwithGear(Gear,-2);
     if land = 0 then land:= TestCollisionYwithGear(Gear, 2);
-    if (land <> 0) and (land and lfBouncy = 0) then
+    if (land <> 0) and ((land and lfBouncy = 0) or ((Gear^.State and gstMoving) = 0)) then
         begin
         if ((Gear^.State and gstMoving) <> 0) or (not isZero(Gear^.dX)) or (not isZero(Gear^.dY)) then
             begin