mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
Switches instead of ifs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1477 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
78e89609ee
commit
b7d963b039
1 changed files with 10 additions and 5 deletions
|
@ -1609,8 +1609,9 @@ client_t *SVC_DirectConnect(void)
|
|||
}
|
||||
|
||||
edictnum = (newcl-svs.clients)+1;
|
||||
if (svprogfuncs)
|
||||
switch (svs.gametype)
|
||||
{
|
||||
case GT_PROGS:
|
||||
ent = EDICT_NUM(svprogfuncs, edictnum);
|
||||
#ifdef Q2SERVER
|
||||
temp.q2edict = NULL;
|
||||
|
@ -1635,10 +1636,10 @@ client_t *SVC_DirectConnect(void)
|
|||
temp.frames[i].entities.max_entities = maxpacketentities;
|
||||
temp.frames[i].entities.entities = (entity_state_t*)(temp.frames+UPDATE_BACKUP) + i*temp.frames[i].entities.max_entities;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef Q2SERVER
|
||||
else
|
||||
{
|
||||
case GT_QUAKE2:
|
||||
q2ent = Q2EDICT_NUM(edictnum);
|
||||
temp.edict = NULL;
|
||||
temp.q2edict = q2ent;
|
||||
|
@ -1656,8 +1657,12 @@ client_t *SVC_DirectConnect(void)
|
|||
Z_Free(temp.q2frames);
|
||||
|
||||
temp.q2frames = Z_Malloc(sizeof(q2client_frame_t)*Q2UPDATE_BACKUP);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
Sys_Error("Bad svs.gametype in SVC_DirectConnect");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue