don't attempt to go to user without domain AND position

This commit is contained in:
Stephen Birarda 2013-10-10 16:48:26 -07:00
parent 081f2da785
commit 2c181011b3

View file

@ -148,16 +148,18 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
}
}
}
} else if (keyList[i] == DataServerKey::Domain) {
qDebug() << "Changing domain hostname to" << valueList[i].toLocal8Bit().constData() <<
"to go to" << userString << "\n";
NodeList::getInstance()->setDomainHostname(valueList[i]);
} else if (keyList[i] == DataServerKey::Position) {
QStringList coordinateItems = valueList[i].split(',');
} else if (keyList[i] == DataServerKey::Domain && keyList[i + 1] == DataServerKey::Position
&& valueList[i] != " " && valueList[i + 1] != " ") {
QStringList coordinateItems = valueList[i + 1].split(',');
if (coordinateItems.size() == 3) {
qDebug() << "Changing position to" << valueList[i].toLocal8Bit().constData() <<
"to go to" << userString << "\n";
qDebug() << "Changing domain to" << valueList[i].toLocal8Bit().constData() <<
"and position to" << valueList[i + 1].toLocal8Bit().constData() <<
"to go to" << userString << "\n";
NodeList::getInstance()->setDomainHostname(valueList[i]);
glm::vec3 newPosition(coordinateItems[0].toFloat(),
coordinateItems[1].toFloat(),
@ -165,7 +167,6 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int
Application::getInstance()->getAvatar()->setPosition(newPosition);
}
} else if (keyList[i] == DataServerKey::UUID) {
// this is the user's UUID - set it on the profile
Application::getInstance()->getProfile()->setUUID(valueList[0]);