mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Fixed botclient respawning a bit. There's still a bug somewhere, but they now work properly after being killed the first time around, so it's certainly better.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1329 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
9e412475c2
commit
eec72538fb
1 changed files with 8 additions and 5 deletions
|
@ -494,7 +494,7 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
|||
#ifdef Q2SERVER
|
||||
q2edict_t *q2ent;
|
||||
#endif
|
||||
int i;
|
||||
int i, j;
|
||||
int spawnflagmask;
|
||||
|
||||
#ifndef SERVERONLY
|
||||
|
@ -1143,7 +1143,7 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
|||
|
||||
if (svs.gametype == GT_PROGS)
|
||||
{
|
||||
for (i = 0; i < MAX_CLIENTS; i++)
|
||||
for (i = 0; i < sv.allocated_client_slots; i++)
|
||||
{
|
||||
host_client = &svs.clients[i];
|
||||
if (host_client->state == cs_connected && host_client->protocol == SCP_BAD)
|
||||
|
@ -1152,12 +1152,15 @@ void SV_SpawnServer (char *server, char *startspot, qboolean noents, qboolean us
|
|||
SV_ExtractFromUserinfo(host_client);
|
||||
|
||||
// copy spawn parms out of the client_t
|
||||
for (i=0 ; i< NUM_SPAWN_PARMS ; i++)
|
||||
for (j=0 ; j< NUM_SPAWN_PARMS ; j++)
|
||||
{
|
||||
if (spawnparamglobals[i])
|
||||
*spawnparamglobals[i] = host_client->spawn_parms[i];
|
||||
if (spawnparamglobals[j])
|
||||
*spawnparamglobals[j] = host_client->spawn_parms[j];
|
||||
}
|
||||
|
||||
SetUpClientEdict(host_client, sv_player);
|
||||
sv_player->v->clientcolors = atoi(Info_ValueForKey(host_client->userinfo, "topcolor"))*16 + atoi(Info_ValueForKey(host_client->userinfo, "bottomcolor"));
|
||||
|
||||
// call the spawn function
|
||||
pr_global_struct->time = sv.time;
|
||||
pr_global_struct->self = EDICT_TO_PROG(svprogfuncs, sv_player);
|
||||
|
|
Loading…
Reference in a new issue