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