From c2c91044a0f7738675cbd7683c1f218684ea7842 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Thu, 20 May 2010 17:47:07 +0000 Subject: [PATCH] fix default ambient git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4945 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/worldlight.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/src/worldlight.cpp b/source/src/worldlight.cpp index 0c09634a..b5fed9b4 100644 --- a/source/src/worldlight.cpp +++ b/source/src/worldlight.cpp @@ -163,7 +163,11 @@ VARF(ambient, 0, 0, 0xFFFFFF, if(!noteditmode()) { hdr.ambient = ambient; calcli void calclight() { bvec acol((hdr.ambient>>16)&0xFF, (hdr.ambient>>8)&0xFF, hdr.ambient&0xFF); - if(!acol.x && !acol.y) acol.x = acol.y = acol.z ? acol.z : 10; + if(!acol.x && !acol.y) + { + if(!acol.z) acol.z = 10; + acol.x = acol.y = acol.z; + } else if(!maxtmus) acol.x = acol.y = acol.z = max(max(acol.x, acol.y), acol.z); // the old (white) light code, here for the few people with old video cards that don't support overbright loop(x,ssize) loop(y,ssize) {