From: havoc Date: Thu, 22 Aug 2002 21:58:33 +0000 (+0000) Subject: made stains more small and focused X-Git-Tag: RELEASE_0_2_0_RC1~317 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=85d18e23ff1d35c5fb39eff681af6ee8bb74f4de;p=xonotic%2Fdarkplaces.git made stains more small and focused git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2277 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_particles.c b/cl_particles.c index 1a8426b1..90d0de16 100644 --- a/cl_particles.c +++ b/cl_particles.c @@ -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; diff --git a/gl_rsurf.c b/gl_rsurf.c index fed6a6a7..47597c2a 100644 --- a/gl_rsurf.c +++ b/gl_rsurf.c @@ -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;