aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerparcelmgr.cpp')
-rw-r--r--linden/indra/newview/llviewerparcelmgr.cpp43
1 files changed, 23 insertions, 20 deletions
diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp
index b151802..a1311d3 100644
--- a/linden/indra/newview/llviewerparcelmgr.cpp
+++ b/linden/indra/newview/llviewerparcelmgr.cpp
@@ -83,7 +83,7 @@ LLPointer<LLViewerImage> sBlockedImage;
83LLPointer<LLViewerImage> sPassImage; 83LLPointer<LLViewerImage> sPassImage;
84 84
85// Local functions 85// Local functions
86void optionally_start_music(const LLString& music_url); 86void optionally_start_music(const std::string& music_url);
87void callback_start_music(S32 option, void* data); 87void callback_start_music(S32 option, void* data);
88void optionally_prepare_video(const LLParcel *parcelp); 88void optionally_prepare_video(const LLParcel *parcelp);
89void callback_prepare_video(S32 option, void* data); 89void callback_prepare_video(S32 option, void* data);
@@ -112,16 +112,20 @@ struct LLGodForceOwnerData
112// 112//
113LLViewerParcelMgr::LLViewerParcelMgr() 113LLViewerParcelMgr::LLViewerParcelMgr()
114: mSelected(FALSE), 114: mSelected(FALSE),
115 mRequestResult(0),
115 mWestSouth(), 116 mWestSouth(),
116 mEastNorth(), 117 mEastNorth(),
117 mSelectedDwell(0.f), 118 mSelectedDwell(0.f),
118 mAgentParcelSequenceID(-1), 119 mAgentParcelSequenceID(-1),
120 mHoverRequestResult(0),
119 mHoverWestSouth(), 121 mHoverWestSouth(),
120 mHoverEastNorth(), 122 mHoverEastNorth(),
121 mRenderCollision(FALSE), 123 mRenderCollision(FALSE),
122 mRenderSelection(TRUE), 124 mRenderSelection(TRUE),
123 mCollisionBanned(0), 125 mCollisionBanned(0),
124 mCollisionTimer() 126 mCollisionTimer(),
127 mMediaParcelId(0),
128 mMediaRegionId(0)
125{ 129{
126 mCurrentParcel = new LLParcel(); 130 mCurrentParcel = new LLParcel();
127 mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel); 131 mCurrentParcelSelection = new LLParcelSelection(mCurrentParcel);
@@ -1207,22 +1211,21 @@ void LLViewerParcelMgr::makeLandmarkAtSelection()
1207 LLVector3 west_south_bottom_region = region->getPosRegionFromGlobal( mWestSouth ); 1211 LLVector3 west_south_bottom_region = region->getPosRegionFromGlobal( mWestSouth );
1208 LLVector3 east_north_top_region = region->getPosRegionFromGlobal( mEastNorth ); 1212 LLVector3 east_north_top_region = region->getPosRegionFromGlobal( mEastNorth );
1209 1213
1210 LLString name("My Land"); 1214 std::string name("My Land");
1211 char buffer[MAX_STRING]; 1215 std::string buffer;
1212 S32 pos_x = (S32)floor((west_south_bottom_region.mV[VX] + east_north_top_region.mV[VX]) / 2.0f); 1216 S32 pos_x = (S32)floor((west_south_bottom_region.mV[VX] + east_north_top_region.mV[VX]) / 2.0f);
1213 S32 pos_y = (S32)floor((west_south_bottom_region.mV[VY] + east_north_top_region.mV[VY]) / 2.0f); 1217 S32 pos_y = (S32)floor((west_south_bottom_region.mV[VY] + east_north_top_region.mV[VY]) / 2.0f);
1214 sprintf(buffer, "%s in %s (%d, %d)", 1218 buffer = llformat("%s in %s (%d, %d)",
1215 name.c_str(), 1219 name.c_str(),
1216 region->getName().c_str(), 1220 region->getName().c_str(),
1217 pos_x, pos_y); 1221 pos_x, pos_y);
1218 name.assign(buffer); 1222 name.assign(buffer);
1219 1223
1220 const char* desc = "Claimed land"; 1224 create_landmark(name, "Claimed land", global_center);
1221 create_landmark(name.c_str(), desc, global_center);
1222} 1225}
1223*/ 1226*/
1224 1227
1225const LLString& LLViewerParcelMgr::getAgentParcelName() const 1228const std::string& LLViewerParcelMgr::getAgentParcelName() const
1226{ 1229{
1227 return mAgentParcel->getName(); 1230 return mAgentParcel->getName();
1228} 1231}
@@ -1645,16 +1648,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
1645 { 1648 {
1646 if (parcel) 1649 if (parcel)
1647 { 1650 {
1648 LLString music_url_raw = parcel->getMusicURL(); 1651 std::string music_url_raw = parcel->getMusicURL();
1649 1652
1650 // Trim off whitespace from front and back 1653 // Trim off whitespace from front and back
1651 LLString music_url = music_url_raw; 1654 std::string music_url = music_url_raw;
1652 LLString::trim(music_url); 1655 LLStringUtil::trim(music_url);
1653 1656
1654 // On entering a new parcel, stop the last stream if the 1657 // On entering a new parcel, stop the last stream if the
1655 // new parcel has a different music url. (Empty URL counts 1658 // new parcel has a different music url. (Empty URL counts
1656 // as different.) 1659 // as different.)
1657 const char* stream_url = gAudiop->getInternetStreamURL(); 1660 const std::string& stream_url = gAudiop->getInternetStreamURL();
1658 1661
1659 if (music_url.empty() || music_url != stream_url) 1662 if (music_url.empty() || music_url != stream_url)
1660 { 1663 {
@@ -1669,10 +1672,10 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
1669 optionally_start_music(music_url); 1672 optionally_start_music(music_url);
1670 } 1673 }
1671 } 1674 }
1672 else if (gAudiop->getInternetStreamURL()[0]) 1675 else if (!gAudiop->getInternetStreamURL().empty())
1673 { 1676 {
1674 llinfos << "Stopping parcel music" << llendl; 1677 llinfos << "Stopping parcel music" << llendl;
1675 gAudiop->startInternetStream(NULL); 1678 gAudiop->startInternetStream(LLStringUtil::null);
1676 } 1679 }
1677 } 1680 }
1678 } 1681 }
@@ -1688,7 +1691,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
1688 }; 1691 };
1689} 1692}
1690 1693
1691void optionally_start_music(const LLString& music_url) 1694void optionally_start_music(const std::string& music_url)
1692{ 1695{
1693 if (gSavedSettings.getBOOL("AudioStreamingMusic")) 1696 if (gSavedSettings.getBOOL("AudioStreamingMusic"))
1694 { 1697 {
@@ -1699,7 +1702,7 @@ void optionally_start_music(const LLString& music_url)
1699 // changed as part of SL-4878 1702 // changed as part of SL-4878
1700 if ( gOverlayBar && gOverlayBar->musicPlaying()) 1703 if ( gOverlayBar && gOverlayBar->musicPlaying())
1701 { 1704 {
1702 gAudiop->startInternetStream(music_url.c_str()); 1705 gAudiop->startInternetStream(music_url);
1703 } 1706 }
1704 } 1707 }
1705} 1708}
@@ -1905,7 +1908,7 @@ void LLViewerParcelMgr::deedLandToGroup()
1905{ 1908{
1906 std::string group_name; 1909 std::string group_name;
1907 gCacheName->getGroupName(mCurrentParcel->getGroupID(), group_name); 1910 gCacheName->getGroupName(mCurrentParcel->getGroupID(), group_name);
1908 LLString::format_map_t args; 1911 LLStringUtil::format_map_t args;
1909 args["[AREA]"] = llformat("%d", mCurrentParcel->getArea()); 1912 args["[AREA]"] = llformat("%d", mCurrentParcel->getArea());
1910 args["[GROUP_NAME]"] = group_name; 1913 args["[GROUP_NAME]"] = group_name;
1911 if(mCurrentParcel->getContributeWithDeed()) 1914 if(mCurrentParcel->getContributeWithDeed())
@@ -1976,7 +1979,7 @@ void LLViewerParcelMgr::startReleaseLand()
1976 if ((region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) 1979 if ((region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
1977 && !gAgent.isGodlike()) 1980 && !gAgent.isGodlike())
1978 { 1981 {
1979 LLStringBase<char>::format_map_t args; 1982 LLStringUtil::format_map_t args;
1980 args["[REGION]"] = region->getName(); 1983 args["[REGION]"] = region->getName();
1981 gViewerWindow->alertXml("CannotReleaseLandNoTransfer", args); 1984 gViewerWindow->alertXml("CannotReleaseLandNoTransfer", args);
1982 return; 1985 return;
@@ -1990,7 +1993,7 @@ void LLViewerParcelMgr::startReleaseLand()
1990 } 1993 }
1991 1994
1992 // Compute claim price 1995 // Compute claim price
1993 LLStringBase<char>::format_map_t args; 1996 LLStringUtil::format_map_t args;
1994 args["[AREA]"] = llformat("%d",mCurrentParcel->getArea()); 1997 args["[AREA]"] = llformat("%d",mCurrentParcel->getArea());
1995 gViewerWindow->alertXml("ReleaseLandWarning", args, 1998 gViewerWindow->alertXml("ReleaseLandWarning", args,
1996 releaseAlertCB, this); 1999 releaseAlertCB, this);
@@ -2189,7 +2192,7 @@ void LLViewerParcelMgr::startDeedLandToGroup()
2189 if((region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL) 2192 if((region->getRegionFlags() & REGION_FLAGS_BLOCK_LAND_RESELL)
2190 && (mCurrentParcel->getOwnerID() != region->getOwner())) 2193 && (mCurrentParcel->getOwnerID() != region->getOwner()))
2191 { 2194 {
2192 LLStringBase<char>::format_map_t args; 2195 LLStringUtil::format_map_t args;
2193 args["[REGION]"] = region->getName(); 2196 args["[REGION]"] = region->getName();
2194 gViewerWindow->alertXml("CannotDeedLandNoTransfer", args); 2197 gViewerWindow->alertXml("CannotDeedLandNoTransfer", args);
2195 return; 2198 return;