# HG changeset patch
# User nemo
# Date 1340802994 14400
# Node ID 7f8d62b869bdbf36e3a6a8b854821245d81615ba
# Parent  5bb4bd846c87a472913c1bce9ca1adc81b91d610
More efficient

diff -r 5bb4bd846c87 -r 7f8d62b869bd 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);