Con_Print("changelevel <levelname> : continue game on a new level\n");
return;
}
- if (!sv.active || cls.demoplayback)
+ // HACKHACKHACK
+ if (!sv.active) {
+ Host_Map_f();
+ return;
+ }
+ if (cls.demoplayback)
{
Con_Print("Only the server may changelevel\n");
return;
cls.demonum = -1; // stop demo loop in case this fails
- t = text = FS_LoadFile (filename, tempmempool, false);
+ t = text = (char *)FS_LoadFile (filename, tempmempool, false, NULL);
if (!text)
{
Con_Print("ERROR: couldn't open.\n");
if (entnum >= MAX_EDICTS)
{
Mem_Free(text);
- Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)\n", MAX_EDICTS);
+ Host_Error("Host_PerformLoadGame: too many edicts in save file (reached MAX_EDICTS %i)", MAX_EDICTS);
}
while (entnum >= prog->max_edicts)
//SV_IncreaseEdicts();
const char *p1;
char *p2;
// LordHavoc: 256 char say messages
- unsigned char text[256];
+ char text[256];
qboolean fromServer = false;
if (cmd_source == src_command)
void Host_Tell_f(void)
{
client_t *save;
- size_t j;
+ int j;
const char *p1, *p2;
char text[1024]; // LordHavoc: FIXME: temporary buffer overflow fix (was 64)
qboolean fromServer = false;
}
while (p2 > p1 && (p2[-1] == '\n' || p2[-1] == '\r'))
p2--;
- for (j = strlen(text);j < (sizeof(text) - 2) && p1 < p2;)
+ for (j = (int)strlen(text);j < (int)(sizeof(text) - 2) && p1 < p2;)
text[j++] = *p1++;
text[j++] = '\n';
text[j++] = 0;
======================
Host_PModel_f
LordHavoc: only supported for Nehahra, I personally think this is dumb, but Mindcrime won't listen.
+LordHavoc: correction, Mindcrime will be removing pmodel in the future, but it's still stuck here for compatibility.
======================
*/
cvar_t cl_pmodel = {CVAR_SAVE, "_cl_pmodel", "0"};
// send all current light styles
for (i=0 ; i<MAX_LIGHTSTYLES ; i++)
{
- MSG_WriteByte (&host_client->message, svc_lightstyle);
- MSG_WriteByte (&host_client->message, (char)i);
- MSG_WriteString (&host_client->message, sv.lightstyles[i]);
+ if (sv.lightstyles[i][0])
+ {
+ MSG_WriteByte (&host_client->message, svc_lightstyle);
+ MSG_WriteByte (&host_client->message, (char)i);
+ MSG_WriteString (&host_client->message, sv.lightstyles[i]);
+ }
}
// send some stats
if (svs.clients)
Mem_Free(svs.clients);
svs.maxclients = n;
- svs.clients = Mem_Alloc(sv_mempool, sizeof(client_t) * svs.maxclients);
+ svs.clients = (client_t *)Mem_Alloc(sv_mempool, sizeof(client_t) * svs.maxclients);
if (n == 1)
Cvar_Set ("deathmatch", "0");
else