From 352e52eb0d7eeb3b65191543297d594706456a52 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Sun, 8 Jul 2018 15:49:23 +0300 Subject: [PATCH] Fix #62 ligthting issue. --- dlls/lights.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/lights.cpp b/dlls/lights.cpp index 1c39266b..13e6d3a9 100644 --- a/dlls/lights.cpp +++ b/dlls/lights.cpp @@ -155,10 +155,10 @@ void CEnvLight::KeyValue( KeyValueData* pkvd ) } else if( j == 4 ) { - v /= 255; - r *= v; - g *= v; - b *= v; + float vf = v / 255.0f; + r *= vf; + g *= vf; + b *= vf; } // simulate qrad direct, ambient,and gamma adjustments, as well as engine scaling