]> 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)
committerRudolf Polzer <divVerent@alientrap.org>
Fri, 20 Aug 2010 12:11:56 +0000 (14:11 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10386 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=e2a01a8fbc4ae33827a76531919ab72badf12b76

fs.c

diff --git a/fs.c b/fs.c
index 13407aa7507d81a2dc590f1ce6c622f315cbdefd..fa42c7331c01882fa7031cd5a010c4a714a51569 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