History

back out previous attempt at theading polyvox code. lay groundwork for threading that can be reasoned about

Seth Alves committed 11 years ago

Commit dc31c7e1 parent 92c1d626 files · +548 −623Browse files

Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+0−13
@@ -431,23 +431,10 @@ bool EntityScriptingInterface::setVoxels(QUuid entityID, · 430 unmodified lines
431 return false;431 return false;
432 }432 }
433 433
434 auto now = usecTimestampNow();
435
436 auto polyVoxEntity = std::dynamic_pointer_cast<PolyVoxEntityItem>(entity);434 auto polyVoxEntity = std::dynamic_pointer_cast<PolyVoxEntityItem>(entity);
437 _entityTree->lockForWrite();435 _entityTree->lockForWrite();
438 bool result = actor(*polyVoxEntity);436 bool result = actor(*polyVoxEntity);
439 entity->setLastEdited(now);
440 entity->setLastBroadcast(now);
441 _entityTree->unlock();
442
443 _entityTree->lockForRead();
444 EntityItemProperties properties = entity->getProperties();
445 _entityTree->unlock();437 _entityTree->unlock();
446
447 properties.setVoxelDataDirty();
448 properties.setLastEdited(now);
449
450 queueEntityMessage(PacketType::EntityEdit, entityID, properties);
451 return result;438 return result;
452}439}
453 440