History

Merge pull request #15201 from SamGondelman/emit

Case 21756: Entities.emitScriptEvent works now

Sam Gondelman committed 7 years ago

Commit 40f5a022 parents 385970c d4e1ec98 files · +21 −12Browse files

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

Unified · Split

libraries/entities/src/EntityScriptingInterface.cpp+1−8
@@ -2196,14 +2196,7 @@ bool EntityScriptingInterface::wantsHandControllerPointerEvents(const QUuid& id) · 2195 unmodified lines
21962196 }
21972197
21982198 void EntityScriptingInterface::emitScriptEvent(const EntityItemID& entityID, const QVariant& message) {
2199− if (_entityTree) {
2200− _entityTree->withReadLock([&] {
2201− EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(entityID));
2202− if (entity) {
2203− entity->emitScriptEvent(message);
2204− }
2205− });
2206− }
2199+ EntityTree::emitScriptEvent(entityID, message);
22072200 }
22082201
22092202 // TODO move this someplace that makes more sense...

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t