From cb3f3bf5213d7ac49bec2b8c68dc580c066f09e1 Mon Sep 17 00:00:00 2001 From: Rohit Nirmal Date: Fri, 22 Apr 2016 12:57:04 -0500 Subject: [PATCH] Use those other averages. (#41) --- Sources/Engine/Brushes/BrushShadows.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Engine/Brushes/BrushShadows.cpp b/Sources/Engine/Brushes/BrushShadows.cpp index 4abdd84..d2949e0 100644 --- a/Sources/Engine/Brushes/BrushShadows.cpp +++ b/Sources/Engine/Brushes/BrushShadows.cpp @@ -634,8 +634,8 @@ BOOL CBrushShadowMap::IsShadowFlat( COLOR &colFlat) const SLONG slAvgR = ((ULONG)ubR + ubR1) /2; const SLONG slAvgG = ((ULONG)ubG + ubG1) /2; const SLONG slAvgB = ((ULONG)ubB + ubB1) /2; - if( gp.gp_bDark) { slR -= slAvgR; slG -= slAvgR; slB -= slAvgR; } - else { slR += slAvgR; slG += slAvgR; slB += slAvgR; } + if( gp.gp_bDark) { slR -= slAvgR; slG -= slAvgG; slB -= slAvgB; } + else { slR += slAvgR; slG += slAvgG; slB += slAvgB; } } }