mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Don't change apply zone logic
This commit is contained in:
parent
5e41421f9d
commit
911375b7a1
1 changed files with 14 additions and 14 deletions
|
@ -261,24 +261,24 @@ void EntityTreeRenderer::applyZonePropertiesToScene(std::shared_ptr<ZoneEntityIt
|
|||
auto sceneLocation = sceneStage->getLocation();
|
||||
auto sceneTime = sceneStage->getTime();
|
||||
auto backgroundMode = BACKGROUND_MODE_INHERIT; // Default
|
||||
|
||||
if (!_hasPreviousZone) {
|
||||
_previousKeyLightColor = sceneKeyLight->getColor();
|
||||
_previousKeyLightIntensity = sceneKeyLight->getIntensity();
|
||||
_previousKeyLightAmbientIntensity = sceneKeyLight->getAmbientIntensity();
|
||||
_previousKeyLightDirection = sceneKeyLight->getDirection();
|
||||
_previousStageSunModelEnabled = sceneStage->isSunModelEnabled();
|
||||
_previousStageLongitude = sceneLocation->getLongitude();
|
||||
_previousStageLatitude = sceneLocation->getLatitude();
|
||||
_previousStageAltitude = sceneLocation->getAltitude();
|
||||
_previousStageHour = sceneTime->getHour();
|
||||
_previousStageDay = sceneTime->getDay();
|
||||
_hasPreviousZone = true;
|
||||
}
|
||||
|
||||
if (zone) {
|
||||
backgroundMode = zone->getBackgroundMode();
|
||||
|
||||
if (!_hasPreviousZone) {
|
||||
_previousKeyLightColor = sceneKeyLight->getColor();
|
||||
_previousKeyLightIntensity = sceneKeyLight->getIntensity();
|
||||
_previousKeyLightAmbientIntensity = sceneKeyLight->getAmbientIntensity();
|
||||
_previousKeyLightDirection = sceneKeyLight->getDirection();
|
||||
_previousStageSunModelEnabled = sceneStage->isSunModelEnabled();
|
||||
_previousStageLongitude = sceneLocation->getLongitude();
|
||||
_previousStageLatitude = sceneLocation->getLatitude();
|
||||
_previousStageAltitude = sceneLocation->getAltitude();
|
||||
_previousStageHour = sceneTime->getHour();
|
||||
_previousStageDay = sceneTime->getDay();
|
||||
_hasPreviousZone = true;
|
||||
}
|
||||
|
||||
sceneKeyLight->setColor(ColorUtils::toVec3(zone->getKeyLightProperties().getColor()));
|
||||
sceneKeyLight->setIntensity(zone->getKeyLightProperties().getIntensity());
|
||||
sceneKeyLight->setAmbientIntensity(zone->getKeyLightProperties().getAmbientIntensity());
|
||||
|
|
Loading…
Reference in a new issue