Replicate gear GUI overlays in world wrap
authorWuzzy <Wuzzy2@mail.ru>
Wed, 08 Aug 2018 11:26:33 +0200
changeset 13635 571f8110957e
parent 13634 73c2a669c1fd
child 13636 fc8c8910a281
Replicate gear GUI overlays in world wrap
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Wed Aug 08 11:19:08 2018 +0200
+++ b/hedgewars/uWorld.pas	Wed Aug 08 11:26:33 2018 +0200
@@ -1347,7 +1347,21 @@
     else
         DrawWaves(-1, 50, cWaveHeight div 2, cWaveHeight div 2, 0);
 
-DrawGearsGui;
+if replicateToLeft then
+    begin
+    ShiftWorld(-1);
+    DrawGearsGui();
+    UnshiftWorld();
+    end;
+
+if replicateToRight then
+    begin
+    ShiftWorld(1);
+    DrawGearsGui();
+    UnshiftWorld();
+    end;
+
+DrawGearsGui();
 
 // everything after this ChangeDepth will be drawn outside the screen
 // note: negative parallax gears should last very little for a smooth stereo effect