More efficient
authornemo
Wed, 27 Jun 2012 09:16:34 -0400 (2012-06-27)
changeset 7310 7f8d62b869bd
parent 7309 5bb4bd846c87
child 7311 06b31a1b333c
child 7312 d1db8aaa8edc
More efficient
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed Jun 27 08:54:03 2012 -0400
+++ b/hedgewars/GSHandlers.inc	Wed Jun 27 09:16:34 2012 -0400
@@ -4416,8 +4416,8 @@
         Gear^.State := Gear^.State or gstCollision;
         Gear^.State := Gear^.State and (not gstMoving);
         
-        if not CalcSlopeTangent(Gear, x, y, tx, ty, 255)
-        or (Land[y, x] and lfBouncy <> 0)
+        if (Land[y, x] and lfBouncy <> 0)
+        or not CalcSlopeTangent(Gear, x, y, tx, ty, 255)
         or (DistanceI(tx,ty) < _12) then // reject shots at too irregular terrain
             begin
             loadNewPortalBall(Gear, true);