History

Merge branch 'master' of git://github.com/worklist/hifi into windows_build

Brad Hefta-Gaub committed 12 years ago

Commit 170dbe62 parents a39c20e 8325753106 files · +1132 −2119Browse files

Showing the changes to interface/src/DataServerClient.cpp (1 of 106 files). Show all

Unified · Split

interface/src/DataServerClient.cpp+9−10
@@ -140,18 +140,18 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int · 139 unmodified lines
140 if (keyList[i] == DataServerKey::FaceMeshURL) {140 if (keyList[i] == DataServerKey::FaceMeshURL) {
141 141
142 if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) {142 if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) {
143 qDebug("Changing user's face model URL to %s\n", valueList[i].toLocal8Bit().constData());143 qDebug("Changing user's face model URL to %s", valueList[i].toLocal8Bit().constData());
144 Application::getInstance()->getProfile()->setFaceModelURL(QUrl(valueList[i]));144 Application::getInstance()->getProfile()->setFaceModelURL(QUrl(valueList[i]));
145 } else {145 } else {
146 // mesh URL for a UUID, find avatar in our list146 // mesh URL for a UUID, find avatar in our list
147 NodeList* nodeList = NodeList::getInstance();147
148 for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {148 foreach (const SharedNodePointer& node, NodeList::getInstance()->getNodeHash()) {
149 if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) {149 if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) {
150 Avatar* avatar = (Avatar *) node->getLinkedData();150 Avatar* avatar = (Avatar *) node->getLinkedData();
151 151
152 if (avatar->getUUID() == userUUID) {152 if (avatar->getUUID() == userUUID) {
153 QMetaObject::invokeMethod(&avatar->getHead().getFaceModel(),153 QMetaObject::invokeMethod(&avatar->getHead().getFaceModel(),
154 "setURL", Q_ARG(QUrl, QUrl(valueList[i])));154 "setURL", Q_ARG(QUrl, QUrl(valueList[i])));
155 }155 }
156 }156 }
157 }157 }
@@ -159,18 +159,17 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int · 1 unmodified line
159 } else if (keyList[i] == DataServerKey::SkeletonURL) {159 } else if (keyList[i] == DataServerKey::SkeletonURL) {
160 160
161 if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) {161 if (userUUID.isNull() || userUUID == Application::getInstance()->getProfile()->getUUID()) {
162 qDebug("Changing user's skeleton URL to %s\n", valueList[i].toLocal8Bit().constData());162 qDebug("Changing user's skeleton URL to %s", valueList[i].toLocal8Bit().constData());
163 Application::getInstance()->getProfile()->setSkeletonModelURL(QUrl(valueList[i]));163 Application::getInstance()->getProfile()->setSkeletonModelURL(QUrl(valueList[i]));
164 } else {164 } else {
165 // skeleton URL for a UUID, find avatar in our list165 // skeleton URL for a UUID, find avatar in our list
166 NodeList* nodeList = NodeList::getInstance();166 foreach (const SharedNodePointer& node, NodeList::getInstance()->getNodeHash()) {
167 for (NodeList::iterator node = nodeList->begin(); node != nodeList->end(); node++) {
168 if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) {167 if (node->getLinkedData() != NULL && node->getType() == NODE_TYPE_AGENT) {
169 Avatar* avatar = (Avatar *) node->getLinkedData();168 Avatar* avatar = (Avatar *) node->getLinkedData();
170 169
171 if (avatar->getUUID() == userUUID) {170 if (avatar->getUUID() == userUUID) {
172 QMetaObject::invokeMethod(&avatar->getSkeletonModel(), "setURL",171 QMetaObject::invokeMethod(&avatar->getSkeletonModel(), "setURL",
173 Q_ARG(QUrl, QUrl(valueList[i])));172 Q_ARG(QUrl, QUrl(valueList[i])));
174 }173 }
175 }174 }
176 }175 }
@@ -190,8 +189,8 @@ void DataServerClient::processSendFromDataServer(unsigned char* packetData, int · 13 unmodified lines
190 qDebug() << "Changing domain to" << valueList[i].toLocal8Bit().constData() <<189 qDebug() << "Changing domain to" << valueList[i].toLocal8Bit().constData() <<
191 ", position to" << valueList[i + 1].toLocal8Bit().constData() <<190 ", position to" << valueList[i + 1].toLocal8Bit().constData() <<
192 ", and orientation to" << valueList[i + 2].toLocal8Bit().constData() <<191 ", and orientation to" << valueList[i + 2].toLocal8Bit().constData() <<
193 "to go to" << userString << "\n";192 "to go to" << userString;
194 193
195 NodeList::getInstance()->setDomainHostname(valueList[i]);194 NodeList::getInstance()->setDomainHostname(valueList[i]);
196 // orient the user to face the target195 // orient the user to face the target
197 glm::quat newOrientation = glm::quat(glm::radians(glm::vec3(orientationItems[0].toFloat(),196 glm::quat newOrientation = glm::quat(glm::radians(glm::vec3(orientationItems[0].toFloat(),