mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-04 00:41:17 +02:00
fix issue with voxel server getting duplicate nodes
This commit is contained in:
parent
5897ff37c0
commit
a0c3df048c
1 changed files with 2 additions and 6 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
#include <OctalCode.h>
|
#include <OctalCode.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
#include <NodeTypes.h>
|
#include <NodeTypes.h>
|
||||||
|
@ -20,7 +21,6 @@
|
||||||
#include <PacketHeaders.h>
|
#include <PacketHeaders.h>
|
||||||
#include <SceneUtils.h>
|
#include <SceneUtils.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
|
|
||||||
#include <JurisdictionSender.h>
|
#include <JurisdictionSender.h>
|
||||||
|
|
||||||
#include "VoxelPersistThread.h"
|
#include "VoxelPersistThread.h"
|
||||||
|
@ -421,9 +421,6 @@ int main(int argc, const char * argv[]) {
|
||||||
NodeList* nodeList = NodeList::createInstance(NODE_TYPE_VOXEL_SERVER, listenPort);
|
NodeList* nodeList = NodeList::createInstance(NODE_TYPE_VOXEL_SERVER, listenPort);
|
||||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||||
|
|
||||||
const NODE_TYPE nodeTypes[] = { NODE_TYPE_AGENT, NODE_TYPE_ANIMATION_SERVER };
|
|
||||||
NodeList::getInstance()->setNodeTypesOfInterest(&nodeTypes[0], sizeof(nodeTypes));
|
|
||||||
|
|
||||||
// Handle Local Domain testing with the --local command line
|
// Handle Local Domain testing with the --local command line
|
||||||
const char* local = "--local";
|
const char* local = "--local";
|
||||||
::wantLocalDomain = cmdOptionExists(argc, argv,local);
|
::wantLocalDomain = cmdOptionExists(argc, argv,local);
|
||||||
|
@ -575,14 +572,13 @@ int main(int argc, const char * argv[]) {
|
||||||
if (packetData[0] == PACKET_TYPE_HEAD_DATA) {
|
if (packetData[0] == PACKET_TYPE_HEAD_DATA) {
|
||||||
// If we got a PACKET_TYPE_HEAD_DATA, then we're talking to an NODE_TYPE_AVATAR, and we
|
// If we got a PACKET_TYPE_HEAD_DATA, then we're talking to an NODE_TYPE_AVATAR, and we
|
||||||
// need to make sure we have it in our nodeList.
|
// need to make sure we have it in our nodeList.
|
||||||
|
|
||||||
uint16_t nodeID = 0;
|
uint16_t nodeID = 0;
|
||||||
unpackNodeId(packetData + numBytesPacketHeader, &nodeID);
|
unpackNodeId(packetData + numBytesPacketHeader, &nodeID);
|
||||||
Node* node = NodeList::getInstance()->addOrUpdateNode(&senderAddress,
|
Node* node = NodeList::getInstance()->addOrUpdateNode(&senderAddress,
|
||||||
&senderAddress,
|
&senderAddress,
|
||||||
NODE_TYPE_AGENT,
|
NODE_TYPE_AGENT,
|
||||||
nodeID);
|
nodeID);
|
||||||
|
|
||||||
NodeList::getInstance()->updateNodeWithData(node, packetData, packetLength);
|
NodeList::getInstance()->updateNodeWithData(node, packetData, packetLength);
|
||||||
} else if (packetData[0] == PACKET_TYPE_PING) {
|
} else if (packetData[0] == PACKET_TYPE_PING) {
|
||||||
// If the packet is a ping, let processNodeData handle it.
|
// If the packet is a ping, let processNodeData handle it.
|
||||||
|
|
Loading…
Reference in a new issue