mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 19:01:54 +02:00
cleanup node type check in JL
This commit is contained in:
parent
771021995b
commit
eef6fd53eb
1 changed files with 4 additions and 10 deletions
|
@ -46,16 +46,10 @@ bool JurisdictionListener::queueJurisdictionRequest() {
|
|||
|
||||
NodeList* nodeList = NodeList::getInstance();
|
||||
for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {
|
||||
|
||||
// only send to the NodeTypes that are interested in our jurisdiction details
|
||||
const int numNodeTypes = 1;
|
||||
const NODE_TYPE nodeTypes[numNodeTypes] = { NODE_TYPE_VOXEL_SERVER };
|
||||
if (nodeList->getNodeActiveSocketOrPing(&(*node))) {
|
||||
if (memchr(nodeTypes, node->getType(), numNodeTypes)) {
|
||||
sockaddr* nodeAddress = node->getActiveSocket();
|
||||
PacketSender::queuePacketForSending(*nodeAddress, bufferOut, sizeOut);
|
||||
nodeCount++;
|
||||
}
|
||||
if (nodeList->getNodeActiveSocketOrPing(&(*node)) && node->getType() == NODE_TYPE_VOXEL_SERVER) {
|
||||
sockaddr* nodeAddress = node->getActiveSocket();
|
||||
PacketSender::queuePacketForSending(*nodeAddress, bufferOut, sizeOut);
|
||||
nodeCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue