mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 13:12:39 +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
|
||||
(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
|
||||
Or download the sources directly via this link:
|
||||
|
|
|
@ -195,22 +195,14 @@ QScriptValue EntityTreeRenderer::loadEntityScript(EntityItem* entity) {
|
|||
return entityScriptObject; // newly constructed
|
||||
}
|
||||
|
||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID) {
|
||||
EntityItem* entity = static_cast<EntityTree*>(_tree)->findEntityByEntityItemID(entityItemID);
|
||||
return getPreviouslyLoadedEntityScript(entity);
|
||||
}
|
||||
|
||||
|
||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(EntityItem* entity) {
|
||||
if (entity) {
|
||||
EntityItemID entityID = entity->getEntityItemID();
|
||||
if (_entityScripts.contains(entityID)) {
|
||||
EntityScriptDetails details = _entityScripts[entityID];
|
||||
return details.scriptObject; // previously loaded
|
||||
}
|
||||
QScriptValue EntityTreeRenderer::getPreviouslyLoadedEntityScript(const EntityItemID& entityID) {
|
||||
if (_entityScripts.contains(entityID)) {
|
||||
EntityScriptDetails details = _entityScripts[entityID];
|
||||
return details.scriptObject; // previously loaded
|
||||
}
|
||||
return QScriptValue(); // no script
|
||||
}
|
||||
|
||||
void EntityTreeRenderer::setTree(Octree* newTree) {
|
||||
OctreeRenderer::setTree(newTree);
|
||||
static_cast<EntityTree*>(_tree)->setFBXService(this);
|
||||
|
|
|
@ -131,7 +131,6 @@ private:
|
|||
QScriptValue loadEntityScript(EntityItem* entity);
|
||||
QScriptValue loadEntityScript(const EntityItemID& entityItemID);
|
||||
QScriptValue getPreviouslyLoadedEntityScript(const EntityItemID& entityItemID);
|
||||
QScriptValue getPreviouslyLoadedEntityScript(EntityItem* entity);
|
||||
QString loadScriptContents(const QString& scriptMaybeURLorText);
|
||||
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, QMouseEvent* event, unsigned int deviceID);
|
||||
QScriptValueList createMouseEventArgs(const EntityItemID& entityID, const MouseEvent& mouseEvent);
|
||||
|
|
Loading…
Reference in a new issue