Showing the changes to interface/src/DataServerClient.cpp (1 of 9 files). Show all
Unified · Split
| @@ -148,6 +148,26 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int · 147 unmodified lines | |||
| 148 | } | 148 | } |
| 149 | } | 149 | } |
| 150 | } | 150 | } |
| 151 | } else if (keyList[i] == DataServerKey::SkeletonURL) { | ||
| 152 | |||
| 153 | if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) { | ||
| 154 | qDebug("Changing user's skeleton URL to %s\n", valueList[0].toLocal8Bit().constData()); | ||
| 155 | Application::getInstance()->getProfile()->setSkeletonModelURL(QUrl(valueList[0])); | ||
| 156 | } else { | ||
| 157 | // skeleton URL for a UUID, find avatar in our list | ||
| 158 | NodeList* nodeList = NodeList::getInstance(); | ||
| 159 | for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) { | ||
| 160 | if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) { | ||
| 161 | Avatar* avatar = (Avatar *) node->getLinkedData(); | ||
| 162 | |||
| 163 | if (avatar->getUUID() == userUUID) { | ||
| 164 | QMetaObject::invokeMethod(&avatar->getBody(), | ||
| 165 | "setSkeletonModelURL", | ||
| 166 | Q_ARG(QUrl, QUrl(valueList[0]))); | ||
| 167 | } | ||
| 168 | } | ||
| 169 | } | ||
| 170 | } | ||
| 151 | } else if (keyList[i] == DataServerKey::Domain && keyList[i + 1] == DataServerKey::Position | 171 | } else if (keyList[i] == DataServerKey::Domain && keyList[i + 1] == DataServerKey::Position |
| 152 | && valueList[i] != " " && valueList[i + 1] != " ") { | 172 | && valueList[i] != " " && valueList[i + 1] != " ") { |
| 153 | 173 | ||