mirror of
https://github.com/lubosz/overte.git
synced 2025-08-08 03:27:48 +02:00
don't lookup entity when deleting script
This commit is contained in:
parent
8966ab32d8
commit
3262c9a8bd
3 changed files with 6 additions and 15 deletions
2
interface/external/gverb/readme.txt
vendored
2
interface/external/gverb/readme.txt
vendored
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
Instructions for adding the Gverb library to Interface
|
Instructions for adding the Gverb library to Interface
|
||||||
(This is a required library)
|
(This is a required library)
|
||||||
Clément Brisset, October 22nd, 2014
|
Clément Brisset, Octobre 22nd, 2014
|
||||||
|
|
||||||
1. Go to https://github.com/highfidelity/gverb
|
1. Go to https://github.com/highfidelity/gverb
|
||||||
Or download the sources directly via this link:
|
Or download the sources directly via this link:
|
||||||
|
|
|
@ -195,22 +195,14 @@ QScriptValue EntityTreeRenderer::loadEntityScript(EntityItem* entity) {
|
||||||
return entityScriptObject; // newly constructed
|
return entityScriptObject; // newly constructed
|
||||||
}
|
}
|
||||||
|
|
||||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID) {
|
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(const EntityItemID& entityID) {
|
||||||
EntityItem* entity = static_cast<EntityTree*>(_tree)->findEntityByEntityItemID(entityItemID);
|
if (_entityScripts.contains(entityID)) {
|
||||||
return getPreviouslyLoadedEntityScript(entity);
|
EntityScriptDetails details = _entityScripts[entityID];
|
||||||
}
|
return details.scriptObject; // previously loaded
|
||||||
|
|
||||||
|
|
||||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(EntityItem* entity) {
|
|
||||||
if (entity) {
|
|
||||||
EntityItemID entityID = entity->getEntityItemID();
|
|
||||||
if (_entityScripts.contains(entityID)) {
|
|
||||||
EntityScriptDetails details = _entityScripts[entityID];
|
|
||||||
return details.scriptObject; // previously loaded
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return QScriptValue(); // no script
|
return QScriptValue(); // no script
|
||||||
}
|
}
|
||||||
|
|
||||||
void EntityTreeRenderer::setTree(Octree* newTree) {
|
void EntityTreeRenderer::setTree(Octree* newTree) {
|
||||||
OctreeRenderer::setTree(newTree);
|
OctreeRenderer::setTree(newTree);
|
||||||
static_cast<EntityTree*>(_tree)->setFBXService(this);
|
static_cast<EntityTree*>(_tree)->setFBXService(this);
|
||||||
|
|
|
@ -131,7 +131,6 @@ private:
|
||||||
QScriptValue loadEntityScript(EntityItem* entity);
|
QScriptValue loadEntityScript(EntityItem* entity);
|
||||||
QScriptValue loadEntityScript(const EntityItemID& entityItemID);
|
QScriptValue loadEntityScript(const EntityItemID& entityItemID);
|
||||||
QScriptValue getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID);
|
QScriptValue getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID);
|
||||||
QScriptValue getPreviouslyLoadedEntityScript(EntityItem* entity);
|
|
||||||
QString loadScriptContents(const QString& scriptMaybeURLorText);
|
QString loadScriptContents(const QString& scriptMaybeURLorText);
|
||||||
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, QMouseEvent* event, unsigned int deviceID);
|
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, QMouseEvent* event, unsigned int deviceID);
|
||||||
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, const MouseEvent& mouseEvent);
|
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, const MouseEvent& mouseEvent);
|
||||||
|
|
Loading…
Reference in a new issue