mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:44:21 +02:00
carry clientOnly flag over from properties when addEntity is called
This commit is contained in:
parent
f90b9ec65d
commit
de4c9530c9
1 changed files with 4 additions and 1 deletions
|
@ -311,7 +311,9 @@ bool EntityTree::updateEntityWithElement(EntityItemPointer entity, const EntityI
|
|||
EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const EntityItemProperties& properties) {
|
||||
EntityItemPointer result = NULL;
|
||||
|
||||
if (getIsClient()) {
|
||||
bool clientOnly = properties.getClientOnly();
|
||||
|
||||
if (!clientOnly && getIsClient()) {
|
||||
// if our Node isn't allowed to create entities in this domain, don't try.
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
if (nodeList && !nodeList->getThisNodeCanRez()) {
|
||||
|
@ -337,6 +339,7 @@ EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const Enti
|
|||
// construct the instance of the entity
|
||||
EntityTypes::EntityType type = properties.getType();
|
||||
result = EntityTypes::constructEntityItem(type, entityID, properties);
|
||||
result->setClientOnly(clientOnly);
|
||||
|
||||
if (result) {
|
||||
if (recordCreationTime) {
|
||||
|
|
Loading…
Reference in a new issue