Fix selectionbox not honoring anaglyph mode 3d distortion
authorsapier <Sapier at GMX dot net>
Sun, 25 Aug 2013 13:41:16 +0000 (15:41 +0200)
committerKahrl <kahrl@gmx.net>
Wed, 4 Sep 2013 22:57:09 +0000 (00:57 +0200)
src/game.cpp

index d3d49d7b431142f4b8aa41ce5028a2db438930f8..5d836578110f92face3d4425eade6c968b483941 100644 (file)
@@ -3199,6 +3199,11 @@ void the_game(
 
                                smgr->drawAll(); // 'smgr->drawAll();' may go here
 
+                               driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
+
+                               if (show_hud)
+                                       hud.drawSelectionBoxes(hilightboxes);
+
 
                                //Right eye...
                                irr::core::vector3df rightEye;
@@ -3223,6 +3228,11 @@ void the_game(
 
                                smgr->drawAll(); // 'smgr->drawAll();' may go here
 
+                               driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
+
+                               if (show_hud)
+                                       hud.drawSelectionBoxes(hilightboxes);
+
 
                                //driver->endScene();
 
@@ -3251,9 +3261,11 @@ void the_game(
                driver->setMaterial(m);
 
                driver->setTransform(video::ETS_WORLD, core::IdentityMatrix);
-
-               if (show_hud)
+               if((!g_settings->getBool("anaglyph")) && (show_hud))
+               {
                        hud.drawSelectionBoxes(hilightboxes);
+               }
+
                /*
                        Wielded tool
                */