X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=cl_particles.c;h=cc2f16d6f9df8b84f66c1c8b7552fe029b2a98a7;hb=8bcbd476c86b2c26e77b76b57039f840904a89a5;hp=e9c720265e440329f7b9e3d03722d7dfb8d8d610;hpb=ac5533c5e5a5ad2e2edfae17c596faf29692aa06;p=xonotic%2Fdarkplaces.git diff --git a/cl_particles.c b/cl_particles.c index e9c72026..cc2f16d6 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -1118,10 +1118,11 @@ void CL_ParticleTrail(int effectnameindex, float pcount, const vec3_t originmins { vec3_t center; qboolean found = false; - if (effectnameindex < 1 || effectnameindex >= MAX_PARTICLEEFFECTNAME) - return; // invalid effect index - if (!particleeffectname[effectnameindex][0]) + if (effectnameindex < 1 || effectnameindex >= MAX_PARTICLEEFFECTNAME || !particleeffectname[effectnameindex][0]) + { + Con_DPrintf("Unknown effect number %i received from server\n", effectnameindex); return; // no such effect + } VectorLerp(originmins, 0.5, originmaxs, center); if (!cl_particles_quake.integer && particleeffectinfo[0].effectnameindex) { @@ -1937,6 +1938,7 @@ void R_DrawDecal_TransparentCallback(const entity_render_t *ent, const rtlight_t R_Mesh_VertexPointer(particle_vertex3f, 0, 0); R_Mesh_TexCoordPointer(0, 2, particle_texcoord2f, 0, 0); R_Mesh_ColorPointer(particle_color4f, 0, 0); + R_SetupGenericShader(true); GL_DepthMask(false); GL_DepthRange(0, 1); GL_PolygonOffset(0, 0); @@ -2004,7 +2006,7 @@ void R_DrawDecals (void) float drawdist2; frametime = bound(0, cl.time - cl.decals_updatetime, 1); - cl.decals_updatetime += frametime; + cl.decals_updatetime = bound(cl.time - 1, cl.decals_updatetime + frametime, cl.time + 1); // LordHavoc: early out conditions if ((!cl.num_decals) || (!r_drawdecals.integer)) @@ -2082,6 +2084,7 @@ void R_DrawParticle_TransparentCallback(const entity_render_t *ent, const rtligh R_Mesh_VertexPointer(particle_vertex3f, 0, 0); R_Mesh_TexCoordPointer(0, 2, particle_texcoord2f, 0, 0); R_Mesh_ColorPointer(particle_color4f, 0, 0); + R_SetupGenericShader(true); GL_DepthMask(false); GL_DepthRange(0, 1); GL_PolygonOffset(0, 0); @@ -2264,7 +2267,7 @@ void R_DrawParticles (void) qboolean update; frametime = bound(0, cl.time - cl.particles_updatetime, 1); - cl.particles_updatetime += frametime; + cl.particles_updatetime = bound(cl.time - 1, cl.particles_updatetime + frametime, cl.time + 1); // LordHavoc: early out conditions if ((!cl.num_particles) || (!r_drawparticles.integer))