mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 13:50:53 +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++;
|
sv.spawned_client_slots++;
|
||||||
Q_strncpyz(cl->namebuf, lp[clnum].name, sizeof(cl->namebuf));
|
Q_strncpyz(cl->namebuf, lp[clnum].name, sizeof(cl->namebuf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (svprogfuncs)
|
||||||
|
{
|
||||||
cl->name = PR_AddString(svprogfuncs, cl->namebuf, sizeof(cl->namebuf), false);
|
cl->name = PR_AddString(svprogfuncs, cl->namebuf, sizeof(cl->namebuf), false);
|
||||||
cl->team = PR_AddString(svprogfuncs, cl->teambuf, sizeof(cl->teambuf), false);
|
cl->team = PR_AddString(svprogfuncs, cl->teambuf, sizeof(cl->teambuf), false);
|
||||||
|
|
||||||
cl->edict = EDICT_NUM_PB(svprogfuncs, clnum+1);
|
cl->edict = EDICT_NUM_PB(svprogfuncs, clnum+1);
|
||||||
|
|
||||||
#ifdef HEXEN2
|
#ifdef HEXEN2
|
||||||
{
|
|
||||||
if (cl->edict)
|
if (cl->edict)
|
||||||
cl->playerclass = cl->edict->xv->playerclass;
|
cl->playerclass = cl->edict->xv->playerclass;
|
||||||
else
|
else
|
||||||
cl->playerclass = 0;
|
cl->playerclass = 0;
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LEGACY
|
#ifdef HAVE_LEGACY
|
||||||
cl->edict->xv->clientcolors = cl->playercolor;
|
cl->edict->xv->clientcolors = cl->playercolor;
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (cl->state == cs_spawned) //shouldn't have gotten past SV_SpawnServer, but just in case...
|
if (cl->state == cs_spawned) //shouldn't have gotten past SV_SpawnServer, but just in case...
|
||||||
cl->state = cs_connected; //client needs new serverinfo.
|
cl->state = cs_connected; //client needs new serverinfo.
|
||||||
|
|
Loading…
Reference in a new issue