mirror of
https://github.com/Armored-Dragon/overte.git
synced 2025-03-11 16:13:16 +01:00
Merge branch 'master' of https://github.com/highfidelity/hifi into 20550-installOnMac
This commit is contained in:
commit
6293c84f17
16 changed files with 248 additions and 41 deletions
|
@ -29,6 +29,8 @@ Item {
|
|||
readonly property bool withSteam: withSteam
|
||||
property string errorString: errorString
|
||||
|
||||
readonly property bool loginDialogPoppedUp: loginDialog.getLoginDialogPoppedUp()
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
readonly property int minWidth: 480
|
||||
|
@ -123,6 +125,13 @@ Item {
|
|||
fontSize: completeProfileBody.fontSize
|
||||
fontBold: completeProfileBody.fontBold
|
||||
onClicked: {
|
||||
if (completeProfileBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked cancel on the complete profile screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader });
|
||||
}
|
||||
}
|
||||
|
@ -142,6 +151,12 @@ Item {
|
|||
fontSize: completeProfileBody.fontSize
|
||||
fontBold: completeProfileBody.fontBold
|
||||
onClicked: {
|
||||
if (completeProfileBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked create profile"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
loginErrorMessage.visible = false;
|
||||
loginDialog.createAccountFromSteam();
|
||||
}
|
||||
|
@ -253,13 +268,29 @@ Item {
|
|||
onHandleCreateCompleted: {
|
||||
console.log("Create Succeeded")
|
||||
|
||||
loginDialog.loginThroughSteam();
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": true, "linkSteam": false });
|
||||
if (completeProfileBody.withSteam) {
|
||||
if (completeProfileBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user created a profile with Steam successfully from the complete profile screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
loginDialog.loginThroughSteam();
|
||||
}
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": completeProfileBody.withSteam, "linkSteam": false });
|
||||
}
|
||||
onHandleCreateFailed: {
|
||||
console.log("Create Failed: " + error);
|
||||
if (completeProfileBody.withSteam) {
|
||||
if (completeProfileBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed to create a profile with Steam from the complete profile screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
}
|
||||
|
||||
bodyLoader.setSource("UsernameCollisionBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader });
|
||||
bodyLoader.setSource("UsernameCollisionBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": completeProfileBody.withSteam });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ Item {
|
|||
property string errorString: errorString
|
||||
property bool lostFocus: false
|
||||
|
||||
readonly property bool loginDialogPoppedUp: loginDialog.getLoginDialogPoppedUp()
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
readonly property int minWidth: 480
|
||||
|
@ -68,6 +70,20 @@ Item {
|
|||
|
||||
function login() {
|
||||
loginDialog.login(emailField.text, passwordField.text);
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data;
|
||||
if (linkAccountBody.linkSteam) {
|
||||
data = {
|
||||
"action": "user linking hifi account with Steam"
|
||||
};
|
||||
} else {
|
||||
data = {
|
||||
"action": "user logging in"
|
||||
};
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": linkAccountBody.withSteam, "withOculus": linkAccountBody.withOculus, "linkSteam": linkAccountBody.linkSteam });
|
||||
}
|
||||
|
||||
|
@ -294,6 +310,14 @@ Item {
|
|||
topMargin: hifi.dimensions.contentSpacing.y
|
||||
}
|
||||
onClicked: {
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked cancel at link account screen"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
loginDialog.dismissLoginDialog();
|
||||
}
|
||||
|
||||
bodyLoader.setSource("CompleteProfileBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": linkAccountBody.withSteam, "errorString": "" });
|
||||
}
|
||||
}
|
||||
|
@ -310,7 +334,7 @@ Item {
|
|||
topMargin: hifi.dimensions.contentSpacing.y
|
||||
}
|
||||
onClicked: {
|
||||
linkAccountBody.login()
|
||||
linkAccountBody.login();
|
||||
}
|
||||
}
|
||||
TextMetrics {
|
||||
|
@ -373,7 +397,12 @@ Item {
|
|||
lightboxPopup.visible = false;
|
||||
}
|
||||
lightboxPopup.visible = true;
|
||||
// bodyLoader.setSource("CantAccessBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader });
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked can't access account"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
}
|
||||
}
|
||||
HifiControlsUit.Button {
|
||||
|
@ -402,6 +431,19 @@ Item {
|
|||
linkAccountBody.withSteam = true;
|
||||
loginDialog.loginThroughSteam();
|
||||
}
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data;
|
||||
if (linkAccountBody.withOculus) {
|
||||
data = {
|
||||
"action": "user clicked login through Oculus"
|
||||
};
|
||||
} else if (linkAccountBody.withSteam) {
|
||||
data = {
|
||||
"action": "user clicked login through Steam"
|
||||
};
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader,
|
||||
"withSteam": linkAccountBody.withSteam, "withOculus": linkAccountBody.withOculus, "linkSteam": linkAccountBody.linkSteam });
|
||||
|
@ -470,6 +512,12 @@ Item {
|
|||
linkColor: hifi.colors.blueAccent
|
||||
onLinkActivated: {
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked sign up button"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
bodyLoader.setSource("SignUpBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader,
|
||||
"errorString": "", "linkSteam": linkAccountBody.linkSteam });
|
||||
}
|
||||
|
@ -495,10 +543,9 @@ Item {
|
|||
fontFamily: linkAccountBody.fontFamily
|
||||
fontSize: linkAccountBody.fontSize
|
||||
fontBold: linkAccountBody.fontBold
|
||||
visible: loginDialog.getLoginDialogPoppedUp() && !linkAccountBody.linkSteam;
|
||||
visible: linkAccountBody.loginDialogPoppedUp && !linkAccountBody.linkSteam;
|
||||
onClicked: {
|
||||
if (loginDialog.getLoginDialogPoppedUp()) {
|
||||
console.log("[ENCOURAGELOGINDIALOG]: user dismissed login screen")
|
||||
if (linkAccountBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user dismissed login screen"
|
||||
};
|
||||
|
|
|
@ -30,6 +30,8 @@ Item {
|
|||
property bool withOculus: withOculus
|
||||
property bool linkSteam: linkSteam
|
||||
|
||||
readonly property bool loginDialogPoppedUp: loginDialog.getLoginDialogPoppedUp()
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
readonly property int minWidth: 480
|
||||
|
@ -62,8 +64,12 @@ Item {
|
|||
running: false;
|
||||
repeat: false;
|
||||
onTriggered: {
|
||||
if (loginDialog.getLoginDialogPoppedUp()) {
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
loginDialog.dismissLoginDialog();
|
||||
var data = {
|
||||
"action": "user logged in successfully"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
root.tryDestroy();
|
||||
}
|
||||
|
@ -107,6 +113,12 @@ Item {
|
|||
loggingInText.x = 0;
|
||||
loggingInText.anchors.centerIn = loggingInHeader;
|
||||
loggedInGlyph.visible = true;
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user logged in with Steam successfully"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
} else if (loggingInBody.withOculus) {
|
||||
// reset the flag.
|
||||
loggingInGlyph.visible = false;
|
||||
|
@ -115,8 +127,21 @@ Item {
|
|||
loggingInText.anchors.centerIn = loggingInHeader;
|
||||
loggedInGlyph.text = hifi.glyphs.oculus;
|
||||
loggedInGlyph.visible = true;
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user logged in with Oculus successfully"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
} else {
|
||||
loggingInText.text = "You are now logged in!";
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user logged in successfully"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
}
|
||||
successTimer.start();
|
||||
}
|
||||
|
@ -234,11 +259,28 @@ Item {
|
|||
target: loginDialog
|
||||
onHandleLinkCompleted: {
|
||||
console.log("Link Succeeded");
|
||||
loggingInBody.linkSteam = false;
|
||||
loggingInBody.loadingSuccess();
|
||||
if (loggingInBody.linkSteam) {
|
||||
loggingInBody.linkSteam = false;
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user linked Steam with their hifi account credentials successfully"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
loggingInBody.loadingSuccess();
|
||||
}
|
||||
}
|
||||
onHandleLinkFailed: {
|
||||
console.log("Link Failed: " + error);
|
||||
if (loggingInBody.linkSteam) {
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user linked Steam unsuccessfully"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
}
|
||||
bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "linkSteam": true, "errorString": error });
|
||||
}
|
||||
|
||||
|
@ -253,18 +295,43 @@ Item {
|
|||
var errorString = "";
|
||||
if (loggingInBody.linkSteam && loggingInBody.withSteam) {
|
||||
errorString = "Username or password is incorrect.";
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed to link Steam with their hifi account credentials"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": loggingInBody.withSteam, "linkSteam": loggingInBody.linkSteam, "errorString": errorString });
|
||||
} else if (loggingInBody.withSteam) {
|
||||
loggingInGlyph.visible = false;
|
||||
errorString = "Your Steam authentication has failed. Please make sure you are logged into Steam and try again.";
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed to authenticate with Steam to log in"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
bodyLoader.setSource("CompleteProfileBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": loggingInBody.withSteam, "errorString": errorString });
|
||||
} else if (loggingInBody.withOculus) {
|
||||
loggingInGlyph.visible = false;
|
||||
errorString = "Your Oculus authentication has failed. Please make sure you are logged into Oculus and try again."
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed to authenticate with Oculus to log in"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "errorString": errorString });
|
||||
}
|
||||
else {
|
||||
errorString = "Username or password is incorrect.";
|
||||
if (loggingInBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed at logging in"
|
||||
};
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "errorString": errorString });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@ Item {
|
|||
property bool linkSteam: linkSteam
|
||||
property bool lostFocus: false
|
||||
|
||||
readonly property bool loginDialogPoppedUp: loginDialog.getLoginDialogPoppedUp()
|
||||
|
||||
QtObject {
|
||||
id: d
|
||||
readonly property int minWidth: 480
|
||||
|
@ -345,6 +347,12 @@ Item {
|
|||
fontSize: signUpBody.fontSize
|
||||
fontBold: signUpBody.fontBold
|
||||
onClicked: {
|
||||
if (signUpBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked cancel button at sign up screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
bodyLoader.setSource("LinkAccountBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "linkSteam": signUpBody.linkSteam });
|
||||
}
|
||||
}
|
||||
|
@ -363,23 +371,18 @@ Item {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
if (signUpBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user clicked sign up button"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
signUpBody.signup();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
z: -2
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton
|
||||
onClicked: {
|
||||
if (!usernameField.focus && !emailField.focus && !passwordField.focus) {
|
||||
usernameField.focus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
//but rise Tablet's one instead for Tablet interface
|
||||
root.keyboardEnabled = HMD.active;
|
||||
|
@ -408,12 +411,26 @@ Item {
|
|||
onHandleSignupCompleted: {
|
||||
console.log("Sign Up Completed");
|
||||
|
||||
if (signUpBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user signed up successfully"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
loginDialog.login(usernameField.text, passwordField.text);
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": false, "linkSteam": false });
|
||||
}
|
||||
onHandleSignupFailed: {
|
||||
console.log("Sign Up Failed")
|
||||
|
||||
if (signUpBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user signed up unsuccessfully"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
if (errorString !== "") {
|
||||
loginErrorMessage.visible = true;
|
||||
var errorStringEdited = errorString.replace(/[\n\r]+/g, "\n");
|
||||
|
|
|
@ -26,6 +26,10 @@ Item {
|
|||
readonly property int textFieldFontSize: 18
|
||||
readonly property bool fontBold: true
|
||||
|
||||
readonly property bool withSteam: withSteam
|
||||
|
||||
readonly property bool loginDialogPoppedUp: loginDialog.getLoginDialogPoppedUp()
|
||||
|
||||
function create() {
|
||||
mainTextContainer.visible = false
|
||||
loginDialog.createAccountFromSteam(textField.text);
|
||||
|
@ -197,18 +201,40 @@ Item {
|
|||
target: loginDialog
|
||||
onHandleCreateCompleted: {
|
||||
console.log("Create Succeeded");
|
||||
loginDialog.loginThroughSteam();
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": true, "linkSteam": false })
|
||||
if (usernameCollisionBody.withSteam) {
|
||||
if (usernameCollisionBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user created a profile with Steam successfully in the username collision screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
loginDialog.loginThroughSteam();
|
||||
}
|
||||
|
||||
bodyLoader.setSource("LoggingInBody.qml", { "loginDialog": loginDialog, "root": root, "bodyLoader": bodyLoader, "withSteam": usernameCollisionBody.withSteam, "linkSteam": false })
|
||||
}
|
||||
onHandleCreateFailed: {
|
||||
console.log("Create Failed: " + error)
|
||||
if (usernameCollisionBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed to create account from the username collision screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
|
||||
mainTextContainer.visible = true
|
||||
mainTextContainer.text = "\"" + textField.text + qsTr("\" is invalid or already taken.");
|
||||
}
|
||||
onHandleLoginCompleted: {
|
||||
console.log("Login Succeeded");
|
||||
if (loginDialog.getLoginDialogPoppedUp()) {
|
||||
if (usernameCollisionBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user logged in successfully from the username collision screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
|
||||
loginDialog.dismissLoginDialog();
|
||||
}
|
||||
root.tryDestroy();
|
||||
|
@ -216,6 +242,13 @@ Item {
|
|||
|
||||
onHandleLoginFailed: {
|
||||
console.log("Login Failed")
|
||||
if (usernameCollisionBody.loginDialogPoppedUp) {
|
||||
var data = {
|
||||
"action": "user failed to log in from the username collision screen"
|
||||
}
|
||||
UserActivityLogger.logAction("encourageLoginDialog", data);
|
||||
}
|
||||
|
||||
mainTextContainer.text = "Login Failed";
|
||||
}
|
||||
|
||||
|
|
|
@ -2867,7 +2867,7 @@ void Application::showLoginScreen() {
|
|||
dialogsManager->showLoginDialog();
|
||||
emit loginDialogFocusEnabled();
|
||||
QJsonObject loginData = {};
|
||||
loginData["action"] = "login dialog shown";
|
||||
loginData["action"] = "login dialog popped up";
|
||||
UserActivityLogger::getInstance().logAction("encourageLoginDialog", loginData);
|
||||
_window->setWindowTitle("High Fidelity Interface");
|
||||
} else {
|
||||
|
|
|
@ -67,6 +67,11 @@ AvatarManager::AvatarManager(QObject* parent) :
|
|||
connect(nodeList.data(), &NodeList::ignoredNode, this, [this](const QUuid& nodeID, bool enabled) {
|
||||
if (enabled) {
|
||||
removeAvatar(nodeID, KillAvatarReason::AvatarIgnored);
|
||||
} else {
|
||||
auto avatar = std::static_pointer_cast<Avatar>(getAvatarBySessionID(nodeID));
|
||||
if (avatar) {
|
||||
avatar->createOrb();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -391,8 +396,15 @@ void AvatarManager::simulateAvatarFades(float deltaTime) {
|
|||
scene->enqueueTransaction(transaction);
|
||||
}
|
||||
|
||||
AvatarSharedPointer AvatarManager::newSharedAvatar() {
|
||||
return AvatarSharedPointer(new OtherAvatar(qApp->thread()), [](OtherAvatar* ptr) { ptr->deleteLater(); });
|
||||
AvatarSharedPointer AvatarManager::newSharedAvatar(const QUuid& sessionUUID) {
|
||||
|
||||
auto otherAvatar = new OtherAvatar(qApp->thread());
|
||||
otherAvatar->setSessionUUID(sessionUUID);
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
if (!nodeList || !nodeList->isIgnoringNode(sessionUUID)) {
|
||||
otherAvatar->createOrb();
|
||||
}
|
||||
return AvatarSharedPointer(otherAvatar, [](OtherAvatar* ptr) { ptr->deleteLater(); });
|
||||
}
|
||||
|
||||
void AvatarManager::queuePhysicsChange(const OtherAvatarPointer& avatar) {
|
||||
|
|
|
@ -216,7 +216,7 @@ private:
|
|||
|
||||
void simulateAvatarFades(float deltaTime);
|
||||
|
||||
AvatarSharedPointer newSharedAvatar() override;
|
||||
AvatarSharedPointer newSharedAvatar(const QUuid& sessionUUID) override;
|
||||
|
||||
// called only from the AvatarHashMap thread - cannot be called while this thread holds the
|
||||
// hash lock, since handleRemovedAvatar needs a write lock on the entity tree and the entity tree
|
||||
|
|
|
@ -46,9 +46,6 @@ OtherAvatar::OtherAvatar(QThread* thread) : Avatar(thread) {
|
|||
connect(_skeletonModel.get(), &Model::setURLFinished, this, &Avatar::setModelURLFinished);
|
||||
connect(_skeletonModel.get(), &Model::rigReady, this, &Avatar::rigReady);
|
||||
connect(_skeletonModel.get(), &Model::rigReset, this, &Avatar::rigReset);
|
||||
|
||||
// add the purple orb
|
||||
createOrb();
|
||||
}
|
||||
|
||||
OtherAvatar::~OtherAvatar() {
|
||||
|
|
|
@ -1375,7 +1375,7 @@ void Avatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
|||
AvatarData::setSkeletonModelURL(skeletonModelURL);
|
||||
if (QThread::currentThread() == thread()) {
|
||||
|
||||
if (!isMyAvatar()) {
|
||||
if (!isMyAvatar() && !DependencyManager::get<NodeList>()->isIgnoringNode(getSessionUUID())) {
|
||||
createOrb();
|
||||
}
|
||||
|
||||
|
|
|
@ -465,8 +465,6 @@ public:
|
|||
|
||||
static const QUrl& defaultFullAvatarModelUrl();
|
||||
|
||||
virtual bool isMyAvatar() const { return false; }
|
||||
|
||||
const QUuid getSessionUUID() const { return getID(); }
|
||||
|
||||
glm::vec3 getHandPosition() const;
|
||||
|
|
|
@ -195,21 +195,22 @@ int AvatarHashMap::numberOfAvatarsInRange(const glm::vec3& position, float range
|
|||
return count;
|
||||
}
|
||||
|
||||
AvatarSharedPointer AvatarHashMap::newSharedAvatar() {
|
||||
return std::make_shared<AvatarData>();
|
||||
AvatarSharedPointer AvatarHashMap::newSharedAvatar(const QUuid& sessionUUID) {
|
||||
auto avatarData = std::make_shared<AvatarData>();
|
||||
avatarData->setSessionUUID(sessionUUID);
|
||||
return avatarData;
|
||||
}
|
||||
|
||||
AvatarSharedPointer AvatarHashMap::addAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer) {
|
||||
qCDebug(avatars) << "Adding avatar with sessionUUID " << sessionUUID << "to AvatarHashMap.";
|
||||
|
||||
auto avatar = newSharedAvatar();
|
||||
auto avatar = newSharedAvatar(sessionUUID);
|
||||
avatar->setSessionUUID(sessionUUID);
|
||||
avatar->setOwningAvatarMixer(mixerWeakPointer);
|
||||
|
||||
// addAvatar is only called from newOrExistingAvatar, which already locks _hashLock
|
||||
_avatarHash.insert(sessionUUID, avatar);
|
||||
emit avatarAddedEvent(sessionUUID);
|
||||
|
||||
return avatar;
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ protected:
|
|||
AvatarHashMap();
|
||||
|
||||
virtual AvatarSharedPointer parseAvatarData(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
||||
virtual AvatarSharedPointer newSharedAvatar();
|
||||
virtual AvatarSharedPointer newSharedAvatar(const QUuid& sessionUUID);
|
||||
virtual AvatarSharedPointer addAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer);
|
||||
AvatarSharedPointer newOrExistingAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer,
|
||||
bool& isNew);
|
||||
|
|
|
@ -31,6 +31,7 @@ using namespace udt;
|
|||
using namespace std::chrono;
|
||||
|
||||
Connection::Connection(Socket* parentSocket, HifiSockAddr destination, std::unique_ptr<CongestionControl> congestionControl) :
|
||||
QObject(parentSocket),
|
||||
_parentSocket(parentSocket),
|
||||
_destination(destination),
|
||||
_congestionControl(move(congestionControl))
|
||||
|
|
|
@ -108,7 +108,8 @@ SpatiallyNestablePointer SpatiallyNestable::getParentPointer(bool& success) cons
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
if (parent && parent->getID() == parentID) {
|
||||
if (parent && (parent->getID() == parentID ||
|
||||
(parentID == AVATAR_SELF_ID && parent->isMyAvatar()))) {
|
||||
// parent pointer is up-to-date
|
||||
if (!_parentKnowsMe) {
|
||||
SpatialParentTree* parentTree = parent->getParentTree();
|
||||
|
|
|
@ -47,6 +47,8 @@ public:
|
|||
virtual const QUuid getParentID() const;
|
||||
virtual void setParentID(const QUuid& parentID);
|
||||
|
||||
virtual bool isMyAvatar() const { return false; }
|
||||
|
||||
virtual quint16 getParentJointIndex() const { return _parentJointIndex; }
|
||||
virtual void setParentJointIndex(quint16 parentJointIndex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue