Mercurial > mm7
diff Vis.cpp @ 227:bcd55744c2f4
Clicking background in MainMenu fix
author | Nomad |
---|---|
date | Sun, 17 Feb 2013 15:09:31 +0200 |
parents | 8646cad02950 |
children | 640a176c030f |
line wrap: on
line diff
--- a/Vis.cpp Sun Feb 17 11:40:10 2013 +0100 +++ b/Vis.cpp Sun Feb 17 15:09:31 2013 +0200 @@ -6,6 +6,7 @@ #include "Actor.h" #include "IndoorCamera.h" #include "Viewport.h" +#include "Log.h" #include "mm7_data.h" //#include "MM7.h" @@ -1482,8 +1483,13 @@ PickBillboards_Mouse(fDepth, fMouseX, fMouseY, &default_list, sprite_filter); if (uCurrentlyLoadedLevelType == LEVEL_Indoor) PickIndoorFaces_Mouse(fDepth, pMouseRay, &default_list, face_filter); + else if (uCurrentlyLoadedLevelType == LEVEL_Outdoor) + PickOutdoorFaces_Mouse(fDepth, pMouseRay, &default_list, face_filter, false); else - PickOutdoorFaces_Mouse(fDepth, pMouseRay, &default_list, face_filter, false); + { + Log::Warning(L"Picking mouse in undefined level"); // picking in main menu is default (buggy) game behavious. should've returned false in Game::PickMouse + return false; + } default_list.create_object_pointers(Vis_SelectionList::All); sort_object_pointers(default_list.object_pointers, 0, default_list.uNumPointers - 1);