History

first cut at client scripts working

ZappoMan committed 12 years ago

Commit dacaade1 parent c2d5acc3 files · +43 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+12−4
@@ -4426,14 +4426,22 @@ void Application::loadScript() { · 4425 unmodified lines
44264426 // start the script on a new thread...
44274427 _scriptEngine = new ScriptEngine(script);
44284428
4429+ // setup the packet senders and jurisdiction listeners of the script engine's scripting interfaces so
4430+ // we can use the same ones from the application.
4431+ _scriptEngine->getVoxelScriptingInterface()->setPacketSender(&_voxelEditSender);
4432+ _scriptEngine->getParticleScriptingInterface()->setPacketSender(&_particleEditSender);
4433+
4434+ //_scriptEngine->getVoxelScriptingInterface()->setJurisdictionListener();
4435+ //_scriptEngine->getParticleScriptingInterface()->setJurisdictionListener();
4436+
44294437 QThread* workerThread = new QThread(this);
44304438
44314439 connect(workerThread, SIGNAL(started()), _scriptEngine, SLOT(run()));
44324440
4433− connect(_scriptEngine, SIGNAL(finished()), this, SLOT(assignmentCompleted()));
4434− connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(quit()));
4435− connect(_scriptEngine, SIGNAL(finished()), _scriptEngine, SLOT(deleteLater()));
4436− connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(deleteLater()));
4441+ //connect(_scriptEngine, SIGNAL(finished()), this, SLOT(assignmentCompleted()));
4442+ //connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(quit()));
4443+ //connect(_scriptEngine, SIGNAL(finished()), _scriptEngine, SLOT(deleteLater()));
4444+ //connect(_scriptEngine, SIGNAL(finished()), workerThread, SLOT(deleteLater()));
44374445
44384446 _scriptEngine->moveToThread(workerThread);
44394447

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