mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
don't cause the clien to segfault while changing levels
This commit is contained in:
parent
2822b47c3f
commit
60c3b139d9
1 changed files with 17 additions and 1 deletions
|
@ -68,6 +68,20 @@ static void
|
|||
sv_serverdata (server_t *sv, qmsg_t *msg)
|
||||
{
|
||||
const char *str;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_SOUNDS; i++) {
|
||||
if (sv->soundlist[i]) {
|
||||
free (sv->soundlist[i]);
|
||||
sv->soundlist[i] = 0;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < MAX_MODELS; i++) {
|
||||
if (sv->modellist[i]) {
|
||||
free (sv->modellist[i]);
|
||||
sv->modellist[i] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
sv->ver = MSG_ReadLong (msg);
|
||||
sv->spawncount = MSG_ReadLong (msg);
|
||||
|
@ -225,8 +239,10 @@ sv_changing_f (server_t *sv)
|
|||
MSG_WriteByte (&sv->netchan.message, qtv_nop);
|
||||
sv->next_run = realtime;
|
||||
Server_BroadcastCommand (sv, "changing\n");
|
||||
for (cl = sv->clients; cl; cl = cl->next)
|
||||
for (cl = sv->clients; cl; cl = cl->next) {
|
||||
cl->connected = 0;
|
||||
Client_SendMessages (cl);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue