mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 07:23:00 +02:00
don't listen to VS packets not from current VS
This commit is contained in:
parent
45d82dc97c
commit
a00b95666a
1 changed files with 2 additions and 11 deletions
|
@ -1148,12 +1148,8 @@ void Application::editPreferences() {
|
||||||
|
|
||||||
// check if the domain server hostname is new
|
// check if the domain server hostname is new
|
||||||
if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, strlen(newHostname)) != 0) {
|
if (memcmp(NodeList::getInstance()->getDomainHostname(), newHostname, strlen(newHostname)) != 0) {
|
||||||
// if so we need to clear the nodelist and delete the existing voxel and environment data
|
|
||||||
Node *voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER);
|
|
||||||
|
|
||||||
if (voxelServer) {
|
NodeList::getInstance()->clear();
|
||||||
voxelServer->lock();
|
|
||||||
}
|
|
||||||
|
|
||||||
// kill the local voxels
|
// kill the local voxels
|
||||||
_voxels.killLocalVoxels();
|
_voxels.killLocalVoxels();
|
||||||
|
@ -1161,11 +1157,6 @@ void Application::editPreferences() {
|
||||||
// reset the environment to default
|
// reset the environment to default
|
||||||
_environment.resetToDefault();
|
_environment.resetToDefault();
|
||||||
|
|
||||||
if (voxelServer) {
|
|
||||||
voxelServer->unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
NodeList::getInstance()->clear();
|
|
||||||
NodeList::getInstance()->setDomainHostname(newHostname);
|
NodeList::getInstance()->setDomainHostname(newHostname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3356,7 +3347,7 @@ void* Application::networkReceive(void* args) {
|
||||||
case PACKET_TYPE_ENVIRONMENT_DATA: {
|
case PACKET_TYPE_ENVIRONMENT_DATA: {
|
||||||
if (app->_renderVoxels->isChecked()) {
|
if (app->_renderVoxels->isChecked()) {
|
||||||
Node* voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER);
|
Node* voxelServer = NodeList::getInstance()->soloNodeOfType(NODE_TYPE_VOXEL_SERVER);
|
||||||
if (voxelServer) {
|
if (voxelServer && socketMatch(voxelServer->getActiveSocket(), &senderAddress)) {
|
||||||
voxelServer->lock();
|
voxelServer->lock();
|
||||||
|
|
||||||
if (app->_incomingPacket[0] == PACKET_TYPE_ENVIRONMENT_DATA) {
|
if (app->_incomingPacket[0] == PACKET_TYPE_ENVIRONMENT_DATA) {
|
||||||
|
|
Loading…
Reference in a new issue