Don't change apply zone logic

This commit is contained in:
Atlante45 2016-01-12 10:50:41 -08:00
parent 5e41421f9d
commit 911375b7a1

View file

@ -262,6 +262,9 @@ void EntityTreeRenderer::applyZonePropertiesToScene(std::shared_ptr<ZoneEntityIt
auto sceneTime = sceneStage->getTime();
auto backgroundMode = BACKGROUND_MODE_INHERIT; // Default
if (zone) {
backgroundMode = zone->getBackgroundMode();
if (!_hasPreviousZone) {
_previousKeyLightColor = sceneKeyLight->getColor();
_previousKeyLightIntensity = sceneKeyLight->getIntensity();
@ -276,9 +279,6 @@ void EntityTreeRenderer::applyZonePropertiesToScene(std::shared_ptr<ZoneEntityIt
_hasPreviousZone = true;
}
if (zone) {
backgroundMode = zone->getBackgroundMode();
sceneKeyLight->setColor(ColorUtils::toVec3(zone->getKeyLightProperties().getColor()));
sceneKeyLight->setIntensity(zone->getKeyLightProperties().getIntensity());
sceneKeyLight->setAmbientIntensity(zone->getKeyLightProperties().getAmbientIntensity());