summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rwxr-xr-xindra/newview/llviewerparcelmgr.cpp81
1 files changed, 42 insertions, 39 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index e361fad9de..7c94442f09 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -36,7 +36,6 @@
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llparcel.h"
-#include "llsecondlifeurls.h"
#include "message.h"
#include "llfloaterreg.h"
@@ -118,6 +117,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mHoverRequestResult(0),
mHoverWestSouth(),
mHoverEastNorth(),
+ mTeleportInProgressPosition(),
mRenderCollision(FALSE),
mRenderSelection(TRUE),
mCollisionBanned(0),
@@ -198,22 +198,22 @@ LLViewerParcelMgr::~LLViewerParcelMgr()
void LLViewerParcelMgr::dump()
{
- llinfos << "Parcel Manager Dump" << llendl;
- llinfos << "mSelected " << S32(mSelected) << llendl;
- llinfos << "Selected parcel: " << llendl;
- llinfos << mWestSouth << " to " << mEastNorth << llendl;
+ LL_INFOS() << "Parcel Manager Dump" << LL_ENDL;
+ LL_INFOS() << "mSelected " << S32(mSelected) << LL_ENDL;
+ LL_INFOS() << "Selected parcel: " << LL_ENDL;
+ LL_INFOS() << mWestSouth << " to " << mEastNorth << LL_ENDL;
mCurrentParcel->dump();
- llinfos << "banning " << mCurrentParcel->mBanList.size() << llendl;
+ LL_INFOS() << "banning " << mCurrentParcel->mBanList.size() << LL_ENDL;
access_map_const_iterator cit = mCurrentParcel->mBanList.begin();
access_map_const_iterator end = mCurrentParcel->mBanList.end();
for ( ; cit != end; ++cit)
{
- llinfos << "ban id " << (*cit).first << llendl;
+ LL_INFOS() << "ban id " << (*cit).first << LL_ENDL;
}
- llinfos << "Hover parcel:" << llendl;
+ LL_INFOS() << "Hover parcel:" << LL_ENDL;
mHoverParcel->dump();
- llinfos << "Agent parcel:" << llendl;
+ LL_INFOS() << "Agent parcel:" << LL_ENDL;
mAgentParcel->dump();
}
@@ -591,13 +591,13 @@ void LLViewerParcelMgr::deselectLand()
void LLViewerParcelMgr::addObserver(LLParcelObserver* observer)
{
- mObservers.put(observer);
+ mObservers.push_back(observer);
}
void LLViewerParcelMgr::removeObserver(LLParcelObserver* observer)
{
- mObservers.removeObj(observer);
+ vector_replace_with_last(mObservers, observer);
}
@@ -606,16 +606,16 @@ void LLViewerParcelMgr::removeObserver(LLParcelObserver* observer)
// from the list.
void LLViewerParcelMgr::notifyObservers()
{
- LLDynamicArray<LLParcelObserver*> observers;
- S32 count = mObservers.count();
+ std::vector<LLParcelObserver*> observers;
+ S32 count = mObservers.size();
S32 i;
for(i = 0; i < count; ++i)
{
- observers.put(mObservers.get(i));
+ observers.push_back(mObservers.at(i));
}
for(i = 0; i < count; ++i)
{
- observers.get(i)->changed();
+ observers.at(i)->changed();
}
}
@@ -948,7 +948,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
return;
}
- llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl;
+ LL_INFOS() << "Claiming " << mWestSouth << " to " << mEastNorth << LL_ENDL;
// BUG: Only works for the region containing mWestSouthBottom
LLVector3d east_north_region_check( mEastNorth );
@@ -971,7 +971,7 @@ void LLViewerParcelMgr::sendParcelGodForceOwner(const LLUUID& owner_id)
return;
}
- llinfos << "Region " << region->getOriginGlobal() << llendl;
+ LL_INFOS() << "Region " << region->getOriginGlobal() << LL_ENDL;
LLSD payload;
payload["owner_id"] = owner_id;
@@ -1111,8 +1111,8 @@ LLViewerParcelMgr::ParcelBuyInfo* LLViewerParcelMgr::setupParcelBuy(
if (is_claim)
{
- llinfos << "Claiming " << mWestSouth << " to " << mEastNorth << llendl;
- llinfos << "Region " << region->getOriginGlobal() << llendl;
+ LL_INFOS() << "Claiming " << mWestSouth << " to " << mEastNorth << LL_ENDL;
+ LL_INFOS() << "Region " << region->getOriginGlobal() << LL_ENDL;
// BUG: Only works for the region containing mWestSouthBottom
LLVector3d east_north_region_check( mEastNorth );
@@ -1282,7 +1282,7 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
LLViewerRegion *region = use_agent_region ? gAgent.getRegion() : LLWorld::getInstance()->getRegionFromPosGlobal( mWestSouth );
if (!region) return;
- //llinfos << "found region: " << region->getName() << llendl;
+ //LL_INFOS() << "found region: " << region->getName() << LL_ENDL;
LLSD body;
std::string url = region->getCapability("ParcelPropertiesUpdate");
@@ -1292,8 +1292,8 @@ void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_ag
U32 message_flags = 0x01;
body["flags"] = ll_sd_from_U32(message_flags);
parcel->packMessage(body);
- llinfos << "Sending parcel properties update via capability to: "
- << url << llendl;
+ LL_INFOS() << "Sending parcel properties update via capability to: "
+ << url << LL_ENDL;
LLHTTPClient::post(url, body, new LLHTTPClient::Responder());
}
else
@@ -1321,12 +1321,6 @@ void LLViewerParcelMgr::setHoverParcel(const LLVector3d& pos)
static U32 last_west, last_south;
- // only request parcel info when tooltip is shown
- if (!gSavedSettings.getBOOL("ShowLandHoverTip"))
- {
- return;
- }
-
// only request parcel info if position has changed outside of the
// last parcel grid step
U32 west_parcel_step = (U32) floor( pos.mdV[VX] / PARCEL_GRID_STEP_METERS );
@@ -1387,7 +1381,7 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
if (packed_overlay_size <= 0)
{
- llwarns << "Overlay size " << packed_overlay_size << llendl;
+ LL_WARNS() << "Overlay size " << packed_overlay_size << LL_ENDL;
return;
}
@@ -1395,8 +1389,8 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
if (packed_overlay_size != expected_size)
{
- llwarns << "Got parcel overlay size " << packed_overlay_size
- << " expecting " << expected_size << llendl;
+ LL_WARNS() << "Got parcel overlay size " << packed_overlay_size
+ << " expecting " << expected_size << LL_ENDL;
return;
}
@@ -1462,7 +1456,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (request_result == PARCEL_RESULT_NO_DATA)
{
// no valid parcel data
- llinfos << "no valid parcel data" << llendl;
+ LL_INFOS() << "no valid parcel data" << LL_ENDL;
return;
}
@@ -1494,9 +1488,9 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else
{
- llinfos << "out of order agent parcel sequence id " << sequence_id
+ LL_INFOS() << "out of order agent parcel sequence id " << sequence_id
<< " last good " << parcel_mgr.mAgentParcelSequenceID
- << llendl;
+ << LL_ENDL;
return;
}
@@ -1586,7 +1580,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
if (instance->mTeleportInProgress)
{
instance->mTeleportInProgress = FALSE;
- instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false);
+ if(instance->mTeleportInProgressPosition.isNull())
+ {
+ //initial update
+ instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false);
+ }
+ else
+ {
+ instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false);
+ }
}
}
}
@@ -1745,7 +1747,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else
{
- llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl;
+ LL_INFOS() << "Stopping parcel music (invalid audio stream URL)" << LL_ENDL;
// clears the URL
// null value causes fade out
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
@@ -1753,7 +1755,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
}
else if (!gAudiop->getInternetStreamURL().empty())
{
- llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl;
+ LL_INFOS() << "Stopping parcel music (parcel stream URL is empty)" << LL_ENDL;
// null value causes fade out
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
}
@@ -1781,7 +1783,7 @@ void LLViewerParcelMgr::optionally_start_music(const std::string& music_url)
gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) &&
gSavedSettings.getBOOL("MediaTentativeAutoPlay")))
{
- llinfos << "Starting parcel music " << music_url << llendl;
+ LL_INFOS() << "Starting parcel music " << music_url << LL_ENDL;
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(music_url);
}
else
@@ -1810,7 +1812,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void
if (parcel_id != parcel->getLocalID())
{
LL_WARNS_ONCE("") << "processParcelAccessListReply for parcel " << parcel_id
- << " which isn't the selected parcel " << parcel->getLocalID()<< llendl;
+ << " which isn't the selected parcel " << parcel->getLocalID()<< LL_ENDL;
return;
}
@@ -2495,6 +2497,7 @@ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos
// Non-local teleport (inter-region or between different parcels of the same region).
// The agent parcel data has not been updated yet.
// Let's wait for the update and then emit the signal.
+ mTeleportInProgressPosition = new_pos;
mTeleportInProgress = TRUE;
}
}