mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 13:49:17 +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;
|
int sizeOut = 0;
|
||||||
|
|
||||||
if (EntityItemProperties::encodeEntityEditPacket(type, modelID, properties, &bufferOut[0], _maxPacketSize, sizeOut)) {
|
if (EntityItemProperties::encodeEntityEditPacket(type, modelID, properties, &bufferOut[0], _maxPacketSize, sizeOut)) {
|
||||||
#ifdef WANT_DEBUG
|
//#ifdef WANT_DEBUG
|
||||||
qCDebug(entities) << "calling queueOctreeEditMessage()...";
|
qCDebug(entities) << "calling queueOctreeEditMessage()...";
|
||||||
qCDebug(entities) << " id:" << modelID;
|
qCDebug(entities) << " id:" << modelID;
|
||||||
qCDebug(entities) << " properties:" << properties;
|
qCDebug(entities) << " properties:" << properties;
|
||||||
#endif
|
//#endif
|
||||||
queueOctreeEditMessage(type, bufferOut, sizeOut);
|
queueOctreeEditMessage(type, bufferOut, sizeOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,10 +399,13 @@ bool EntityScriptingInterface::setVoxelSphere(QUuid entityID, const glm::vec3& c
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto now = usecTimestampNow();
|
||||||
|
|
||||||
PolyVoxEntityItem* polyVoxEntity = static_cast<PolyVoxEntityItem*>(entity);
|
PolyVoxEntityItem* polyVoxEntity = static_cast<PolyVoxEntityItem*>(entity);
|
||||||
_entityTree->lockForWrite();
|
_entityTree->lockForWrite();
|
||||||
polyVoxEntity->setSphere(center, radius, value);
|
polyVoxEntity->setSphere(center, radius, value);
|
||||||
// entity->setLastEdited(usecTimestampNow());
|
entity->setLastEdited(now);
|
||||||
|
entity->setLastBroadcast(now);
|
||||||
_entityTree->unlock();
|
_entityTree->unlock();
|
||||||
|
|
||||||
_entityTree->lockForRead();
|
_entityTree->lockForRead();
|
||||||
|
@ -410,10 +413,7 @@ bool EntityScriptingInterface::setVoxelSphere(QUuid entityID, const glm::vec3& c
|
||||||
_entityTree->unlock();
|
_entityTree->unlock();
|
||||||
|
|
||||||
properties.setVoxelDataDirty();
|
properties.setVoxelDataDirty();
|
||||||
|
properties.setLastEdited(now);
|
||||||
entity->setLastBroadcast(usecTimestampNow());
|
|
||||||
// modifiedProperties.setType(entity->getType());
|
|
||||||
// bidForSimulationOwnership(modifiedProperties);
|
|
||||||
|
|
||||||
queueEntityMessage(PacketTypeEntityEdit, entityID, properties);
|
queueEntityMessage(PacketTypeEntityEdit, entityID, properties);
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue