mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
AvatarData now stores sessionUUID
This commit is contained in:
parent
79670563d4
commit
b8232b5dfd
4 changed files with 11 additions and 5 deletions
|
@ -1205,7 +1205,10 @@ void Application::timer() {
|
|||
// ask the node list to check in with the domain server
|
||||
NodeList::getInstance()->sendDomainServerCheckIn();
|
||||
|
||||
|
||||
// as soon as we have a valid sessionUUID, store it in the avatar for reference
|
||||
if (_myAvatar->getSessionUUID().isNull()) {
|
||||
_myAvatar->setSessionUUID(NodeList::getInstance()->getSessionUUID());
|
||||
}
|
||||
}
|
||||
|
||||
void Application::idle() {
|
||||
|
|
|
@ -32,6 +32,7 @@ using namespace std;
|
|||
QNetworkAccessManager* AvatarData::networkAccessManager = NULL;
|
||||
|
||||
AvatarData::AvatarData() :
|
||||
_sessionUUID(),
|
||||
_handPosition(0,0,0),
|
||||
_bodyYaw(-90.f),
|
||||
_bodyPitch(0.0f),
|
||||
|
|
|
@ -94,12 +94,14 @@ class AvatarData : public QObject {
|
|||
Q_PROPERTY(QString faceModelURL READ getFaceModelURLFromScript WRITE setFaceModelURLFromScript)
|
||||
Q_PROPERTY(QString skeletonModelURL READ getSkeletonModelURLFromScript WRITE setSkeletonModelURLFromScript)
|
||||
Q_PROPERTY(QString billboardURL READ getBillboardURL WRITE setBillboardFromURL)
|
||||
|
||||
Q_PROPERTY(QUuid sessionUUID READ getSessionUUID);
|
||||
public:
|
||||
AvatarData();
|
||||
virtual ~AvatarData();
|
||||
|
||||
const QUuid& getSessionID() { return _sessionID; }
|
||||
void setSessionID(const QUuid& id) { _sessionID = id; }
|
||||
const QUuid& getSessionUUID() { return _sessionUUID; }
|
||||
void setSessionUUID(const QUuid& id) { _sessionUUID = id; }
|
||||
|
||||
const glm::vec3& getPosition() const { return _position; }
|
||||
void setPosition(const glm::vec3 position) { _position = position; }
|
||||
|
@ -222,7 +224,7 @@ public slots:
|
|||
void sendBillboardPacket();
|
||||
void setBillboardFromNetworkReply();
|
||||
protected:
|
||||
QUuid _sessionID;
|
||||
QUuid _sessionUUID;
|
||||
glm::vec3 _position;
|
||||
glm::vec3 _handPosition;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ AvatarHashMap::AvatarHashMap() :
|
|||
|
||||
void AvatarHashMap::insert(const QUuid& id, AvatarSharedPointer avatar) {
|
||||
_avatarHash.insert(id, avatar);
|
||||
avatar->setSessionID(id);
|
||||
avatar->setSessionUUID(id);
|
||||
}
|
||||
|
||||
AvatarHash::iterator AvatarHashMap::erase(const AvatarHash::iterator& iterator) {
|
||||
|
|
Loading…
Reference in a new issue