hedgewars/uVisualGearsHandlers.pas
changeset 11873 60c8bb8bc1d7
parent 11827 4600dcb9db4f
child 12317 83131d0e747b
--- a/hedgewars/uVisualGearsHandlers.pas	Mon Oct 03 14:10:25 2016 -0400
+++ b/hedgewars/uVisualGearsHandlers.pas	Fri Oct 14 22:52:04 2016 +0200
@@ -162,8 +162,14 @@
             X:= X - cScreenSpace;
             moved:= true
             end;
-            // if round(Y) < (LAND_HEIGHT - 1024 - 75) then Y:= Y + 25.0; // For if flag is set for flakes rising upwards?
-        if (Gear^.Layer = 2) and (round(Y) - 400 > LAND_HEIGHT) and (cGravityf >= 0) then
+
+        if round(Y) < (LAND_HEIGHT - 1024 - 75) then
+            begin
+            X:= cLeftScreenBorder + random(cScreenSpace);
+            Y:= Y+(1024 + 200 + random(50));
+            moved:= true
+            end
+        else if (Gear^.Layer = 2) and (round(Y) - 400 > LAND_HEIGHT) and (cGravityf >= 0) then
             begin
             X:= cLeftScreenBorder + random(cScreenSpace);
             Y:= Y-(1024 + 400 + random(50)); // TODO - configure in theme (jellies for example could use limited range)