mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:38:02 +02:00
fix bug where VoxelEditPacketSender oversends to unknown jurisdictions
This commit is contained in:
parent
fbccd81247
commit
2b604864d6
2 changed files with 8 additions and 3 deletions
|
@ -534,7 +534,8 @@ void VoxelServer::run() {
|
||||||
nodeList->setOwnerType(NODE_TYPE_VOXEL_SERVER);
|
nodeList->setOwnerType(NODE_TYPE_VOXEL_SERVER);
|
||||||
|
|
||||||
// we need to ask the DS about agents so we can ping/reply with them
|
// we need to ask the DS about agents so we can ping/reply with them
|
||||||
nodeList->setNodeTypesOfInterest(&NODE_TYPE_AGENT, 1);
|
const char nodeTypesOfInterest[] = { NODE_TYPE_AGENT, NODE_TYPE_ANIMATION_SERVER};
|
||||||
|
nodeList->setNodeTypesOfInterest(nodeTypesOfInterest, sizeof(nodeTypesOfInterest));
|
||||||
|
|
||||||
setvbuf(stdout, NULL, _IOLBF, 0);
|
setvbuf(stdout, NULL, _IOLBF, 0);
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,12 @@ void VoxelEditPacketSender::queueVoxelEditMessage(PACKET_TYPE type, unsigned cha
|
||||||
if (_voxelServerJurisdictions) {
|
if (_voxelServerJurisdictions) {
|
||||||
// we need to get the jurisdiction for this
|
// we need to get the jurisdiction for this
|
||||||
// here we need to get the "pending packet" for this server
|
// here we need to get the "pending packet" for this server
|
||||||
const JurisdictionMap& map = (*_voxelServerJurisdictions)[nodeUUID];
|
if ((*_voxelServerJurisdictions).find(nodeUUID) != (*_voxelServerJurisdictions).end()) {
|
||||||
isMyJurisdiction = (map.isMyJurisdiction(codeColorBuffer, CHECK_NODE_ONLY) == JurisdictionMap::WITHIN);
|
const JurisdictionMap& map = (*_voxelServerJurisdictions)[nodeUUID];
|
||||||
|
isMyJurisdiction = (map.isMyJurisdiction(codeColorBuffer, CHECK_NODE_ONLY) == JurisdictionMap::WITHIN);
|
||||||
|
} else {
|
||||||
|
isMyJurisdiction = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isMyJurisdiction) {
|
if (isMyJurisdiction) {
|
||||||
EditPacketBuffer& packetBuffer = _pendingEditPackets[nodeUUID];
|
EditPacketBuffer& packetBuffer = _pendingEditPackets[nodeUUID];
|
||||||
|
|
Loading…
Reference in a new issue