]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix missing particles when you join a server late in the game
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Mar 2008 16:32:15 +0000 (16:32 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 2 Mar 2008 16:32:15 +0000 (16:32 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8183 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c

index eb98eb37efa6e234f9656f554511b4a36ddfa797..cc2f16d6f9df8b84f66c1c8b7552fe029b2a98a7 100644 (file)
@@ -2006,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))
@@ -2267,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))