]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/preferences.cpp
q3map2 -scale: new arg -spawn_ref - sets reference point in spawnpoints
[xonotic/netradiant.git] / radiant / preferences.cpp
index 5302c375fc9c79fac9714956a660848cc6d872ab..a691d812770cdd93c22fc26b8c7d2983a1b77f27 100644 (file)
@@ -461,7 +461,21 @@ void CGameDialog::Init()
   ScanForGames();
   if (mGames.empty())
   {
-    Error("Didn't find any valid game file descriptions, aborting\n");
+         Error("Didn't find any valid game file descriptions, aborting\n");
+  }
+  else
+  {
+         std::list<CGameDescription *>::iterator iGame, iPrevGame;
+         for(iGame=mGames.begin(), iPrevGame = mGames.end(); iGame!=mGames.end(); iPrevGame = iGame, ++iGame)
+         {
+                 if(iPrevGame != mGames.end())
+                         if(strcmp((*iGame)->getRequiredKeyValue("name"), (*iPrevGame)->getRequiredKeyValue("name")) < 0)
+                         {
+                                 CGameDescription *h = *iGame;
+                                 *iGame = *iPrevGame;
+                                 *iPrevGame = h;
+                         }
+         }
   }
  
   CGameDescription* currentGameDescription = 0;