]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
set registered cvar consistently regardless of game mode
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Aug 2010 06:27:17 +0000 (06:27 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 12 Aug 2010 06:27:17 +0000 (06:27 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10386 d7cf8633-e32d-0410-b094-e92efae38249

fs.c

diff --git a/fs.c b/fs.c
index 8086a34b988ddc9947e6712f3ab84b3d75b40c7b..a5834035e67841f96694caacf7c2fb26b3421000 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1354,18 +1354,29 @@ void FS_Rescan (void)
                unlink (va("%s/qconsole.log", fs_gamedir));
 
        // look for the pop.lmp file and set registered to true if it is found
-       if ((gamemode == GAME_NORMAL || gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE) && !FS_FileExists("gfx/pop.lmp"))
+       if (FS_FileExists("gfx/pop.lmp"))
+               Cvar_Set ("registered", "1");
+       switch(gamemode)
        {
-               if (fs_modified)
-                       Con_Print("Playing shareware version, with modification.\nwarning: most mods require full quake data.\n");
+       case GAME_NORMAL:
+       case GAME_HIPNOTIC:
+       case GAME_ROGUE:
+               if (!registered.integer)
+               {
+                       if (fs_modified)
+                               Con_Print("Playing shareware version, with modification.\nwarning: most mods require full quake data.\n");
+                       else
+                               Con_Print("Playing shareware version.\n");
+               }
                else
-                       Con_Print("Playing shareware version.\n");
-       }
-       else
-       {
-               Cvar_Set ("registered", "1");
-               if (gamemode == GAME_NORMAL || gamemode == GAME_HIPNOTIC || gamemode == GAME_ROGUE)
                        Con_Print("Playing registered version.\n");
+               break;
+       case GAME_STEELSTORM:
+               if (registered.integer)
+                       Con_Print("Playing registered version.\n");
+               else
+                       Con_Print("Playing shareware version.\n");
+               break;
        }
 
        // unload all wads so that future queries will return the new data