diff --git a/indra/newview/alavataractions.cpp b/indra/newview/alavataractions.cpp index 6ca9c44ae2edd2d355c654befd1452c1183ff670..99005f06976cc9467dab686d65020a30619e2c8f 100644 --- a/indra/newview/alavataractions.cpp +++ b/indra/newview/alavataractions.cpp @@ -273,12 +273,12 @@ bool ALAvatarActions::canFreezeEject(const uuid_vec_t& ids) { // Estate owners / managers can freeze // Parcel owners can also freeze - LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global); + LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstanceFast()->selectParcelAt(pos_global); const LLParcel* parcel = selection->getParcel(); auto local_pos = region->getPosRegionFromGlobal(pos_global); if ((region->getOwner() == gAgent.getID() || region->isEstateManager() || region->isOwnedSelf(local_pos)) - || (region->isOwnedGroup(local_pos) && parcel && LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel, GP_LAND_ADMIN))) + || (region->isOwnedGroup(local_pos) && parcel && LLViewerParcelMgr::getInstanceFast()->isParcelOwnedByAgent(parcel, GP_LAND_ADMIN))) { ret = true; } @@ -370,10 +370,10 @@ void ALAvatarActions::parcelEject(const uuid_vec_t& ids) if (pos_it != avatar_positions.cend()) { const auto& pos = pos_it->second; - LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos)->getParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->selectParcelAt(pos)->getParcel(); if (parcel) { - ban_enabled = LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel, GP_LAND_MANAGE_BANNED); + ban_enabled = LLViewerParcelMgr::getInstanceFast()->isParcelOwnedByAgent(parcel, GP_LAND_MANAGE_BANNED); if (!ban_enabled) { ban_killed = true; diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 6d0bc0c190dd223f6fc5c8b9165e24af60bf63a5..7bd1582573fc18402dd62b6f85013e84b9edc7bf 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -318,7 +318,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname) if (channel->getSessionName().empty() && channel->getSessionID().isNull()) { // default channel - allow_agent_voice = LLViewerParcelMgr::getInstance()->allowAgentVoice(); + allow_agent_voice = LLViewerParcelMgr::getInstanceFast()->allowAgentVoice(); } else { @@ -793,7 +793,7 @@ BOOL LLAgent::canFly() LLViewerRegion* regionp = getRegion(); if (regionp && regionp->getBlockFly()) return FALSE; - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return FALSE; // Allow owners to fly on their own land. @@ -4257,7 +4257,7 @@ void LLAgent::handleTeleportFailed() void LLAgent::addTPNearbyChatSeparator() { LLViewerRegion* agent_region = gAgent.getRegion(); - LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* agent_parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!agent_region || !agent_parcel) { return; @@ -4635,7 +4635,7 @@ void LLAgent::setTeleportState(ETeleportState state) //LLViewerStats::getInstance()->mAgentPositionSnaps.mCountOfNextUpdatesToIgnore = 2; // Let the interested parties know we've teleported. - LLViewerParcelMgr::getInstance()->onTeleportFinished(false, getPositionGlobal()); + LLViewerParcelMgr::getInstanceFast()->onTeleportFinished(false, getPositionGlobal()); break; default: @@ -5305,7 +5305,7 @@ LLUUID LLAgent::getGroupForRezzing() { if (gSavedSettings.getBOOL("AlchemyRezUnderLandGroup")) { - LLParcel* land_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* land_parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); // Is the agent in the land group if (gAgent.isInGroup(land_parcel->getGroupID())) return land_parcel->getGroupID(); diff --git a/indra/newview/llagentui.cpp b/indra/newview/llagentui.cpp index 149f1a6d91deca0053c9947b6e88133afe66757b..ba89b14e8d93b06c96a5773b9694cfa811c89967 100644 --- a/indra/newview/llagentui.cpp +++ b/indra/newview/llagentui.cpp @@ -72,7 +72,7 @@ BOOL LLAgentUI::checkAgentDistance(const LLVector3& pole, F32 radius) BOOL LLAgentUI::buildLocationString(std::string& str, ELocationFormat fmt,const LLVector3& agent_pos_region) { LLViewerRegion* region = gAgent.getRegion(); - LLViewerParcelMgr& parcelMGr = LLViewerParcelMgr::instance(); + LLViewerParcelMgr& parcelMGr = LLViewerParcelMgr::instanceFast(); LLParcel* parcel = parcelMGr.getAgentParcel(); if (!region || !parcel) return FALSE; diff --git a/indra/newview/llaudiosourcevo.cpp b/indra/newview/llaudiosourcevo.cpp index bb9ab0f45351cf1a525db10fe101d06e96ec07c4..74ee159cd8a4a217b3f60b0c624a7fa2181facbc 100644 --- a/indra/newview/llaudiosourcevo.cpp +++ b/indra/newview/llaudiosourcevo.cpp @@ -142,14 +142,14 @@ void LLAudioSourceVO::updateMute() F32 cutoff = mObjectp->getSoundCutOffRadius(); if ((cutoff > 0.1f && !isInCutOffRadius(pos_global, cutoff)) // consider cutoff below 0.1m as off - || !LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) + || !LLViewerParcelMgr::getInstanceFast()->canHearSound(pos_global)) { mute = true; } if (!mute) { - auto& mute_list = LLMuteList::instance(); + auto& mute_list = LLMuteList::instanceFast(); if (mute_list.isMuted(mObjectp->getID())) { mute = true; diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index dfed6c01f27ffdae84e6b18ed90c77a76ce5ed76..ddc014d6ea7356a89b5ed0abb18fdc1621bb0162 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -923,7 +923,7 @@ const LLSettingsWater::ptr_t& LLEnvironment::getCurrentWater() const bool LLEnvironment::canAgentUpdateParcelEnvironment() const { - LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel()); + LLParcel *parcel(LLViewerParcelMgr::instanceFast().getAgentOrSelectedParcel()); return canAgentUpdateParcelEnvironment(parcel); } @@ -989,7 +989,7 @@ void LLEnvironment::onRegionChange() void LLEnvironment::onParcelChange() { S32 parcel_id(INVALID_PARCEL_ID); - LLParcel* parcel = LLViewerParcelMgr::instance().getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::instanceFast().getAgentParcel(); if (parcel) { @@ -3340,7 +3340,7 @@ namespace } { - LLParcel* parcel = LLViewerParcelMgr::instance().getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::instanceFast().getAgentParcel(); if (!parcel) return; @@ -3459,7 +3459,7 @@ namespace void DayInjection::onParcelChange() { S32 parcel_id(INVALID_PARCEL_ID); - LLParcel* parcel = LLViewerParcelMgr::instance().getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::instanceFast().getAgentParcel(); if (!parcel) return; diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 1478859a3fefc7bc814a7992b6f06093c07a6425..7007ce823e805a972c58ef89140bedad3f72f06f 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -841,7 +841,7 @@ void LLLocationInputCtrl::refreshParcelIcons() // Our "cursor" moving right to left S32 x = mAddLandmarkBtn->getRect().mLeft; - LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstanceFast(); LLViewerRegion* agent_region = gAgent.getRegion(); LLParcel* agent_parcel = vpm->getAgentParcel(); diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index e9530373f6695adf2ab2641f8d2322518b95c94e..5f733ca3a35a48e41f55f15213f572cfc4fa56d5 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -845,7 +845,7 @@ BOOL LLNetMap::handleToolTipAgent(const LLUUID& avatar_id) || existing_inspector->getKey()["avatar_id"].asUUID() != avatar_id) { LLInspector::Params p; - p.fillFrom(LLUICtrlFactory::instance().getDefaultParams<LLInspector>()); + p.fillFrom(LLUICtrlFactory::getDefaultParams<LLInspector>()); p.message(av_name.getCompleteName()); p.image.name("Inspector_I"); p.click_callback(boost::bind(showAvatarInspector, avatar_id)); @@ -1009,7 +1009,7 @@ void LLNetMap::renderPropertyLinesForRegion(const LLViewerRegion* region, const const S32 GRIDS_PER_EDGE = real_width / GRID_STEP; const U8* ownership = region->getParcelOverlay()->getOwnership(); - const U8* collision = (region->getHandle() == LLViewerParcelMgr::instance().getCollisionRegionHandle()) ? LLViewerParcelMgr::instance().getCollisionBitmap() : NULL; + const U8* collision = (region->getHandle() == LLViewerParcelMgr::instanceFast().getCollisionRegionHandle()) ? LLViewerParcelMgr::instanceFast().getCollisionBitmap() : NULL; for (S32 idxRow = 0; idxRow < GRIDS_PER_EDGE; idxRow++) { for (S32 idxCol = 0; idxCol < GRIDS_PER_EDGE; idxCol++) diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp index 092196ff4f5ea0038b9a81d692c29a91049eddcc..e47b439d598ebaf3685860e59242abfc2c3843b1 100644 --- a/indra/newview/llpaneltopinfobar.cpp +++ b/indra/newview/llpaneltopinfobar.cpp @@ -281,7 +281,7 @@ void LLPanelTopInfoBar::updateParcelInfoText() void LLPanelTopInfoBar::updateParcelIcons() { - LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstanceFast(); LLViewerRegion* agent_region = gAgent.getRegion(); LLParcel* agent_parcel = vpm->getAgentParcel(); diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp index 64f7874e7b27cd9794c4cae136f5dfdd42388442..fb4349f55c94c7bacedbe7f7aa25328fba86a232 100644 --- a/indra/newview/lltoolmgr.cpp +++ b/indra/newview/lltoolmgr.cpp @@ -266,7 +266,7 @@ bool LLToolMgr::inEdit() bool LLToolMgr::canEdit() { // [RLVa:KB] - Patch: RLVa-2.1.0 - return LLViewerParcelMgr::getInstance()->allowAgentBuild() && RlvActions::canBuild(); + return LLViewerParcelMgr::getInstanceFast()->allowAgentBuild() && RlvActions::canBuild(); // [/RLVa:KB] // return LLViewerParcelMgr::getInstance()->allowAgentBuild(); } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5f49456614b755e3c82c07d6d6a22b39bdcadfde..4db532a43501bef71fd6b88368abbe0761a73e21 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -241,12 +241,12 @@ BOOL LLToolPie::handleLeftClickPick() MASK mask = mPick.mKeyMask; if (mPick.mPickType == LLPickInfo::PICK_PARCEL_WALL) { - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getCollisionParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getCollisionParcel(); if (parcel) { - LLViewerParcelMgr::getInstance()->selectCollisionParcel(); + LLViewerParcelMgr::getInstanceFast()->selectCollisionParcel(); if (parcel->getParcelFlag(PF_USE_PASS_LIST) - && !LLViewerParcelMgr::getInstance()->isCollisionBanned()) + && !LLViewerParcelMgr::getInstanceFast()->isCollisionBanned()) { // if selling passes, just buy one void* deselect_when_done = (void*)TRUE; @@ -269,7 +269,7 @@ BOOL LLToolPie::handleLeftClickPick() if (mPick.mPickType != LLPickInfo::PICK_LAND) { - LLViewerParcelMgr::getInstance()->deselectLand(); + LLViewerParcelMgr::getInstanceFast()->deselectLand(); } if (object) @@ -993,12 +993,12 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg) static const LLCachedControl<bool> show_land_hover_tips(gSavedSettings, "ShowLandHoverTip"); if (!show_land_hover_tips) return TRUE; - LLViewerParcelMgr::getInstance()->setHoverParcel( mHoverPick.mPosGlobal ); + LLViewerParcelMgr::getInstanceFast()->setHoverParcel( mHoverPick.mPosGlobal ); // Didn't hit an object, but since we have a land point we // must be hovering over land. - LLParcel* hover_parcel = LLViewerParcelMgr::getInstance()->getHoverParcel(); + LLParcel* hover_parcel = LLViewerParcelMgr::getInstanceFast()->getHoverParcel(); LLUUID owner; if ( hover_parcel ) @@ -1454,7 +1454,7 @@ void LLToolPie::showObjectInspector(const LLUUID& object_id, const S32& object_f void LLToolPie::playCurrentMedia(const LLPickInfo& info) { //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return; LLPointer<LLViewerObject> objectp = info.getObject(); @@ -1630,7 +1630,7 @@ void LLToolPie::render() static void handle_click_action_play() { - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return; LLViewerMediaImpl::EMediaStatus status = LLViewerParcelMedia::getInstance()->getStatus(); @@ -1653,7 +1653,7 @@ static void handle_click_action_play() bool LLToolPie::handleMediaClick(const LLPickInfo& pick) { //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); LLPointer<LLViewerObject> objectp = pick.getObject(); @@ -1707,7 +1707,7 @@ bool LLToolPie::handleMediaClick(const LLPickInfo& pick) bool LLToolPie::handleMediaDblClick(const LLPickInfo& pick) { //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); LLPointer<LLViewerObject> objectp = pick.getObject(); @@ -1761,7 +1761,7 @@ bool LLToolPie::handleMediaDblClick(const LLPickInfo& pick) bool LLToolPie::handleMediaHover(const LLPickInfo& pick) { //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return false; LLPointer<LLViewerObject> objectp = pick.getObject(); @@ -1841,7 +1841,7 @@ bool LLToolPie::handleMediaMouseUp() static void handle_click_action_open_media(LLPointer<LLViewerObject> objectp) { //FIXME: how do we handle object in different parcel than us? - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return; // did we hit an object? @@ -1872,7 +1872,7 @@ static ECursorType cursor_from_parcel_media(U8 click_action) //FIXME: how do we handle object in different parcel than us? ECursorType open_cursor = UI_CURSOR_ARROW; - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (!parcel) return open_cursor; open_cursor = UI_CURSOR_TOOLMEDIAOPEN; @@ -1897,7 +1897,7 @@ BOOL LLToolPie::handleRightClickPick() if (mPick.mPickType != LLPickInfo::PICK_LAND) { - LLViewerParcelMgr::getInstance()->deselectLand(); + LLViewerParcelMgr::getInstanceFast()->deselectLand(); } // didn't click in any UI object, so must have clicked in the world @@ -1909,7 +1909,7 @@ BOOL LLToolPie::handleRightClickPick() // Spawn pie menu if (mPick.mPickType == LLPickInfo::PICK_LAND) { - LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal ); + LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstanceFast()->selectParcelAt( mPick.mPosGlobal ); gMenuHolder->setParcelSelection(selection); gMenuLand->show(x, y); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index c96e116c55d79d764215d79228c4de99ae2efbbc..da0b40cc0680571fe60b70befbdde2bd0f8db3a8 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1022,7 +1022,7 @@ void LLViewerMedia::setAllMediaPaused(bool val) } } - LLParcel *agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *agent_parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); // Also do Parcel Media and Parcel Audio if (!val) @@ -1496,7 +1496,7 @@ bool LLViewerMedia::hasParcelAudio() ////////////////////////////////////////////////////////////////////////////////////////// std::string LLViewerMedia::getParcelAudioURL() { - return LLViewerParcelMgr::getInstance()->getAgentParcel()->getMusicURL(); + return LLViewerParcelMgr::getInstanceFast()->getAgentParcel()->getMusicURL(); } ////////////////////////////////////////////////////////////////////////////////////////// @@ -3996,5 +3996,5 @@ LLNotificationPtr LLViewerMediaImpl::getCurrentNotification() const // static bool LLViewerMediaImpl::isObjectInAgentParcel(LLVOVolume *obj) { - return (LLViewerParcelMgr::getInstance()->inAgentParcel(obj->getPositionGlobal())); + return (LLViewerParcelMgr::getInstanceFast()->inAgentParcel(obj->getPositionGlobal())); } diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index 8ef5511d8554d1d613e5121065c67b2fa4021bda..cf29b536b4f84a8b97c21f9ac594dff7a7c55123 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -67,7 +67,7 @@ LLViewerMediaFocus::~LLViewerMediaFocus() void LLViewerMediaFocus::setFocusFace(LLPointer<LLViewerObject> objectp, S32 face, viewer_media_t media_impl, LLVector3 pick_normal) { - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); LLViewerMediaImpl *old_media_impl = getFocusedMediaImpl(); if(old_media_impl) diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9b7efe968e4301050cb3834f3acd5e1d03905828..4818aa07139cec6fa45abd8bc9cbd988db9408c5 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4119,7 +4119,7 @@ void process_sound_trigger(LLMessageSystem *msg, void **) // Don't play a trigger sound if you can't hear it due // to parcel "local audio only" settings. - if (!LLViewerParcelMgr::getInstance()->canHearSound(pos_global)) return; + if (!LLViewerParcelMgr::getInstanceFast()->canHearSound(pos_global)) return; // Don't play sounds triggered by someone you muted. if (LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagObjectSounds)) return; diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index a0f62634049b7b0058a85bd4f26b8236a7031ffb..194cb0ffc317a7ebd52360046942ee1af01f62a0 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -290,13 +290,13 @@ std::string LLViewerParcelMedia::getURL() if(mMediaImpl.notNull()) url = mMediaImpl->getMediaURL(); - if(stricmp(LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaType().c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) + if(stricmp(LLViewerParcelMgr::getInstanceFast()->getAgentParcel()->getMediaType().c_str(), LLMIMETypes::getDefaultMimeType().c_str()) != 0) { if (url.empty()) - url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL(); + url = LLViewerParcelMgr::getInstanceFast()->getAgentParcel()->getMediaCurrentURL(); if (url.empty()) - url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaURL(); + url = LLViewerParcelMgr::getInstanceFast()->getAgentParcel()->getMediaURL(); } return url; @@ -363,7 +363,7 @@ void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg } else { - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); play(parcel); } } @@ -379,7 +379,7 @@ void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg { if(mMediaImpl.isNull()) { - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); play(parcel); } seek(time); @@ -419,7 +419,7 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg) msg->getS32("DataBlockExtended", "MediaHeight", media_height); } - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); BOOL same = FALSE; if (parcel) { @@ -457,7 +457,7 @@ void LLViewerParcelMedia::sendMediaNavigateMessage(const std::string& url) // send navigate event to sim for link sharing LLSD body; body["agent-id"] = gAgent.getID(); - body["local-id"] = LLViewerParcelMgr::getInstance()->getAgentParcel()->getLocalID(); + body["local-id"] = LLViewerParcelMgr::getInstanceFast()->getAgentParcel()->getLocalID(); body["url"] = url; LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(region_url, body, diff --git a/indra/newview/llviewerparcelmediaautoplay.cpp b/indra/newview/llviewerparcelmediaautoplay.cpp index db8fcb4dc48a3866acec54a594f6e541a51d8eeb..2bb9e48bc1cbba9c504ed9b9edef3465c1180975 100644 --- a/indra/newview/llviewerparcelmediaautoplay.cpp +++ b/indra/newview/llviewerparcelmediaautoplay.cpp @@ -77,7 +77,7 @@ BOOL LLViewerParcelMediaAutoPlay::tick() this_region_id = this_region->getRegionID(); } - this_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + this_parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if (this_parcel) { @@ -164,7 +164,7 @@ void LLViewerParcelMediaAutoPlay::onStartMediaResponse(const LLUUID ®ion_id, { if (play) { - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); // make sure we are still there if (parcel->getLocalID() == parcel_id && gAgent.getRegion()->getRegionID() == region_id) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 9784907fc9bfe95acde4021a3296a8fc8f020b94..d5123f809a74164d509ed1bc1bfeafa988b91587 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -688,7 +688,7 @@ LLParcel * LLViewerParcelMgr::getAgentOrSelectedParcel() const } if (!parcel) - parcel = LLViewerParcelMgr::instance().getAgentParcel(); + parcel = getAgentParcel(); return parcel; } @@ -820,12 +820,12 @@ BOOL LLViewerParcelMgr::canHearSound(const LLVector3d &pos_global) const } else { - if (LLViewerParcelMgr::getInstance()->getAgentParcel()->getSoundLocal()) + if (getAgentParcel()->getSoundLocal()) { // Not in same parcel, and agent parcel only has local sound return FALSE; } - else if (LLViewerParcelMgr::getInstance()->isSoundLocal(pos_global)) + else if (isSoundLocal(pos_global)) { // Not in same parcel, and target parcel only has local sound return FALSE; @@ -1577,7 +1577,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use S32 other_clean_time = 0; - LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance(); + LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instanceFast(); LLViewerRegion* msg_region = LLWorld::getInstanceFast()->getRegion(msg->getSender()); if(msg_region) parcel_mgr.mParcelsPerEdge = S32(msg_region->getWidth() / PARCEL_GRID_STEP_METERS); @@ -1739,19 +1739,17 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use delete[] bitmap; // Let interesting parties know about agent parcel change. - LLViewerParcelMgr* instance = LLViewerParcelMgr::getInstance(); - - if (instance->mTeleportInProgress) + if (parcel_mgr.mTeleportInProgress) { - instance->mTeleportInProgress = FALSE; - if(instance->mTeleportInProgressPosition.isNull()) + parcel_mgr.mTeleportInProgress = FALSE; + if(parcel_mgr.mTeleportInProgressPosition.isNull()) { //initial update - instance->mTeleportFinishedSignal(gAgent.getPositionGlobal(), false); + parcel_mgr.mTeleportFinishedSignal(gAgent.getPositionGlobal(), false); } else { - instance->mTeleportFinishedSignal(instance->mTeleportInProgressPosition, false); + parcel_mgr.mTeleportFinishedSignal(parcel_mgr.mTeleportInProgressPosition, false); } } parcel->setParcelEnvironmentVersion(parcel_environment_version); @@ -1759,7 +1757,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use // Notify anything that wants to know when the agent changes parcels gAgent.changeParcels(); - instance->mTeleportInProgress = FALSE; + parcel_mgr.mTeleportInProgress = FALSE; } else if (agent_parcel_update) { @@ -2031,7 +2029,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void msg->getU32Fast( _PREHASH_Data, _PREHASH_Flags, message_flags); msg->getS32Fast( _PREHASH_Data, _PREHASH_LocalID, parcel_id); - LLParcel* parcel = LLViewerParcelMgr::getInstance()->mCurrentParcel; + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->mCurrentParcel; if (!parcel) return; if (parcel_id != parcel->getLocalID()) @@ -2062,7 +2060,7 @@ void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void parcel->unpackAccessEntries(msg, &(parcel->mRenterList) ); }*/ - LLViewerParcelMgr::getInstance()->notifyObservers(); + LLViewerParcelMgr::getInstanceFast()->notifyObservers(); } @@ -2081,10 +2079,11 @@ void LLViewerParcelMgr::processParcelDwellReply(LLMessageSystem* msg, void**) F32 dwell; msg->getF32Fast(_PREHASH_Data, _PREHASH_Dwell, dwell); - if (local_id == LLViewerParcelMgr::getInstance()->mCurrentParcel->getLocalID()) + auto& parcel_mgr = LLViewerParcelMgr::instanceFast(); + if (local_id == parcel_mgr.mCurrentParcel->getLocalID()) { - LLViewerParcelMgr::getInstance()->mSelectedDwell = dwell; - LLViewerParcelMgr::getInstance()->notifyObservers(); + parcel_mgr.mSelectedDwell = dwell; + parcel_mgr.notifyObservers(); } } @@ -2209,13 +2208,13 @@ bool LLViewerParcelMgr::deedAlertCB(const LLSD& notification, const LLSD& respon S32 option = LLNotificationsUtil::getSelectedOption(notification, response); if (option == 0) { - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getParcelSelection()->getParcel(); LLUUID group_id; if(parcel) { group_id = parcel->getGroupID(); } - LLViewerParcelMgr::getInstance()->sendParcelDeed(group_id); + LLViewerParcelMgr::getInstanceFast()->sendParcelDeed(group_id); } return false; } @@ -2516,8 +2515,8 @@ void LLViewerParcelMgr::startDeedLandToGroup() } void LLViewerParcelMgr::reclaimParcel() { - LLParcel* parcel = LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(); - LLViewerRegion* regionp = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + LLParcel* parcel = LLViewerParcelMgr::getInstanceFast()->getParcelSelection()->getParcel(); + LLViewerRegion* regionp = LLViewerParcelMgr::getInstanceFast()->getSelectionRegion(); if(parcel && parcel->getOwnerID().notNull() && (parcel->getOwnerID() != gAgent.getID()) && regionp && (regionp->getOwner() == gAgent.getID())) @@ -2540,7 +2539,7 @@ bool LLViewerParcelMgr::releaseAlertCB(const LLSD& notification, const LLSD& res if (option == 0) { // Send the release message, not a force - LLViewerParcelMgr::getInstance()->sendParcelRelease(); + LLViewerParcelMgr::getInstanceFast()->sendParcelRelease(); } return false; } @@ -2688,7 +2687,7 @@ boost::signals2::connection LLViewerParcelMgr::setTeleportDoneCallback(teleport_ void LLViewerParcelMgr::onTeleportFinished(bool local, const LLVector3d& new_pos) { // Treat only teleports within the same parcel as local (EXT-3139). - if (local && LLViewerParcelMgr::getInstance()->inAgentParcel(new_pos)) + if (local && inAgentParcel(new_pos)) { // Local teleport. We already have the agent parcel data. // Emit the signal immediately. diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 46c6ff328a4269cf581b9638d86ae402f57e81a3..69a1ad654017a2556a87ffa936b34e7c41daa049 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3857,7 +3857,7 @@ void LLViewerWindow::updateUI() // cleanup unused selections when no modal dialogs are open if (LLModalDialog::activeCount() == 0) { - LLViewerParcelMgr::getInstance()->deselectUnused(); + LLViewerParcelMgr::getInstanceFast()->deselectUnused(); } if (LLModalDialog::activeCount() == 0) @@ -4144,7 +4144,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, { if (pick_parcel_walls) { - LLViewerParcelMgr::getInstance()->renderParcelCollision(); + LLViewerParcelMgr::getInstanceFast()->renderParcelCollision(); } } else if (( for_hud && selection->getSelectType() == SELECT_TYPE_HUD) || @@ -5397,7 +5397,7 @@ void LLViewerWindow::drawMouselookInstructions() LLColor4(0.5f, 0.5f, 1.0f, 0.5f), LLFontGL::HCENTER, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW); - LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance(); + LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstanceFast(); const bool allow_damage = vpm->allowAgentDamage(gAgent.getRegion(), vpm->getAgentParcel()); if (allow_damage) { diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 2f5942e9516174f11762185442b6a5f67e0cd84c..50f5ea203e0356bb284802bdd379511a6d42f217 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -4651,7 +4651,7 @@ LLVivoxVoiceClient::participantStatePtr_t LLVivoxVoiceClient::findParticipantByI bool LLVivoxVoiceClient::checkParcelChanged(bool update) { LLViewerRegion *region = gAgent.getRegion(); - LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); if(region && parcel) { diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 9683931246b419317aeeba4cd62698f196b8568a..60d40a7d29ff09f63ec510d8cb5fa65f17ba2233 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -493,7 +493,7 @@ void RlvUtil::filterLocation(std::string& strUTF8Text) } // Filter any mention of the parcel name - LLViewerParcelMgr* pParcelMgr = LLViewerParcelMgr::getInstance(); + LLViewerParcelMgr* pParcelMgr = LLViewerParcelMgr::getInstanceFast(); if (pParcelMgr) boost::replace_all_regex(strUTF8Text, boost::regex("\\b" + escape_for_regex(pParcelMgr->getAgentParcelName()) + "\\b", boost::regex::icase), RlvStrings::getString(RlvStringKeys::Hidden::Parcel)); } diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index a157678ccc6d08ff86d8c6970db52da03431fed3..5b56e67068414357e90b8b6efd2616882637241f 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -386,13 +386,13 @@ bool RlvUIEnabler::canViewParcelProperties() { // RELEASE-RLVa: [SL-3.2] Check that opening the "About Land" floater still sets focus to the current parcel is none is selected const LLParcel* pParcel = NULL; - if (LLViewerParcelMgr::getInstance()->selectionEmpty()) + if (LLViewerParcelMgr::getInstanceFast()->selectionEmpty()) { - pParcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + pParcel = LLViewerParcelMgr::getInstanceFast()->getAgentParcel(); } else { - LLParcelSelection* pParcelSel = LLViewerParcelMgr::getInstance()->getFloatingParcelSelection(); + LLParcelSelection* pParcelSel = LLViewerParcelMgr::getInstanceFast()->getFloatingParcelSelection(); if (pParcelSel->hasOthersSelected()) return false; pParcel = pParcelSel->getParcel();