I changed r. Still not a perfect fix.
authorColin Rice (clr_)
Wed, 23 Mar 2011 16:32:24 +0100
changeset 5044 6e8da75e5f5e
parent 5043 2df62e1a6c02
child 5047 6afc64bec952
I changed r. Still not a perfect fix.
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed Mar 23 16:27:24 2011 +0100
+++ b/hedgewars/GSHandlers.inc	Wed Mar 23 16:32:24 2011 +0100
@@ -3752,6 +3752,8 @@
             continue;
 
         //Will if fit through?
+        //set r to be portal distance
+        r := Int2hwFloat(Gear^.Radius +1);
 
         o_x := hwRound(conPortal^.X + conPortal^.dX);
         o_y := hwRound(conPortal^.Y + conPortal^.dY);
@@ -3801,6 +3803,9 @@
         if ((Land[o_y, rr_x] and $FF00) <> 0) then
                 continue;
 
+        //Okay reset r in case something uses it
+        r := Int2hwFloat(iterator^.Radius+Gear^.Radius);
+
         hasdxy := (((iterator^.dX.QWordValue <> 0) or (iterator^.dY.QWordValue <> 0))
                     or ((iterator^.State or gstMoving) = 0));