X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=common.c;h=71c059aca7d739bb5452ce701c45dd432e51412f;hb=1dfae27462dba735f317cac38f3b7deb415ed154;hp=b94f0973ff39724ecf498c73999bbc77c70b99fe;hpb=f4b2c929c87754f9c805a8d59d721ddc644eb162;p=xonotic%2Fdarkplaces.git diff --git a/common.c b/common.c index b94f0973..71c059ac 100644 --- a/common.c +++ b/common.c @@ -19,14 +19,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // common.c -- misc functions used in client and server -#include "quakedef.h" - #include #include #ifndef WIN32 #include #endif +#include "quakedef.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"}; @@ -606,7 +606,7 @@ void SZ_Write (sizebuf_t *buf, const unsigned char *data, int length) // attention, it has been eradicated from here, its only (former) use in // all of darkplaces. -static char *hexchar = "0123456789ABCDEF"; +static const char *hexchar = "0123456789ABCDEF"; void Com_HexDumpToConsole(const unsigned char *data, int size) { int i, j, n; @@ -1448,6 +1448,9 @@ static const gamemode_info_t gamemode_info [GAME_COUNT] = // GAME_NEXUIZ // COMMANDLINEOPTION: Game: -nexuiz runs the multiplayer game Nexuiz { "nexuiz", "-nexuiz", "Nexuiz", "data", NULL, "nexuiz", "nexuiz" }, +// GAME_XONOTIC +// COMMANDLINEOPTION: Game: -xonotic runs the multiplayer game Xonotic +{ "xonotic", "-xonotic", "Xonotic", "data", NULL, "xonotic", "xonotic" }, // GAME_TRANSFUSION // COMMANDLINEOPTION: Game: -transfusion runs Transfusion (the recreation of Blood in Quake) { "transfusion", "-transfusion", "Transfusion", "basetf", NULL, "transfusion", "transfusion" }, @@ -1511,6 +1514,9 @@ static const gamemode_info_t gamemode_info [GAME_COUNT] = // GAME_STRAPBOMB // COMMANDLINEOPTION: Game: -strapbomb runs the game Strap-on-bomb Car { "strapbomb", "-strapbomb", "Strap-on-bomb Car", "id1", NULL, "strap", "strapbomb" }, +// GAME_MOONHELM +// COMMANDLINEOPTION: Game: -moonhelm runs the game MoonHelm +{ "moonhelm", "-moonhelm", "MoonHelm", "data", NULL, "mh", "moonhelm" }, }; void COM_InitGameType (void) @@ -1996,8 +2002,6 @@ void InfoString_GetValue(const char *buffer, const char *key, char *value, size_ size_t keylength; if (!key) key = ""; - if (!value) - value = ""; keylength = strlen(key); if (valuelength < 1 || !value) {