From 197c8989766c84478e7bbb6b93dbbdb1253731f5 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Wed, 27 Jul 2016 12:37:57 -0600 Subject: [PATCH] light: hack to allow "-dirt 0" to disable all dirmapping (todo: check -dirt 1 implies minlight, sunlight dirt properly?) --- light/ltface.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/light/ltface.cc b/light/ltface.cc index bfdaf489..819ad5d3 100644 --- a/light/ltface.cc +++ b/light/ltface.cc @@ -1767,6 +1767,13 @@ void SetupDirt( void ) { // check if needed + if (!globalDirt.boolValue() + && globalDirt.isLocked()) { + // HACK: "-dirt 0" disables all dirtmapping even if we would otherwise use it. + dirt_in_use = false; + return; + } + if (globalDirt.boolValue() || minlightDirt.boolValue() || sunlight_dirt.boolValue()