move some of the node interest additions to correct spots

This commit is contained in:
Stephen Birarda 2014-01-22 16:23:24 -08:00
parent ec04d5450b
commit 6979135fe3
6 changed files with 11 additions and 6 deletions

View file

@ -52,11 +52,7 @@ void Agent::run() {
NodeList* nodeList = NodeList::getInstance();
nodeList->setOwnerType(NODE_TYPE_AGENT);
// XXXBHG - this seems less than ideal. There might be classes (like jurisdiction listeners, that need access to
// other node types, but for them to get access to those node types, we have to add them here. It seems like
// NodeList should support adding types of interest
nodeList->addSetOfNodeTypesToNodeInterestSet(QSet<NODE_TYPE>() << NODE_TYPE_VOXEL_SERVER << NODE_TYPE_PARTICLE_SERVER
<< NODE_TYPE_AUDIO_MIXER << NODE_TYPE_AVATAR_MIXER);
nodeList->addSetOfNodeTypesToNodeInterestSet(QSet<NODE_TYPE>() << NODE_TYPE_AUDIO_MIXER << NODE_TYPE_AVATAR_MIXER);
// figure out the URL for the script for this agent assignment
QString scriptURLString("http://%1:8080/assignment/%2");

View file

@ -569,7 +569,7 @@ void OctreeServer::run() {
nodeList->setOwnerType(getMyNodeType());
// we need to ask the DS about agents so we can ping/reply with them
nodeList->addSetOfNodeTypesToNodeInterestSet(QSet<NODE_TYPE>() << NODE_TYPE_AGENT << NODE_TYPE_ANIMATION_SERVER);
nodeList->addNodeTypeToInterestSet(NODE_TYPE_AGENT);
setvbuf(stdout, NULL, _IOLBF, 0);

View file

@ -13,6 +13,7 @@ ParticlesScriptingInterface::ParticlesScriptingInterface() :
_nextCreatorTokenID(0),
_particleTree(NULL)
{
NodeList::getInstance()->addNodeTypeToInterestSet(NODE_TYPE_PARTICLE_SERVER);
}

View file

@ -68,4 +68,6 @@ void VoxelServer::beforeRun() {
qDebug("Using Minimal Environment=%s", debug::valueOf(_sendMinimalEnvironment));
}
qDebug("Sending environments=%s", debug::valueOf(_sendEnvironments));
NodeList::getInstance()->addNodeTypeToInterestSet(NODE_TYPE_ANIMATION_SERVER);
}

View file

@ -8,6 +8,10 @@
#include "VoxelsScriptingInterface.h"
VoxelsScriptingInterface::VoxelsScriptingInterface() {
NodeList::getInstance()->addNodeTypeToInterestSet(NODE_TYPE_VOXEL_SERVER);
}
void VoxelsScriptingInterface::queueVoxelAdd(PACKET_TYPE addPacketType, VoxelDetail& addVoxelDetails) {
getVoxelPacketSender()->queueVoxelEditMessages(addPacketType, 1, &addVoxelDetails);
}

View file

@ -20,6 +20,8 @@
class VoxelsScriptingInterface : public OctreeScriptingInterface {
Q_OBJECT
public:
VoxelsScriptingInterface();
VoxelEditPacketSender* getVoxelPacketSender() { return (VoxelEditPacketSender*)getPacketSender(); }
virtual NODE_TYPE getServerNodeType() const { return NODE_TYPE_VOXEL_SERVER; }