mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
first part of getting local particle tree in agent
This commit is contained in:
parent
62b7e6e58d
commit
c5ba92d73e
2 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,9 @@ void Agent::processDatagram(const QByteArray& dataByteArray, const HifiSockAddr&
|
|||
dataByteArray.size());
|
||||
break;
|
||||
}
|
||||
} else if (dataByteArray[0] == PACKET_TYPE_PARTICLE_ADD_RESPONSE) {
|
||||
// this will keep creatorTokenIDs to IDs mapped correctly
|
||||
Particle::handleAddParticleResponse((unsigned char*) dataByteArray.data(), dataByteArray.size());
|
||||
} else {
|
||||
NodeList::getInstance()->processNodeData(senderSockAddr, (unsigned char*) dataByteArray.data(), dataByteArray.size());
|
||||
}
|
||||
|
@ -88,6 +91,9 @@ void Agent::run() {
|
|||
connect(pingNodesTimer, SIGNAL(timeout()), nodeList, SLOT(pingInactiveNodes()));
|
||||
pingNodesTimer->start(PING_INACTIVE_NODE_INTERVAL_USECS / 1000);
|
||||
|
||||
// tell our script engine about our local particle tree
|
||||
_scriptEngine.getParticlesScriptingInterface()->setParticleTree(&_particleTree);
|
||||
|
||||
// setup an Avatar for the script to use
|
||||
AvatarData scriptedAvatar;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#include <QtCore/QObject>
|
||||
#include <QtCore/QUrl>
|
||||
|
||||
#include <ParticleTree.h>
|
||||
#include <ScriptEngine.h>
|
||||
#include <ThreadedAssignment.h>
|
||||
|
||||
|
@ -32,6 +33,7 @@ signals:
|
|||
void willSendVisualDataCallback();
|
||||
private:
|
||||
ScriptEngine _scriptEngine;
|
||||
ParticleTree _particleTree;
|
||||
};
|
||||
|
||||
#endif /* defined(__hifi__Agent__) */
|
||||
|
|
Loading…
Reference in a new issue