fixed bugs with explosion intensity shading according to view direction
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 22 Feb 2002 10:41:18 +0000 (10:41 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 22 Feb 2002 10:41:18 +0000 (10:41 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1549 d7cf8633-e32d-0410-b094-e92efae38249

r_explosion.c

index 769c2af..4fa758a 100644 (file)
@@ -243,15 +243,11 @@ void R_DrawExplosion(explosion_t *e)
        size = 0;
        for (i = 0;i < EXPLOSIONVERTS;i++)
        {
-               //VectorSubtract(e->vert[i], e->origin, diff);
-               //dist = DotProduct(diff, diff);
                dist = DotProduct(e->vert[i], vpn) - centerdist;
-               if (size < dist)
+               if (size > dist)
                        size = dist;
        }
-       //scale = -1.0f / sqrt(size / EXPLOSIONVERTS);
-       //scale = -1.0f / sqrt(size);
-       scale = -1.0f / size;
+       scale = 1.0f / size;
        if (fogenabled)
        {
                for (i = 0;i < EXPLOSIONVERTS;i++)