CR feedback

This commit is contained in:
Thijs Wenker 2018-05-21 06:04:05 +02:00
parent 70bbac5c83
commit f4df75d016
2 changed files with 5 additions and 8 deletions

View file

@ -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;
}

View file

@ -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));
}
}