]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.c
Implement clipgroup extension from DarkplacesRM
[xonotic/darkplaces.git] / common.c
index c45814fc5f5e1a3ac50fe2cff4b5e38549a67a66..4a05368b5b85d5e7a462cbe40cd823d5d569329a 100644 (file)
--- a/common.c
+++ b/common.c
@@ -28,8 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "quakedef.h"
 #include "utf8lib.h"
 
-cvar_t registered = {0, "registered","0", "indicates if this is running registered quake (whether gfx/pop.lmp was found)"};
-cvar_t cmdline = {0, "cmdline","0", "contains commandline the engine was launched with"};
+cvar_t registered = {CVAR_CLIENT | CVAR_SERVER, "registered","0", "indicates if this is running registered quake (whether gfx/pop.lmp was found)"};
+cvar_t cmdline = {CVAR_CLIENT | CVAR_SERVER, "cmdline","0", "contains commandline the engine was launched with"};
 
 char com_token[MAX_INPUTLINE];
 int com_argc;
@@ -1645,7 +1645,7 @@ void COM_Init_Commands (void)
                        break;
        }
        com_cmdline[n] = 0;
-       Cvar_Set ("cmdline", com_cmdline);
+       Cvar_SetQuick(&cmdline, com_cmdline);
 }
 
 /*
@@ -2039,7 +2039,7 @@ char *InfoString_GetValue(const char *buffer, const char *key, char *value, size
                                (buffer[pos+1 + keylength] == 0 ||
                                 buffer[pos+1 + keylength] == '\\'))
                {
-                       pos += 1 + keylength;           // Skip \key
+                       pos += 1 + (int)keylength;           // Skip \key
                        if (buffer[pos] == '\\') pos++; // Skip \ before value.
                        for (j = 0;buffer[pos+j] && buffer[pos+j] != '\\' && j < (int)valuelength - 1;j++)
                                value[j] = buffer[pos+j];
@@ -2094,7 +2094,7 @@ void InfoString_SetValue(char *buffer, size_t bufferlength, const char *key, con
        pos2 = pos;
        if (buffer[pos] == '\\')
        {
-               pos2 += 1 + keylength;  // Skip \key
+               pos2 += 1 + (int)keylength;  // Skip \key
                if (buffer[pos2] == '\\') pos2++; // Skip \ before value.
                for (;buffer[pos2] && buffer[pos2] != '\\';pos2++);
        }