Ver Fonte

game mode filterfix
GameMode::findGameModes now only returns the *active* ones.
SubScene::load() checks against either that, or if it's selected

AzaezelX há 7 meses atrás
pai
commit
18750047fb
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 1
      Engine/source/T3D/SubScene.cpp
  2. 2 1
      Engine/source/T3D/gameMode.cpp

+ 1 - 1
Engine/source/T3D/SubScene.cpp

@@ -348,7 +348,7 @@ void SubScene::load()
       return;
 
    GameMode::findGameModes(mGameModesNames, &mGameModesList);
-   if ((String(mGameModesNames).isNotEmpty() && mGameModesList.size() == 0) || !evaluateCondition())
+   if (!isSelected() && (String(mGameModesNames).isNotEmpty() && mGameModesList.size() == 0) || !evaluateCondition())
    {
       mLoaded = false;
       return;

+ 2 - 1
Engine/source/T3D/gameMode.cpp

@@ -101,7 +101,8 @@ void GameMode::findGameModes(const char* gameModeList, Vector<GameMode*> *outGam
       GameMode* gm;
       if (Sim::findObject(gameModeNames[i].c_str(), gm))
       {
-         outGameModes->push_back(gm);
+         if (gm->isActive() || gm->isAlwaysActive())
+            outGameModes->push_back(gm);
       }
    }
 }