]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug that caused blood stainmaps to not appear when decals were off
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Mar 2007 03:33:29 +0000 (03:33 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 30 Mar 2007 03:33:29 +0000 (03:33 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7025 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c

index 39c714d16be0ef8eb2e986062f6ede4f15ea12c9..7fec5e9e7df9b1fa4bb9dbe1df803fbdc488866b 100644 (file)
@@ -1590,6 +1590,8 @@ void CL_MoveParticles (void)
                                                        p->type = NULL;
                                                        continue;
                                                }
                                                        p->type = NULL;
                                                        continue;
                                                }
+                                               if (cl_stainmaps.integer)
+                                                       R_Stain(p->org, 32, 32, 16, 16, (int)(p->alpha * p->size * (1.0f / 40.0f)), 192, 48, 48, (int)(p->alpha * p->size * (1.0f / 40.0f)));
                                                if (!cl_decals.integer)
                                                {
                                                        p->type = NULL;
                                                if (!cl_decals.integer)
                                                {
                                                        p->type = NULL;
@@ -1598,8 +1600,6 @@ void CL_MoveParticles (void)
                                                // convert from a blood particle to a blood decal
                                                VectorCopy(trace.plane.normal, p->vel);
                                                VectorAdd(p->org, p->vel, p->org);
                                                // convert from a blood particle to a blood decal
                                                VectorCopy(trace.plane.normal, p->vel);
                                                VectorAdd(p->org, p->vel, p->org);
-                                               if (cl_stainmaps.integer)
-                                                       R_Stain(p->org, 32, 32, 16, 16, (int)(p->alpha * p->size * (1.0f / 40.0f)), 192, 48, 48, (int)(p->alpha * p->size * (1.0f / 40.0f)));
 
                                                p->type = particletype + pt_decal;
                                                p->texnum = tex_blooddecal[rand()&7];
 
                                                p->type = particletype + pt_decal;
                                                p->texnum = tex_blooddecal[rand()&7];