cvar_t sv_autodemo_perclient_discardable = {CVAR_SAVE, "sv_autodemo_perclient_discardable", "0", "Allow game code to decide whether a demo should be kept or discarded."};
cvar_t halflifebsp = {0, "halflifebsp", "0", "indicates the current map is hlbsp format (useful to know because of different bounding box sizes)"};
+cvar_t sv_mapformat_is_quake2 = {0, "sv_mapformat_is_quake2", "0", "indicates the current map is q2bsp format (useful to know because of different entity behaviors, .frame on submodels and other things)"};
+cvar_t sv_mapformat_is_quake3 = {0, "sv_mapformat_is_quake3", "0", "indicates the current map is q2bsp format (useful to know because of different entity behaviors)"};
server_t sv;
server_static_t svs;
Cvar_RegisterVariable (&sv_autodemo_perclient_discardable);
Cvar_RegisterVariable (&halflifebsp);
+ Cvar_RegisterVariable (&sv_mapformat_is_quake2);
+ Cvar_RegisterVariable (&sv_mapformat_is_quake3);
sv_mempool = Mem_AllocPool("server", 0, NULL);
}
if (name == NULL)
name = "";
// always point the string back at host_client->name to keep it safe
- strlcpy (host_client->name, name, sizeof (host_client->name));
+ //strlcpy (host_client->name, name, sizeof (host_client->name));
+ if (name != host_client->name) // prevent buffer overlap SIGABRT on Mac OSX
+ strlcpy (host_client->name, name, sizeof (host_client->name));
PRVM_serveredictstring(host_client->edict, netname) = PRVM_SetEngineString(prog, host_client->name);
if (strcmp(host_client->old_name, host_client->name))
{
if (model == NULL)
model = "";
// always point the string back at host_client->name to keep it safe
- strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
+ //strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
+ if (model != host_client->playermodel) // prevent buffer overlap SIGABRT on Mac OSX
+ strlcpy (host_client->playermodel, model, sizeof (host_client->playermodel));
PRVM_serveredictstring(host_client->edict, playermodel) = PRVM_SetEngineString(prog, host_client->playermodel);
// NEXUIZ_PLAYERSKIN
if (skin == NULL)
skin = "";
// always point the string back at host_client->name to keep it safe
- strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
+ //strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
+ if (skin != host_client->playerskin) // prevent buffer overlap SIGABRT on Mac OSX
+ strlcpy (host_client->playerskin, skin, sizeof (host_client->playerskin));
PRVM_serveredictstring(host_client->edict, playerskin) = PRVM_SetEngineString(prog, host_client->playerskin);
// TODO: add an extension name for this [1/17/2008 Black]
{
if (argc == 2)
{
- for (effectnameindex = 1;effectnameindex < SV_MAX_PARTICLEEFFECTNAME;effectnameindex++)
+ for (effectnameindex = 1;effectnameindex < MAX_PARTICLEEFFECTNAME;effectnameindex++)
{
if (sv.particleeffectname[effectnameindex][0])
{
}
}
// if we run out of names, abort
- if (effectnameindex == SV_MAX_PARTICLEEFFECTNAME)
+ if (effectnameindex == MAX_PARTICLEEFFECTNAME)
{
Con_Printf("%s:%i: too many effects!\n", filename, linenumber);
break;
}
}
// search for the name
- for (effectnameindex = 1;effectnameindex < SV_MAX_PARTICLEEFFECTNAME && sv.particleeffectname[effectnameindex][0];effectnameindex++)
+ for (effectnameindex = 1;effectnameindex < MAX_PARTICLEEFFECTNAME && sv.particleeffectname[effectnameindex][0];effectnameindex++)
if (!strcmp(sv.particleeffectname[effectnameindex], name))
return effectnameindex;
// return 0 if we couldn't find it
cls.signon = 0;
Cvar_SetValue("halflifebsp", worldmodel->brush.ishlbsp);
+ Cvar_SetValue("sv_mapformat_is_quake2", worldmodel->brush.isq2bsp);
+ Cvar_SetValue("sv_mapformat_is_quake3", worldmodel->brush.isq3bsp);
if(*sv_random_seed.string)
{