Showing the changes to interface/src/DataServerClient.cpp (1 of 1 file). Show all
Unified · Split
| @@ -148,16 +148,18 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int · 147 unmodified lines | ||
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | − } else if (keyList[i] == DataServerKey::Domain) { | |
| 152 | − qDebug() << "Changing domain hostname to" << valueList[i].toLocal8Bit().constData() << | |
| 153 | − "to go to" << userString << "\n"; | |
| 154 | − NodeList::getInstance()->setDomainHostname(valueList[i]); | |
| 155 | − } else if (keyList[i] == DataServerKey::Position) { | |
| 156 | − QStringList coordinateItems = valueList[i].split(','); | |
| 151 | + } else if (keyList[i] == DataServerKey::Domain && keyList[i + 1] == DataServerKey::Position | |
| 152 | + && valueList[i] != " " && valueList[i + 1] != " ") { | |
| 153 | + | |
| 154 | + QStringList coordinateItems = valueList[i + 1].split(','); | |
| 157 | 155 | |
| 158 | 156 | if (coordinateItems.size() == 3) { |
| 159 | − qDebug() << "Changing position to" << valueList[i].toLocal8Bit().constData() << | |
| 160 | − "to go to" << userString << "\n"; | |
| 157 | + | |
| 158 | + qDebug() << "Changing domain to" << valueList[i].toLocal8Bit().constData() << | |
| 159 | + "and position to" << valueList[i + 1].toLocal8Bit().constData() << | |
| 160 | + "to go to" << userString << "\n"; | |
| 161 | + | |
| 162 | + NodeList::getInstance()->setDomainHostname(valueList[i]); | |
| 161 | 163 | |
| 162 | 164 | glm::vec3 newPosition(coordinateItems[0].toFloat(), |
| 163 | 165 | coordinateItems[1].toFloat(), |
| @@ -165,7 +167,6 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int · 1 unmodified line | ||
| 165 | 167 | Application::getInstance()->getAvatar()->setPosition(newPosition); |
| 166 | 168 | } |
| 167 | 169 | |
| 168 | − | |
| 169 | 170 | } else if (keyList[i] == DataServerKey::UUID) { |
| 170 | 171 | // this is the user's UUID - set it on the profile |
| 171 | 172 | Application::getInstance()->getProfile()->setUUID(valueList[0]); |