mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
Fix Q2 saved-game crash.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6323 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ed63b7435e
commit
c769e6fa01
1 changed files with 7 additions and 6 deletions
|
@ -1746,22 +1746,23 @@ static void SV_GameLoaded(loadplayer_t *lp, size_t slots, const char *savename)
|
|||
sv.spawned_client_slots++;
|
||||
Q_strncpyz(cl->namebuf, lp[clnum].name, sizeof(cl->namebuf));
|
||||
}
|
||||
cl->name = PR_AddString(svprogfuncs, cl->namebuf, sizeof(cl->namebuf), false);
|
||||
cl->team = PR_AddString(svprogfuncs, cl->teambuf, sizeof(cl->teambuf), false);
|
||||
|
||||
cl->edict = EDICT_NUM_PB(svprogfuncs, clnum+1);
|
||||
if (svprogfuncs)
|
||||
{
|
||||
cl->name = PR_AddString(svprogfuncs, cl->namebuf, sizeof(cl->namebuf), false);
|
||||
cl->team = PR_AddString(svprogfuncs, cl->teambuf, sizeof(cl->teambuf), false);
|
||||
cl->edict = EDICT_NUM_PB(svprogfuncs, clnum+1);
|
||||
|
||||
#ifdef HEXEN2
|
||||
{
|
||||
if (cl->edict)
|
||||
cl->playerclass = cl->edict->xv->playerclass;
|
||||
else
|
||||
cl->playerclass = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_LEGACY
|
||||
cl->edict->xv->clientcolors = cl->playercolor;
|
||||
cl->edict->xv->clientcolors = cl->playercolor;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (cl->state == cs_spawned) //shouldn't have gotten past SV_SpawnServer, but just in case...
|
||||
cl->state = cs_connected; //client needs new serverinfo.
|
||||
|
|
Loading…
Reference in a new issue