X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=r_explosion.c;h=fda2ddfc4616880bc1584e6860a1780c72cadd25;hb=refs%2Fheads%2FColdSpirit%2Fcvar_onchange_stable;hp=1c12a07b134d44df3990ba04150818f0e8260a09;hpb=e8fd770b60b768f32e47b0f2c29b1c37cf6ead27;p=xonotic%2Fdarkplaces.git diff --git a/r_explosion.c b/r_explosion.c index 1c12a07b..fda2ddfc 100644 --- a/r_explosion.c +++ b/r_explosion.c @@ -189,7 +189,7 @@ void R_NewExplosion(const vec3_t org) // clip start origin if (e->clipping) { - trace = CL_TraceLine(e->origin, e->vert[j], MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, true, false, NULL, false); + trace = CL_TraceLine(e->origin, e->vert[j], MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value, true, false, NULL, false, false); VectorCopy(trace.endpos, e->vert[i]); } } @@ -212,17 +212,15 @@ static void R_DrawExplosion_TransparentCallback(const entity_render_t *ent, cons GL_CullFace(r_refdef.view.cullface_back); R_EntityMatrix(&identitymatrix); - R_Mesh_ColorPointer(NULL, 0, 0); - R_Mesh_ResetTextureState(); - R_SetupShader_Generic(explosiontexture, NULL, GL_MODULATE, 1); - R_Mesh_TexCoordPointer(0, 2, explosiontexcoord2f[0], 0, 0); +// R_Mesh_ResetTextureState(); + R_SetupShader_Generic(explosiontexture, NULL, GL_MODULATE, 1, false, false, false); for (surfacelistindex = 0;surfacelistindex < numsurfaces;surfacelistindex++) { const explosion_t *e = explosion + surfacelist[surfacelistindex]; - R_Mesh_VertexPointer(e->vert[0], 0, 0); - // FIXME: fixed function path can't properly handle r_refdef.view.colorscale > 1 + // FIXME: this can't properly handle r_refdef.view.colorscale > 1 GL_Color(e->alpha * r_refdef.view.colorscale, e->alpha * r_refdef.view.colorscale, e->alpha * r_refdef.view.colorscale, 1); - R_Mesh_Draw(0, numverts, 0, numtriangles, NULL, explosiontris[0], 0, 0); + R_Mesh_PrepareVertices_Generic_Arrays(numverts, e->vert[0], NULL, explosiontexcoord2f[0]); + R_Mesh_Draw(0, numverts, 0, numtriangles, NULL, NULL, 0, explosiontris[0], NULL, 0); } } @@ -247,7 +245,7 @@ static void R_MoveExplosion(explosion_t *e) VectorMA(e->vert[i], frametime, e->vertvel[i], end); if (e->clipping) { - trace = CL_TraceLine(e->vert[i], end, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, true, false, NULL, false); + trace = CL_TraceLine(e->vert[i], end, MOVE_NOMONSTERS, NULL, SUPERCONTENTS_SOLID, 0, 0, collision_extendmovelength.value, true, false, NULL, false, false); if (trace.fraction < 1) { // clip velocity against the wall @@ -277,7 +275,7 @@ void R_DrawExplosions(void) { R_MoveExplosion(&explosion[i]); if (explosion[i].alpha) - R_MeshQueue_AddTransparent(explosion[i].origin, R_DrawExplosion_TransparentCallback, NULL, i, NULL); + R_MeshQueue_AddTransparent(TRANSPARENTSORT_DISTANCE, explosion[i].origin, R_DrawExplosion_TransparentCallback, NULL, i, NULL); } } while (numexplosions > 0 && explosion[i-1].alpha <= 0)