From: lordhavoc Date: Mon, 4 Mar 2002 11:08:20 +0000 (+0000) Subject: don't send entities outside addressable origin range (+-32767) X-Git-Tag: RELEASE_0_2_0_RC1~595 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=79efa45bf0cdbb4507d29c6cfa32851789b283b6;p=xonotic%2Fdarkplaces.git don't send entities outside addressable origin range (+-32767) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1606 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_main.c b/sv_main.c index a335a7f9..5e886884 100644 --- a/sv_main.c +++ b/sv_main.c @@ -961,6 +961,10 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg) VectorCopy(ent->v.origin, origin); } + // don't send an entity if it's coordinates would wrap around + if (origin[0] < -32768 || origin[1] < -32768 || origin[2] < -32768 || origin[0] > 32767 || origin[1] > 32767 || origin[2] > 32767) + continue; + // ent has survived every check so far, check if it is visible // always send embedded brush models, they don't generate much traffic if (ent != clent && ((flags & RENDER_VIEWMODEL) == 0) && (model == NULL || model->type != mod_brush || model->name[0] != '*')) @@ -1791,6 +1795,7 @@ void SV_SpawnServer (char *server) // run two frames to allow everything to settle sv.frametime = pr_global_struct->frametime = host_frametime = 0.1; SV_Physics (); + sv.frametime = pr_global_struct->frametime = host_frametime = 0.1; SV_Physics (); Mod_PurgeUnused();