Fixups for crashes triggered by xonotic, probably some other mods too.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6325 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
6abd0f75bf
commit
fb9f8c9cd8
2 changed files with 7 additions and 0 deletions
|
@ -5212,6 +5212,8 @@ client_t *Write_GetClient(void)
|
|||
entnum = NUM_FOR_EDICT(svprogfuncs, ent);
|
||||
if (entnum < 1 || entnum > sv.allocated_client_slots)
|
||||
return NULL;//PR_RunError ("WriteDest: not a client");
|
||||
if (svs.clients[entnum-1].protocol == SCP_BAD)
|
||||
return NULL; //don't try writing to bots... we don't want the overflows.
|
||||
return &svs.clients[entnum-1];
|
||||
}
|
||||
|
||||
|
|
|
@ -4440,6 +4440,11 @@ void SV_CleanupEnts(void)
|
|||
|
||||
if (!needcleanup)
|
||||
return;
|
||||
if (needcleanup >= sv.world.num_edicts)
|
||||
{
|
||||
needcleanup = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
for (e=1 ; e<=needcleanup ; e++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue