From: Rudolf Polzer <divverent@xonotic.org>
Date: Thu, 28 Mar 2013 11:26:46 +0000 (+0100)
Subject: Fix a possible bug in floodlighting/dirtmapping in conjunction with alphashadow surfaces
X-Git-Tag: xonotic-v0.7.0^0
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=06afddfe803a4d7ecf75abd8f3c29a814455a52a;p=xonotic%2Fnetradiant.git

Fix a possible bug in floodlighting/dirtmapping in conjunction with alphashadow surfaces
---

diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c
index c9107407..91f5e047 100644
--- a/tools/quake3/q3map2/light_ydnar.c
+++ b/tools/quake3/q3map2/light_ydnar.c
@@ -1492,6 +1492,7 @@ float DirtForSample( trace_t *trace ){
 			/* set endpoint */
 			VectorMA( trace->origin, dirtDepth, direction, trace->end );
 			SetupTrace( trace );
+			VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 
 			/* trace */
 			TraceLine( trace );
@@ -1514,6 +1515,7 @@ float DirtForSample( trace_t *trace ){
 			/* set endpoint */
 			VectorMA( trace->origin, dirtDepth, direction, trace->end );
 			SetupTrace( trace );
+			VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 
 			/* trace */
 			TraceLine( trace );
@@ -1527,6 +1529,7 @@ float DirtForSample( trace_t *trace ){
 	/* direct ray */
 	VectorMA( trace->origin, dirtDepth, normal, trace->end );
 	SetupTrace( trace );
+	VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 
 	/* trace */
 	TraceLine( trace );
@@ -4248,6 +4251,7 @@ float FloodLightForSample( trace_t *trace, float floodLightDistance, qboolean fl
 			//VectorMA( trace->origin, 1, direction, trace->origin );
 
 			SetupTrace( trace );
+			VectorSet(trace->color, 1.0f, 1.0f, 1.0f);
 			/* trace */
 			TraceLine( trace );
 			contribution = 1;