]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.c
off-switch cvar for dlcache unload on server/map change
[xonotic/darkplaces.git] / world.c
diff --git a/world.c b/world.c
index 4f7cb48c5ed99f41cb83c4d226d2cfd251f465bd..229fbe7e544c0d1d998a1bf6e146fe06b68981ec 100644 (file)
--- a/world.c
+++ b/world.c
@@ -317,13 +317,17 @@ World_LinkEdict
 
 ===============
 */
-void World_LinkEdict(world_t *world, prvm_edict_t *ent, const vec3_t mins, const vec3_t maxs)
+void World_LinkEdict(world_t *world, prvm_edict_t *ent, const vec3_t mins, const vec3_t maxs, qbool link_solid_not)
 {
        prvm_prog_t *prog = world->prog;
        // unlink from old position first
        if (ent->priv.server->areagrid[0].list.prev)
                World_UnlinkEdict(ent);
 
+       // some games don't want SOLID_NOT entities linked
+       if (!link_solid_not && PRVM_serveredictfloat(ent, solid) == SOLID_NOT)
+               return;
+
        // don't add the world
        if (ent == prog->edicts)
                return;