mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Only check for zone fields.
This commit is contained in:
parent
cf7d6a2eab
commit
579aec7118
1 changed files with 16 additions and 14 deletions
|
@ -2281,22 +2281,24 @@ bool EntityTree::readFromMap(QVariantMap& map) {
|
|||
properties.setOwningAvatarID(myNodeID);
|
||||
}
|
||||
|
||||
// TEMPORARY fix for older content not containing these fields
|
||||
if (!entityMap.contains("keyLightMode")) {
|
||||
properties.setKeyLightMode(COMPONENT_MODE_ENABLED);
|
||||
}
|
||||
|
||||
if (!entityMap.contains("skyboxMode")) {
|
||||
if (entityMap.contains("backgroundMode") && properties.getBackgroundModeAsString() == "inherit") {
|
||||
// The content creator has set the combo to NOTHING - this is actually inherit
|
||||
properties.setSkyboxMode(COMPONENT_MODE_INHERIT);
|
||||
} else {
|
||||
properties.setSkyboxMode(COMPONENT_MODE_ENABLED);
|
||||
// TEMPORARY fix for older content not containing these fields in the zones
|
||||
if (properties.getType() == EntityTypes::EntityType::Zone) {
|
||||
if (!entityMap.contains("keyLightMode")) {
|
||||
properties.setKeyLightMode(COMPONENT_MODE_ENABLED);
|
||||
}
|
||||
}
|
||||
|
||||
if (!entityMap.contains("ambientLightMode")) {
|
||||
properties.setAmbientLightMode(COMPONENT_MODE_ENABLED);
|
||||
if (!entityMap.contains("skyboxMode")) {
|
||||
if (entityMap.contains("backgroundMode") && properties.getBackgroundModeAsString() == "inherit") {
|
||||
// The content creator has set the combo to NOTHING - this is actually inherit
|
||||
properties.setSkyboxMode(COMPONENT_MODE_INHERIT);
|
||||
} else {
|
||||
properties.setSkyboxMode(COMPONENT_MODE_ENABLED);
|
||||
}
|
||||
}
|
||||
|
||||
if (!entityMap.contains("ambientLightMode")) {
|
||||
properties.setAmbientLightMode(COMPONENT_MODE_ENABLED);
|
||||
}
|
||||
}
|
||||
|
||||
EntityItemPointer entity = addEntity(entityItemID, properties);
|
||||
|
|
Loading…
Reference in a new issue