]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
Properly name game configuration files, fixes #43 and other issues related to stringc...
authorChristian Ratzenhofer <christian_ratzenhofer@yahoo.de>
Thu, 3 May 2012 22:18:30 +0000 (00:18 +0200)
committerChristian Ratzenhofer <christian_ratzenhofer@yahoo.de>
Thu, 3 May 2012 22:18:30 +0000 (00:18 +0200)
radiant/preferences.cpp

index 430c751fac7136b18ea300825b1817e697102d6f..7759ed5f0bb2a58735ea5a0797af7abb3f3759d7 100644 (file)
@@ -3411,8 +3411,40 @@ void CGameInstall::Run() {
        if(CheckFile(gameFilePath) != PATH_DIRECTORY) {
                radCreateDirectory(gameFilePath);
        }
-       gameFilePath += m_strName.GetBuffer();
-       gameFilePath += ".game";
+
+       switch ( m_availGame[ m_nComboSelect ] ) {
+       case GAME_Q2:
+               gameFilePath += "q2.game";
+               break;
+       case GAME_Q3:
+               gameFilePath += "q3.game";
+               break;
+       case GAME_URT:
+               gameFilePath += "urt.game";
+               break;
+       case GAME_UFOAI:
+               gameFilePath += "ufoai.game";
+               break;
+       case GAME_Q2W:
+               gameFilePath += "q2w.game";
+               break;
+       case GAME_WARSOW:
+               gameFilePath += "warsow.game";
+               break;
+       case GAME_NEXUIZ:
+               gameFilePath += "nexuiz.game";
+               break;
+       case GAME_TREMULOUS:
+               gameFilePath += "tremulous.game";
+               break;
+       case GAME_JA:
+               gameFilePath += "ja.game";
+               break;
+       case GAME_REACTION:
+               gameFilePath += "reaction.game";
+               break;
+       }
+
        Sys_Printf( "game file: %s\n", gameFilePath.GetBuffer() );
 
        FILE * fg = fopen( gameFilePath.GetBuffer(), "w" );