mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
CR feedback
This commit is contained in:
parent
70bbac5c83
commit
f4df75d016
2 changed files with 5 additions and 8 deletions
|
@ -293,8 +293,7 @@ bool EntityScriptingInterface::addLocalEntityCopy(EntityItemProperties& properti
|
|||
// since we're creating this object we will immediately volunteer to own its simulation
|
||||
entity->flagForOwnershipBid(VOLUNTEER_SIMULATION_PRIORITY);
|
||||
properties.setLastEdited(entity->getLastEdited());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
qCDebug(entities) << "script failed to add new Entity to local Octree";
|
||||
success = false;
|
||||
}
|
||||
|
|
|
@ -1428,8 +1428,8 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
|
|||
|
||||
case PacketType::EntityClone:
|
||||
isClone = true; // fall through to next case
|
||||
case PacketType::EntityAdd:
|
||||
// FALLTHRU
|
||||
case PacketType::EntityAdd:
|
||||
isAdd = true; // fall through to next case
|
||||
// FALLTHRU
|
||||
case PacketType::EntityPhysics:
|
||||
|
@ -2490,12 +2490,10 @@ bool EntityTree::readFromMap(QVariantMap& map) {
|
|||
}
|
||||
}
|
||||
|
||||
for (auto iter = cloneIDs.begin(); iter != cloneIDs.end(); ++iter) {
|
||||
const QUuid& entityID = iter.key();
|
||||
const QVector<QUuid>& cloneIDs = iter.value();
|
||||
EntityItemPointer entity = findEntityByID(entityID);
|
||||
for (const auto& entityID : cloneIDs.keys()) {
|
||||
auto entity = findEntityByID(entityID);
|
||||
if (entity) {
|
||||
entity->setCloneIDs(cloneIDs);
|
||||
entity->setCloneIDs(cloneIDs.value(entityID));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue