mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
set last-edited in properties when changing voxel data
This commit is contained in:
parent
5acc018bda
commit
6b5020285b
2 changed files with 7 additions and 7 deletions
|
@ -37,11 +37,11 @@ void EntityEditPacketSender::queueEditEntityMessage(PacketType type, EntityItemI
|
|||
int sizeOut = 0;
|
||||
|
||||
if (EntityItemProperties::encodeEntityEditPacket(type, modelID, properties, &bufferOut[0], _maxPacketSize, sizeOut)) {
|
||||
#ifdef WANT_DEBUG
|
||||
//#ifdef WANT_DEBUG
|
||||
qCDebug(entities) << "calling queueOctreeEditMessage()...";
|
||||
qCDebug(entities) << " id:" << modelID;
|
||||
qCDebug(entities) << " properties:" << properties;
|
||||
#endif
|
||||
//#endif
|
||||
queueOctreeEditMessage(type, bufferOut, sizeOut);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -399,10 +399,13 @@ bool EntityScriptingInterface::setVoxelSphere(QUuid entityID, const glm::vec3& c
|
|||
return false;
|
||||
}
|
||||
|
||||
auto now = usecTimestampNow();
|
||||
|
||||
PolyVoxEntityItem* polyVoxEntity = static_cast<PolyVoxEntityItem*>(entity);
|
||||
_entityTree->lockForWrite();
|
||||
polyVoxEntity->setSphere(center, radius, value);
|
||||
// entity->setLastEdited(usecTimestampNow());
|
||||
entity->setLastEdited(now);
|
||||
entity->setLastBroadcast(now);
|
||||
_entityTree->unlock();
|
||||
|
||||
_entityTree->lockForRead();
|
||||
|
@ -410,10 +413,7 @@ bool EntityScriptingInterface::setVoxelSphere(QUuid entityID, const glm::vec3& c
|
|||
_entityTree->unlock();
|
||||
|
||||
properties.setVoxelDataDirty();
|
||||
|
||||
entity->setLastBroadcast(usecTimestampNow());
|
||||
// modifiedProperties.setType(entity->getType());
|
||||
// bidForSimulationOwnership(modifiedProperties);
|
||||
properties.setLastEdited(now);
|
||||
|
||||
queueEntityMessage(PacketTypeEntityEdit, entityID, properties);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue