mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 18:26:11 +02:00
This patch updates the MyAvatar.cpp file.
It adds a check MyAvatar::goToLocationFromResponse to see if the user is online, if the teleport to the avatar is done and if not a message is shown which said that the user is not online
This commit is contained in:
parent
e62834c197
commit
9662dced09
1 changed files with 6 additions and 1 deletions
|
@ -1897,7 +1897,12 @@ void MyAvatar::resetSize() {
|
|||
|
||||
void MyAvatar::goToLocationFromResponse(const QJsonObject& jsonObject) {
|
||||
QJsonObject locationObject = jsonObject["data"].toObject()["address"].toObject();
|
||||
goToLocationFromAddress(locationObject);
|
||||
bool isOnline = jsonObject["data"].toObject()["online"].toBool();
|
||||
if (isOnline ) {
|
||||
goToLocationFromAddress(locationObject);
|
||||
} else {
|
||||
QMessageBox::warning(Application::getInstance()->getWindow(), "", "The user is not online.");
|
||||
}
|
||||
}
|
||||
|
||||
void MyAvatar::goToLocationFromAddress(const QJsonObject& locationObject) {
|
||||
|
|
Loading…
Reference in a new issue