mirror of
https://github.com/overte-org/overte.git
synced 2025-08-18 20:13:39 +02:00
whitespace repair
This commit is contained in:
parent
4e2cb00ec3
commit
81255c8379
6 changed files with 8 additions and 18 deletions
|
@ -131,7 +131,7 @@ public:
|
|||
EntityItemID getEntityItemID() const { return EntityItemID(_id); }
|
||||
|
||||
// methods for getting/setting all properties of an entity
|
||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
||||
|
||||
/// returns true if something changed
|
||||
virtual bool setProperties(const EntityItemProperties& properties);
|
||||
|
|
|
@ -105,12 +105,12 @@ EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identit
|
|||
}
|
||||
|
||||
EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identity, EntityPropertyFlags desiredProperties) {
|
||||
EntityItemProperties results;
|
||||
EntityItemProperties results;
|
||||
if (_entityTree) {
|
||||
_entityTree->withReadLock([&] {
|
||||
EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(identity));
|
||||
if (entity) {
|
||||
results = entity->getProperties(desiredProperties);
|
||||
results = entity->getProperties(desiredProperties);
|
||||
|
||||
// TODO: improve sitting points and naturalDimensions in the future,
|
||||
// for now we've included the old sitting points model behavior for entity types that are models
|
||||
|
|
|
@ -119,8 +119,6 @@ bool EntityTree::updateEntityWithElement(EntityItemPointer entity, const EntityI
|
|||
EntityTreeElementPointer containingElement, const SharedNodePointer& senderNode) {
|
||||
EntityItemProperties properties = origProperties;
|
||||
|
||||
qDebug() << "EntityTree::updateEntityWithElement() entity:" << entity->getEntityItemID();
|
||||
|
||||
bool allowLockChange;
|
||||
QUuid senderID;
|
||||
if (senderNode.isNull()) {
|
||||
|
@ -226,10 +224,7 @@ bool EntityTree::updateEntityWithElement(EntityItemPointer entity, const EntityI
|
|||
QString entityScriptAfter = entity->getScript();
|
||||
quint64 entityScriptTimestampAfter = entity->getScriptTimestamp();
|
||||
bool reload = entityScriptTimestampBefore != entityScriptTimestampAfter;
|
||||
qDebug() << "EntityTree::updateEntityWithElement() entityScriptTimestampBefore:" << entityScriptTimestampBefore;
|
||||
qDebug() << "EntityTree::updateEntityWithElement() entityScriptTimestampAfter:" << entityScriptTimestampAfter;
|
||||
qDebug() << "EntityTree::updateEntityWithElement() reload:" << reload;
|
||||
if (entityScriptBefore != entityScriptAfter || reload) {
|
||||
if (entityScriptBefore != entityScriptAfter || reload) {
|
||||
emitEntityScriptChanging(entity->getEntityItemID(), reload); // the entity script has changed
|
||||
}
|
||||
maybeNotifyNewCollisionSoundURL(collisionSoundURLBefore, entity->getCollisionSoundURL());
|
||||
|
@ -290,7 +285,6 @@ EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const Enti
|
|||
}
|
||||
|
||||
void EntityTree::emitEntityScriptChanging(const EntityItemID& entityItemID, const bool reload) {
|
||||
qDebug() << "EntityTree::emitEntityScriptChanging(entityItemID:" << entityItemID << ", reload:" << reload<<")";
|
||||
emit entityScriptChanging(entityItemID, reload);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ ScriptCache::ScriptCache(QObject* parent) {
|
|||
}
|
||||
|
||||
void ScriptCache::clearCache() {
|
||||
_scriptCache.clear();
|
||||
_scriptCache.clear();
|
||||
}
|
||||
|
||||
QString ScriptCache::getScript(const QUrl& unnormalizedURL, ScriptUser* scriptUser, bool& isPending, bool reload) {
|
||||
|
@ -99,8 +99,6 @@ void ScriptCache::getScriptContents(const QString& scriptOrURL, contentAvailable
|
|||
return;
|
||||
}
|
||||
|
||||
qCDebug(scriptengine) << "ScriptCache::getScriptContents() scriptOrURL:" << scriptOrURL << " forceDownload:" << forceDownload << " on thread[" << QThread::currentThread() << "] expected thread[" << thread() << "]";
|
||||
|
||||
if (_scriptCache.contains(url) && !forceDownload) {
|
||||
qCDebug(scriptengine) << "Found script in cache:" << url.toString();
|
||||
#if 1 // def THREAD_DEBUGGING
|
||||
|
|
|
@ -910,9 +910,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
|
|||
qDebug() << "ScriptEngine::loadEntityScript() calling scriptCache->getScriptContents() on thread [" << QThread::currentThread() << "] expected thread [" << thread() << "]";
|
||||
#endif
|
||||
|
||||
qDebug() << "ScriptEngine::loadEntityScript() calling scriptCache->getScriptContents() scriptOrURL:" << entityScript << "forceDownload:" << forceRedownload << "on thread[" << QThread::currentThread() << "] expected thread[" << thread() << "]";
|
||||
|
||||
DependencyManager::get<ScriptCache>()->getScriptContents(entityScript, [=](const QString& scriptOrURL, const QString& contents, bool isURL, bool success) {
|
||||
DependencyManager::get<ScriptCache>()->getScriptContents(entityScript, [=](const QString& scriptOrURL, const QString& contents, bool isURL, bool success) {
|
||||
#ifdef THREAD_DEBUGGING
|
||||
qDebug() << "ScriptEngine::entityScriptContentAvailable() IN LAMBDA contentAvailable on thread [" << QThread::currentThread() << "] expected thread [" << thread() << "]";
|
||||
#endif
|
||||
|
|
|
@ -109,8 +109,8 @@ public:
|
|||
// Entity Script Related methods
|
||||
Q_INVOKABLE void loadEntityScript(const EntityItemID& entityID, const QString& entityScript, bool forceRedownload = false); // will call the preload method once loaded
|
||||
Q_INVOKABLE void unloadEntityScript(const EntityItemID& entityID); // will call unload method
|
||||
Q_INVOKABLE void unloadAllEntityScripts();
|
||||
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName);
|
||||
Q_INVOKABLE void unloadAllEntityScripts();
|
||||
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName);
|
||||
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const MouseEvent& event);
|
||||
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName, const EntityItemID& otherID, const Collision& collision);
|
||||
|
||||
|
|
Loading…
Reference in a new issue