Corrected behaviour of skybox modes.

This commit is contained in:
Nissim Hadar 2017-12-30 18:19:42 -08:00
parent fb59da5fb3
commit 0764e80996

View file

@ -183,7 +183,7 @@ void ZoneEntityRenderer::doRender(RenderArgs* args) {
if (_skyboxMode == COMPONENT_MODE_DISABLED && _skyboxOnIndex == NO_STORED_VALUE) {
// Just turned off, store previous value before changing
_skyboxOnIndex = _backgroundIndex;
_backgroundIndex = _stage->getSunOffLight();
_backgroundIndex = INVALID_INDEX;
} else if (_skyboxMode == COMPONENT_MODE_ENABLED && _skyboxOnIndex != NO_STORED_VALUE) {
// Just turned on, restore previous value before clearing stored value
_backgroundIndex = _skyboxOnIndex;