diff --git a/engine/server/sv_init.c b/engine/server/sv_init.c index 61d2d6dcc..d2ff551bb 100644 --- a/engine/server/sv_init.c +++ b/engine/server/sv_init.c @@ -295,25 +295,8 @@ void SV_SaveSpawnparms (qboolean dontsave) if (dontsave) //level restart requires that stats can be reset continue; - // call the progs to get default spawn parms for the new client - if (PR_FindGlobal(svprogfuncs, "ClientReEnter", 0, NULL)) - {//oooh, evil. - char buffer[65536]; - int bufsize = sizeof(buffer); - char *buf; - for (j=0 ; jspawn_parms[j] = 0; - - buf = svprogfuncs->saveent(svprogfuncs, buffer, &bufsize, host_client->edict); - - if (host_client->spawninfo) - Z_Free(host_client->spawninfo); - host_client->spawninfo = Z_Malloc(bufsize+1); - memcpy(host_client->spawninfo, buf, bufsize); - host_client->spawninfotime = sv.time; - } #ifdef VM_Q1 - else if (svs.gametype == GT_Q1QVM) + if (svs.gametype == GT_Q1QVM) { pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, host_client->edict); Q1QVM_SetChangeParms(); @@ -339,6 +322,24 @@ void SV_SaveSpawnparms (qboolean dontsave) } } + // call the progs to get default spawn parms for the new client + if (PR_FindGlobal(svprogfuncs, "ClientReEnter", 0, NULL)) + {//oooh, evil. + char buffer[65536*4]; + int bufsize = sizeof(buffer); + char *buf; + for (j=0 ; jspawn_parms[j] = 0; + + buf = svprogfuncs->saveent(svprogfuncs, buffer, &bufsize, host_client->edict); + + if (host_client->spawninfo) + Z_Free(host_client->spawninfo); + host_client->spawninfo = Z_Malloc(bufsize+1); + memcpy(host_client->spawninfo, buf, bufsize); + host_client->spawninfotime = sv.time; + } + #ifdef SVRANKING if (host_client->rankid) {