]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - r_explosion.c
updated readme
[xonotic/darkplaces.git] / r_explosion.c
index 283bbe81baea01fdc848cc2fcfdf2230134a7446..0c343154e66a809be0b484f5d4e2865235bc6177 100644 (file)
@@ -171,7 +171,7 @@ void R_NewExplosion(const vec3_t org)
                                // clip start origin
                                if (e->clipping)
                                {
-                                       trace = CL_TraceBox(e->origin, vec3_origin, vec3_origin, e->vert[j], true, NULL, SUPERCONTENTS_SOLID, false);
+                                       trace = CL_Move(e->origin, vec3_origin, vec3_origin, e->vert[j], MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, true, false, NULL, false);
                                        VectorCopy(trace.endpos, e->vert[i]);
                                }
                        }
@@ -188,6 +188,7 @@ static void R_DrawExplosion_TransparentCallback(const entity_render_t *ent, cons
        GL_BlendFunc(GL_SRC_ALPHA, GL_ONE);
        GL_DepthMask(false);
        GL_DepthTest(true);
+       GL_CullFace(GL_FRONT); // quake is backwards, this culls back faces
        R_Mesh_Matrix(&identitymatrix);
 
        R_Mesh_ColorPointer(NULL);
@@ -228,7 +229,7 @@ static void R_MoveExplosion(explosion_t *e)
                        VectorMA(e->vert[i], frametime, e->vertvel[i], end);
                        if (e->clipping)
                        {
-                               trace = CL_TraceBox(e->vert[i], vec3_origin, vec3_origin, end, true, NULL, SUPERCONTENTS_SOLID, false);
+                               trace = CL_Move(e->vert[i], vec3_origin, vec3_origin, end, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, true, false, NULL, false);
                                if (trace.fraction < 1)
                                {
                                        // clip velocity against the wall