]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_main.c
TE_EXPLOSION2: don't crash on colorLength == 0.
[xonotic/darkplaces.git] / cl_main.c
index 9ae5e69cf0ff0511aead63c6b91344f2f263f625..51a02ffb7b62ed9a71b159b272c90f36e66d3a43 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -1586,6 +1586,10 @@ static void CL_RelinkWorld(void)
        CL_UpdateRenderEntity(&ent->render);
        r_refdef.scene.worldentity = &ent->render;
        r_refdef.scene.worldmodel = cl.worldmodel;
+
+       // if the world is q2bsp, animate the textures
+       if (ent->render.model && ent->render.model->brush.isq2bsp)
+               ent->render.framegroupblend[0].frame = (int)(cl.time * 2.0f);
 }
 
 static void CL_RelinkStaticEntities(void)
@@ -2109,7 +2113,7 @@ static void CL_Locs_AddNode(vec3_t mins, vec3_t maxs, const char *name)
        int namelen;
        if (!name)
                name = "";
-       namelen = strlen(name);
+       namelen = (int)strlen(name);
        node = (cl_locnode_t *) Mem_Alloc(cls.levelmempool, sizeof(cl_locnode_t) + namelen + 1);
        VectorSet(node->mins, min(mins[0], maxs[0]), min(mins[1], maxs[1]), min(mins[2], maxs[2]));
        VectorSet(node->maxs, max(mins[0], maxs[0]), max(mins[1], maxs[1]), max(mins[2], maxs[2]));