summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 72aca1999e..6990102d24 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -403,6 +403,10 @@ void LLStatusBar::refresh()
pos_y -= pos_y % 2;
}
+ mRegionDetails.mTime = mTextTime->getText();
+ mRegionDetails.mBalance = mBalance;
+ mRegionDetails.mAccesString = (char *)region->getSimAccessString();
+ mRegionDetails.mPing = region->getNetDetailsForLCD();
if (parcel && parcel->getName())
{
location_name = region->getName()
@@ -410,6 +414,43 @@ void LLStatusBar::refresh()
pos_x, pos_y, pos_z,
region->getSimAccessString(),
parcel->getName());
+
+ // keep these around for the LCD to use
+ mRegionDetails.mRegionName = region->getName();
+ mRegionDetails.mParcelName = (char *)parcel->getName();
+ mRegionDetails.mX = pos_x;
+ mRegionDetails.mY = pos_y;
+ mRegionDetails.mZ = pos_z;
+ mRegionDetails.mArea = parcel->getArea();
+ mRegionDetails.mForSale = parcel->getForSale();
+ mRegionDetails.mTraffic = gParcelMgr->getDwelling();
+
+ if (parcel->isPublic())
+ {
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Public");
+ }
+ else
+ {
+ if (parcel->getIsGroupOwned())
+ {
+ if(!parcel->getGroupID().isNull())
+ {
+ gCacheName->getGroupName(parcel->getGroupID(), mRegionDetails.mOwner);
+ }
+ else
+ {
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Group Owned");
+ }
+ }
+ else
+ {
+ // Figure out the owner's name
+ char owner_first[MAX_STRING]; /*Flawfinder: ignore*/
+ char owner_last[MAX_STRING]; /*Flawfinder: ignore*/
+ gCacheName->getName(parcel->getOwnerID(), owner_first, owner_last);
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "%s %s", owner_first, owner_last); /* Flawfinder: ignore */
+ }
+ }
}
else
{
@@ -417,12 +458,34 @@ void LLStatusBar::refresh()
+ llformat(" %d, %d, %d (%s)",
pos_x, pos_y, pos_z,
region->getSimAccessString());
+ // keep these around for the LCD to use
+ mRegionDetails.mRegionName = region->getName();
+ mRegionDetails.mParcelName = "Unknown";
+
+ mRegionDetails.mX = pos_x;
+ mRegionDetails.mY = pos_y;
+ mRegionDetails.mZ = pos_z;
+ mRegionDetails.mArea = 0;
+ mRegionDetails.mForSale = FALSE;
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Unknown");
+ mRegionDetails.mTraffic = 0.0f;
}
}
else
{
// no region
location_name = "(Unknown)";
+ // keep these around for the LCD to use
+ mRegionDetails.mRegionName = LLString("Unknown");
+ mRegionDetails.mParcelName = "Unknown";
+ mRegionDetails.mAccesString = "Unknown";
+ mRegionDetails.mX = 0;
+ mRegionDetails.mY = 0;
+ mRegionDetails.mZ = 0;
+ mRegionDetails.mArea = 0;
+ mRegionDetails.mForSale = FALSE;
+ snprintf(mRegionDetails.mOwner, MAX_STRING, "Unknown");
+ mRegionDetails.mTraffic = 0.0f;
}
mTextParcelName->setText(location_name);