mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
ClientReEnter mechanism should not be mutually exclusive with regular parms. Allow both to function simultaneously, even if that seems pointless.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4364 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
37de21efc7
commit
a607d1a8f3
1 changed files with 19 additions and 18 deletions
|
@ -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 ; j<NUM_SPAWN_PARMS ; j++)
|
||||
host_client->spawn_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 ; j<NUM_SPAWN_PARMS ; j++)
|
||||
host_client->spawn_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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue