]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
made stains more small and focused
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 Aug 2002 21:58:33 +0000 (21:58 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 22 Aug 2002 21:58:33 +0000 (21:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2277 d7cf8633-e32d-0410-b094-e92efae38249

cl_particles.c
gl_rsurf.c

index 1a8426b1314599f27c80228c61d13dad2c7a55fa..90d0de161bcb4f3881911967513ed076582ac9a6 100644 (file)
@@ -349,7 +349,7 @@ void CL_ParticleExplosion (vec3_t org, int smoke)
 {
        int i;
        if (cl_stainmaps.integer)
-               R_Stain(org, 96, 80, 80, 80, 128, 176, 176, 176, 128);
+               R_Stain(org, 96, 80, 80, 80, 64, 176, 176, 176, 64);
 
        i = Mod_PointInLeaf(org, cl.worldmodel)->contents;
        if ((i == CONTENTS_SLIME || i == CONTENTS_WATER) && cl_particles.integer && cl_particles_bubbles.integer)
@@ -391,7 +391,7 @@ CL_BlobExplosion
 void CL_BlobExplosion (vec3_t org)
 {
        if (cl_stainmaps.integer)
-               R_Stain(org, 96, 80, 80, 80, 128, 176, 176, 176, 128);
+               R_Stain(org, 96, 80, 80, 80, 64, 176, 176, 176, 64);
 
        if (cl_explosions.integer)
                R_NewExplosion(org);
@@ -432,7 +432,7 @@ void CL_SparkShower (vec3_t org, vec3_t dir, int count)
        if (!cl_particles.integer) return;
 
        if (cl_stainmaps.integer)
-               R_Stain(org, 32, 96, 96, 96, 32, 128, 128, 128, 32);
+               R_Stain(org, 32, 96, 96, 96, 2, 128, 128, 128, 2);
 
        if (cl_particles_bulletimpacts.integer)
        {
@@ -455,7 +455,7 @@ void CL_SparkShower (vec3_t org, vec3_t dir, int count)
 void CL_PlasmaBurn (vec3_t org)
 {
        if (cl_stainmaps.integer)
-               R_Stain(org, 48, 96, 96, 96, 48, 128, 128, 128, 48);
+               R_Stain(org, 48, 96, 96, 96, 3, 128, 128, 128, 3);
 }
 
 static float bloodcount = 0;
@@ -860,7 +860,7 @@ void CL_MoveParticles (void)
                                {
                                        // assume it's blood (lame, but...)
                                        if (cl_stainmaps.integer)
-                                               R_Stain(v, 64, 32, 16, 16, p->alpha * p->scalex * (1.0f / 100.0f), 192, 48, 48, p->alpha * p->scalex * (1.0f / 100.0f));
+                                               R_Stain(v, 32, 32, 16, 16, p->alpha * p->scalex * (1.0f / 400.0f), 192, 48, 48, p->alpha * p->scalex * (1.0f / 400.0f));
                                        p->die = -1;
                                        freeparticles[j++] = p;
                                        continue;
index fed6a6a72d4916aa3b6591846a56116fcec77613..47597c2a6c8f3f0966695ba1a4ee8e0196371385 100644 (file)
@@ -439,8 +439,8 @@ void R_StainNode (mnode_t *node, model_t *model, vec3_t origin, float radius, in
 
 
        // for comparisons to minimum acceptable light
-       // compensate for 4096 offset
-       maxdist = radius * radius + 4096;
+       // compensate for 256 offset
+       maxdist = radius * radius + 256.0f;
 
        // clamp radius to avoid exceeding 32768 entry division table
        if (maxdist > 4194304)
@@ -463,8 +463,7 @@ loc0:
                goto loc0;
        }
 
-       dist2 = ndist * ndist;
-       dist2 += 4096.0f;
+       dist2 = ndist * ndist + 256.0f;
        if (dist2 < maxdist)
        {
                maxdist3 = maxdist - dist2;