]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_main.c
don't try to send entities with a NAN origin (this is strangely crashing the PVS...
[xonotic/darkplaces.git] / sv_main.c
index 18042424a92564bfc37dee59128f711e7676e44c..0f798ad88f3ebf45539420fb21aea1bd713ab257 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -483,7 +483,8 @@ void SV_PrepareEntitiesForSending(void)
        for (e = 1, ent = PRVM_NEXT_EDICT(prog->edicts);e < prog->num_edicts;e++, ent = PRVM_NEXT_EDICT(ent))
        {
                sendentitiesindex[e] = NULL;
-               if (ent->priv.server->free)
+               // the 2 billion unit check is actually to detect NAN origins (we really don't want to send those)
+               if (ent->priv.server->free || VectorLength2(ent->fields.server->origin) > 2000000000.0*2000000000.0)
                        continue;
 
                cs = defaultstate;