X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=common.c;h=4a05368b5b85d5e7a462cbe40cd823d5d569329a;hb=fc4a5f1101c87081f94ad550d6b3fd1beee37b54;hp=badf4c9ccaca487160a3af26f8d2f3d14fd870df;hpb=1ff3bc8e953680793a28ea923f2d1e58cdf2c9f0;p=xonotic%2Fdarkplaces.git diff --git a/common.c b/common.c index badf4c9c..4a05368b 100644 --- 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; @@ -372,7 +372,7 @@ void MSG_WriteVector (sizebuf_t *sb, const vec3_t v, protocolversion_t protocol) MSG_WriteCoord (sb, v[2], protocol); } -// LordHavoc: round to nearest value, rather than rounding toward zero, fixes crosshair problem +// LadyHavoc: round to nearest value, rather than rounding toward zero, fixes crosshair problem void MSG_WriteAngle8i (sizebuf_t *sb, float f) { if (f >= 0) @@ -552,7 +552,7 @@ void MSG_ReadVector (sizebuf_t *sb, vec3_t v, protocolversion_t protocol) v[2] = MSG_ReadCoord(sb, protocol); } -// LordHavoc: round to nearest value, rather than rounding toward zero, fixes crosshair problem +// LadyHavoc: round to nearest value, rather than rounding toward zero, fixes crosshair problem float MSG_ReadAngle8i (sizebuf_t *sb) { return (signed char) MSG_ReadByte (sb) * (360.0/256.0); @@ -612,7 +612,7 @@ void SZ_Write (sizebuf_t *buf, const unsigned char *data, int length) memcpy (SZ_GetSpace(buf,length),data,length); } -// LordHavoc: thanks to Fuh for bringing the pure evil of SZ_Print to my +// LadyHavoc: thanks to Fuh for bringing the pure evil of SZ_Print to my // attention, it has been eradicated from here, its only (former) use in // all of darkplaces. @@ -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++); }