Compare commits

..

26 Commits

Author SHA1 Message Date
Liru Færs
8163448a6c [RLVa] Always show your own hover tip 2020-01-15 23:55:42 -05:00
Liru Færs
ac0e93dcad People don't seem to know what an ARC is... it's Complexity 2020-01-15 23:55:13 -05:00
Liru Færs
ed420c3645 Add Edit and Add to Selection to Object UI menus 2020-01-15 19:46:49 -05:00
Liru Færs
b872860443 Fix crash in land floater init when null region (disconnected?)
Fixes crash 2E
Cleans up code
2020-01-15 14:00:00 -05:00
Liru Færs
992f4c7b5d Modernize/sync LLSpeakers code 2020-01-15 12:57:58 -05:00
Liru Færs
8f15478ba4 Condense code~ 2020-01-15 12:56:56 -05:00
Liru Færs
1c371e7be6 Allow touching multiple objects in succession 2020-01-14 19:37:53 -05:00
Liru Færs
937c80f694 Fix an oopsie in Debug Settings, Thanks for the heads up, Yuriko 2020-01-14 15:53:42 -05:00
Liru Færs
15bd41bd71 Add Touch to object ui menus 2020-01-14 15:52:58 -05:00
Liru Færs
b9156b7955 Combine send_ObjectDeGrab and send_ObjectGrab repetitive code 2020-01-14 10:49:46 -05:00
Liru Færs
623a484ae3 Woops, gotta do a char array for that, also set errno to 0 2020-01-13 18:35:08 -05:00
Liru Færs
2ace698101 [Follow] Automatically accept Teleport Requests/Offers from the leader 2020-01-13 02:20:33 -05:00
Liru Færs
34e0c722e7 Don't cancel autopilot when escaping out of customize appearance 2020-01-13 01:34:06 -05:00
Liru Færs
82ee06a6bd Add Find on Map to avatar UI menus 2020-01-13 01:33:26 -05:00
Liru Færs
584ee8fffe const byref autopilot accessors 2020-01-13 00:29:51 -05:00
Liru Færs
d80d232ee5 Don't cancel follow if the target disappears, wait for them 2020-01-12 23:57:20 -05:00
Liru Færs
de47736038 Ignore object kills if our region is null
Fixes crash 1R
2020-01-12 20:06:01 -05:00
Liru Færs
0da16e6034 Some days, I scream in the faces of cats 2020-01-12 16:27:19 -05:00
Liru Færs
6c9a156610 Maybe fix pusssycat's issue with clicking for group profile being broken 2020-01-12 14:47:52 -05:00
Liru Færs
1726c27078 Fix for Linux file rename failures, thanks Taya and Router! 2020-01-12 13:23:02 -05:00
Liru Færs
64b43a47b5 Clean up ScriptCounter code more 2020-01-12 12:33:10 -05:00
Liru Færs
8005a58ed5 Script Counting on an avatar now shows their SLURL, instead of just a name 2020-01-11 21:53:29 -05:00
Liru Færs
d1d42701f5 Fix taya's linux crash, thanks to taya and router!
Crash was due to invalidated iterator
2020-01-11 21:00:16 -05:00
Liru Færs
c57fceff17 Modernizing scriptcounter code 2020-01-11 20:23:31 -05:00
Liru Færs
265336463d Add FMOD Logo to login screen to comply with licensing
Adds code to hide the new UI when compiled without FMOD Studio
2020-01-11 04:32:42 -05:00
Liru Færs
3ba1c88672 Remove reference to dead control 2020-01-11 03:01:28 -05:00
43 changed files with 385 additions and 248 deletions

View File

@@ -281,6 +281,11 @@ int LLFile::rename_nowarn(const std::string& filename, const std::string& newnam
int rc = _wrename(utf16filename.c_str(),utf16newname.c_str());
#else
int rc = ::rename(filename.c_str(),newname.c_str());
if (rc == -1 && errno == EXDEV)
{
rc = std::system(("mv '" + filename + "' '" + newname + '\'').data());
errno = 0;
}
#endif
return rc;
}

View File

@@ -1433,6 +1433,7 @@ endif (OPENAL)
if (USE_FMODSTUDIO)
list(APPEND LLSTARTUP_COMPILE_DEFINITIONS "LL_FMODSTUDIO=1")
set_source_files_properties(llpanellogin.cpp PROPERTIES COMPILE_DEFINITIONS "LL_FMODSTUDIO=1")
endif (USE_FMODSTUDIO)
set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_DEFINITIONS "${LLSTARTUP_COMPILE_DEFINITIONS}")

View File

@@ -1822,8 +1822,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
auto pos = get_av_pos(mLeaderID);
if (pos.isExactlyZero()) // Default constructed or invalid from server
{
mAutoPilotBehaviorName.clear(); // Nothing left to follow pilot
stopAutoPilot();
// Wait for them for more follow pilot
return;
}
standUp(); // Leader not rendered, we mustn't be sitting

View File

@@ -593,13 +593,13 @@ public:
public:
BOOL getAutoPilot() const { return mAutoPilot; }
LLVector3d getAutoPilotTargetGlobal() const { return mAutoPilotTargetGlobal; }
LLUUID getAutoPilotLeaderID() const { return mLeaderID; }
const LLUUID& getAutoPilotLeaderID() const { return mLeaderID; }
F32 getAutoPilotStopDistance() const { return mAutoPilotStopDistance; }
F32 getAutoPilotTargetDist() const { return mAutoPilotTargetDist; }
BOOL getAutoPilotUseRotation() const { return mAutoPilotUseRotation; }
LLVector3 getAutoPilotTargetFacing() const { return mAutoPilotTargetFacing; }
F32 getAutoPilotRotationThreshold() const { return mAutoPilotRotationThreshold; }
std::string getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; }
const std::string& getAutoPilotBehaviorName() const { return mAutoPilotBehaviorName; }
void startAutoPilotGlobal(const LLVector3d &pos_global,
const std::string& behavior_name = std::string(),

View File

@@ -289,11 +289,6 @@ LLAgentCamera::~LLAgentCamera()
//-----------------------------------------------------------------------------
void LLAgentCamera::resetView(BOOL reset_camera, BOOL change_camera)
{
if (gAgent.getAutoPilot())
{
gAgent.stopAutoPilot(TRUE);
}
LLSelectMgr::getInstance()->unhighlightAll();
// By popular request, keep land selection while walking around. JC

View File

@@ -1872,10 +1872,13 @@ BOOL LLPanelLandOptions::postBuild()
mMatureCtrl = getChild<LLCheckBoxCtrl>( "MatureCheck");
childSetCommitCallback("MatureCheck", onCommitAny, this);
mGamingCtrl = getChild<LLCheckBoxCtrl>( "GamingCheck");
childSetCommitCallback("GamingCheck", onCommitAny, this);
mGamingCtrl->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_PARCEL));
mGamingCtrl->setEnabled(false);
if (mGamingCtrl = getChild<LLCheckBoxCtrl>( "GamingCheck"))
{
auto region = gAgent.getRegion();
mGamingCtrl->setCommitCallback(boost::bind(&LLPanelLandOptions::onCommitAny, _1, this));
mGamingCtrl->setVisible(region && (region->getGamingFlags() & REGION_GAMING_PRESENT) && !(region->getGamingFlags() & REGION_GAMING_HIDE_PARCEL));
mGamingCtrl->setEnabled(false);
}
mPublishHelpButton = getChild<LLButton>("?");
mPublishHelpButton->setClickedCallback(onClickPublishHelp, this);

View File

@@ -339,10 +339,10 @@ void LLFloaterSettingsDebug::updateControl()
mValSpinner2->setMaxValue(F32_MAX);
mValSpinner3->setMaxValue(F32_MAX);
mValSpinner4->setMaxValue(F32_MAX);
mValSpinner1->setMinValue(F32_MIN);
mValSpinner2->setMinValue(F32_MIN);
mValSpinner3->setMinValue(F32_MIN);
mValSpinner4->setMinValue(F32_MIN);
mValSpinner1->setMinValue(-F32_MAX);
mValSpinner2->setMinValue(-F32_MAX);
mValSpinner3->setMinValue(-F32_MAX);
mValSpinner4->setMinValue(-F32_MAX);
if (!mValSpinner1->hasFocus())
{
mValSpinner1->setIncrement(0.1f);

View File

@@ -66,6 +66,7 @@
#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llglheaders.h"
#include "llviewertexturelist.h"
//#include "lltoolobjpicker.h"
@@ -271,7 +272,7 @@ void LLHoverView::updateText()
line.clear();
if (hit_object->isAvatar())
{
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
if (gAgentAvatarp != hit_object && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
return; // No tag, no tip.
LLNameValue* title = hit_object->getNVPair("Title");
LLNameValue* firstname = hit_object->getNVPair("FirstName");
@@ -307,7 +308,7 @@ void LLHoverView::updateText()
}
mText.push_back(line);
mText.push_back(llformat("ARC: %d", hit_object->asAvatar()->getVisualComplexity()));
mText.push_back(LLTrans::getString("Complexity", LLSD().with("NUM", static_cast<LLSD::Integer>(hit_object->asAvatar()->getVisualComplexity()))));
}
else
{

View File

@@ -144,7 +144,7 @@ void LLNameUI::showProfile()
{
if (!mAllowInteract) return;
switch (LFIDBearer::getActiveType())
switch (mType)
{
case LFIDBearer::GROUP: LLGroupActions::show(mNameID); break;
case LFIDBearer::AVATAR: LLAvatarActions::showProfile(mNameID); break;

View File

@@ -237,6 +237,10 @@ LLPanelLogin::LLPanelLogin(const LLRect& rect)
reshape(rect.getWidth(), rect.getHeight());
#ifndef LL_FMODSTUDIO
getChildView("fmod_logo")->setVisible(false);
#endif
LLComboBox* username_combo(getChild<LLComboBox>("username_combo"));
username_combo->setCommitCallback(boost::bind(LLPanelLogin::onSelectLoginEntry, _2));
username_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLoginComboLostFocus, this, username_combo));

View File

@@ -193,10 +193,10 @@ void LLPanelPermissions::disableAll()
}
getChildView("Group:")->setEnabled(FALSE);
if (auto view = getChildView("Group Name Proxy"))
if (mLabelGroupName)
{
view->setValue(LLUUID::null);
view->setEnabled(FALSE);
mLabelGroupName->setNameID(LLUUID::null, LFIDBearer::GROUP);
mLabelGroupName->setEnabled(FALSE);
}
getChildView("button set group")->setEnabled(FALSE);
@@ -454,7 +454,7 @@ void LLPanelPermissions::refresh()
if(mLabelGroupName)
{
mLabelGroupName->setNameID(LLUUID::null, LFIDBearer::GROUP);
mLabelGroupName->refresh(LLUUID::null, std::string());
mLabelGroupName->setNameText();
mLabelGroupName->setEnabled(FALSE);
}
}

View File

@@ -240,7 +240,7 @@ LLSpeakersDelayActionsStorage::~LLSpeakersDelayActionsStorage()
void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id)
{
bool not_found = true;
if (mActionTimersMap.size() > 0)
if (!mActionTimersMap.empty())
{
not_found = mActionTimersMap.find(speaker_id) == mActionTimersMap.end();
}
@@ -258,7 +258,7 @@ void LLSpeakersDelayActionsStorage::setActionTimer(const LLUUID& speaker_id)
void LLSpeakersDelayActionsStorage::unsetActionTimer(const LLUUID& speaker_id)
{
if (mActionTimersMap.size() == 0) return;
if (mActionTimersMap.empty()) return;
LLSpeakerActionTimer::action_timer_iter_t it_speaker = mActionTimersMap.find(speaker_id);
@@ -434,8 +434,8 @@ void LLSpeakerMgr::update(BOOL resort_ok)
return;
}
LLColor4 speaking_color = gSavedSettings.getColor4("SpeakingColor");
LLColor4 overdriven_color = gSavedSettings.getColor4("OverdrivenColor");
static const LLCachedControl<LLColor4> speaking_color(gSavedSettings, "SpeakingColor");
static const LLCachedControl<LLColor4> overdriven_color(gSavedSettings, "OverdrivenColor");
if(resort_ok) // only allow list changes when user is not interacting with it
{
@@ -445,10 +445,10 @@ void LLSpeakerMgr::update(BOOL resort_ok)
// update status of all current speakers
BOOL voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
bool re_sort = false;
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
for (auto& speaker : mSpeakers)
{
LLUUID speaker_id = speaker_it->first;
LLSpeaker* speakerp = speaker_it->second;
LLUUID speaker_id = speaker.first;
LLSpeaker* speakerp = speaker.second;
if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id))
{
@@ -532,12 +532,8 @@ void LLSpeakerMgr::update(BOOL resort_ok)
bool index_changed = false;
S32 recent_speaker_count = 0;
S32 sort_index = 0;
for (speaker_list_t::iterator sorted_speaker_it = mSpeakersSorted.begin();
sorted_speaker_it != mSpeakersSorted.end();
++sorted_speaker_it)
for (auto speakerp : mSpeakersSorted)
{
LLPointer<LLSpeaker> speakerp = *sorted_speaker_it;
// color code recent speakers who are not currently speaking
if (speakerp->mStatus == LLSpeaker::STATUS_HAS_SPOKEN)
{
@@ -561,9 +557,6 @@ void LLSpeakerMgr::update(BOOL resort_ok)
void LLSpeakerMgr::updateSpeakerList()
{
// Always add the current agent (it has to be there...). Will do nothing if already there.
setSpeaker({ gAgentID, LLSpeaker::SPEAKER_AGENT, LLSpeaker::STATUS_VOICE_ACTIVE });
// Are we bound to the currently active voice channel?
if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()))
{
@@ -572,22 +565,21 @@ void LLSpeakerMgr::updateSpeakerList()
// If we are, add all voice client participants to our list of known speakers
std::vector<speaker_entry_t> speakers;
speakers.reserve(participants.size());
for (auto participant_it = participants.begin(); participant_it != participants.end(); ++participant_it)
for (auto participant : participants)
{
speakers.emplace_back(
*participant_it,
(LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it) ? LLSpeaker::SPEAKER_AGENT : LLSpeaker::SPEAKER_EXTERNAL),
speakers.emplace_back(participant,
(LLVoiceClient::getInstance()->isParticipantAvatar(participant) ? LLSpeaker::SPEAKER_AGENT : LLSpeaker::SPEAKER_EXTERNAL),
LLSpeaker::STATUS_VOICE_ACTIVE,
boost::none,
boost::none,
LLVoiceClient::getInstance()->getDisplayName(*participant_it));
LLVoiceClient::getInstance()->getDisplayName(participant));
}
setSpeakers(speakers);
}
else
{
// If not, check if the list is empty, except if it's Nearby Chat (session_id NULL).
LLUUID session_id = getSessionID();
LLUUID const& session_id = getSessionID();
if (!session_id.isNull() && !mSpeakerListUpdated)
{
// If the list is empty, we update it with whatever we have locally so that it doesn't stay empty too long.
@@ -636,15 +628,16 @@ void LLSpeakerMgr::updateSpeakerList()
mSpeakerListUpdated = true;
}
}
else if (floater && mSpeakers.size() == 0)
else if (floater && mSpeakers.empty())
{
// For all other session type (ad-hoc, P2P, avaline), we use the initial participants targets list
for (const auto& id : floater->mInitialTargetIDs)
for (const auto& target_id : floater->mInitialTargetIDs)
{
// Add buddies if they are on line, add any other avatar.
if (!LLAvatarTracker::instance().isBuddy(id) || LLAvatarTracker::instance().isBuddyOnline(id))
if (!LLAvatarTracker::instance().isBuddy(target_id) || LLAvatarTracker::instance().isBuddyOnline(
target_id))
{
setSpeaker({ id, LLSpeaker::SPEAKER_AGENT, LLSpeaker::STATUS_VOICE_ACTIVE });
setSpeaker({target_id, LLSpeaker::SPEAKER_AGENT, LLSpeaker::STATUS_VOICE_ACTIVE });
}
}
mSpeakerListUpdated = true;
@@ -656,13 +649,18 @@ void LLSpeakerMgr::updateSpeakerList()
}
}
}
// Always add the current agent (it has to be there...). Will do nothing if already there.
setSpeaker({ gAgentID, LLSpeaker::SPEAKER_AGENT, LLSpeaker::STATUS_VOICE_ACTIVE });
}
void LLSpeakerMgr::setSpeakerNotInChannel(LLSpeaker* speakerp)
void LLSpeakerMgr::setSpeakerNotInChannel(LLPointer<LLSpeaker> speakerp)
{
speakerp->setStatus(LLSpeaker::STATUS_NOT_IN_CHANNEL);
speakerp->mDotColor = INACTIVE_COLOR;
mSpeakerDelayRemover->setActionTimer(speakerp->mID);
if (speakerp.notNull())
{
speakerp->setStatus(LLSpeaker::STATUS_NOT_IN_CHANNEL);
speakerp->mDotColor = INACTIVE_COLOR;
mSpeakerDelayRemover->setActionTimer(speakerp->mID);
}
}
bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
@@ -691,12 +689,12 @@ bool LLSpeakerMgr::removeSpeaker(const LLUUID& speaker_id)
LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
{
//In some conditions map causes crash if it is empty(Windows only), adding check (EK)
if (mSpeakers.size() == 0)
return NULL;
if (mSpeakers.empty())
return nullptr;
speaker_map_t::iterator found_it = mSpeakers.find(speaker_id);
if (found_it == mSpeakers.end())
{
return NULL;
return nullptr;
}
return found_it->second;
}
@@ -704,9 +702,9 @@ LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id)
void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, BOOL include_text)
{
speaker_list->clear();
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
for (auto& speaker : mSpeakers)
{
LLPointer<LLSpeaker> speakerp = speaker_it->second;
LLPointer<LLSpeaker> speakerp = speaker.second;
// what about text only muted or inactive?
if (include_text || speakerp->mStatus != LLSpeaker::STATUS_TEXT_ONLY)
{
@@ -715,12 +713,12 @@ void LLSpeakerMgr::getSpeakerList(speaker_list_t* speaker_list, BOOL include_tex
}
}
const LLUUID LLSpeakerMgr::getSessionID()
const LLUUID LLSpeakerMgr::getSessionID() const
{
return mVoiceChannel->getSessionID();
}
bool LLSpeakerMgr::isSpeakerToBeRemoved(const LLUUID& speaker_id)
bool LLSpeakerMgr::isSpeakerToBeRemoved(const LLUUID& speaker_id) const
{
return mSpeakerDelayRemover && mSpeakerDelayRemover->isTimerStarted(speaker_id);
}
@@ -746,7 +744,7 @@ void LLSpeakerMgr::speakerChatted(const LLUUID& speaker_id)
}
}
BOOL LLSpeakerMgr::isVoiceActive()
BOOL LLSpeakerMgr::isVoiceActive() const
{
// mVoiceChannel = NULL means current voice channel, whatever it is
return LLVoiceClient::getInstance()->voiceEnabled() && mVoiceChannel && mVoiceChannel->isActive();
@@ -778,8 +776,7 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers)
std::vector<speaker_entry_t> speakerentries;
if ( speakers.has("agent_info") && speakers["agent_info"].isMap() )
{
LLSD::map_const_iterator speaker_it;
for(speaker_it = speakers["agent_info"].beginMap();
for(LLSD::map_const_iterator speaker_it = speakers["agent_info"].beginMap();
speaker_it != speakers["agent_info"].endMap();
++speaker_it)
{
@@ -803,8 +800,7 @@ void LLIMSpeakerMgr::setSpeakers(const LLSD& speakers)
{
//older, more decprecated way. Need here for
//using older version of servers
LLSD::array_const_iterator speaker_it;
for(speaker_it = speakers["agents"].beginArray();
for(LLSD::array_const_iterator speaker_it = speakers["agents"].beginArray();
speaker_it != speakers["agents"].endArray();
++speaker_it)
{
@@ -821,10 +817,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
std::vector<speaker_entry_t> speakerentries;
if ( update.has("agent_updates") && update["agent_updates"].isMap() )
{
LLSD::map_const_iterator update_it;
for(
update_it = update["agent_updates"].beginMap();
for(LLSD::map_const_iterator update_it = update["agent_updates"].beginMap();
update_it != update["agent_updates"].endMap();
++update_it)
{
@@ -838,7 +831,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
LLSD agent_data = update_it->second;
if (agent_data.isMap() && agent_data.has("transition"))
{
if (agent_data["transition"].asString() == "LEAVE" && speakerp.notNull())
if (agent_data["transition"].asString() == "LEAVE")
{
setSpeakerNotInChannel(speakerp);
}
@@ -882,9 +875,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
}
else if ( update.has("updates") && update["updates"].isMap() )
{
LLSD::map_const_iterator update_it;
for (
update_it = update["updates"].beginMap();
for (LLSD::map_const_iterator update_it = update["updates"].beginMap();
update_it != update["updates"].endMap();
++update_it)
{
@@ -892,7 +883,7 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
LLPointer<LLSpeaker> speakerp = findSpeaker(agent_id);
std::string agent_transition = update_it->second.asString();
if (agent_transition == "LEAVE" && speakerp.notNull())
if (agent_transition == "LEAVE")
{
setSpeakerNotInChannel(speakerp);
}
@@ -915,7 +906,7 @@ void LLIMSpeakerMgr::toggleAllowTextChat(const LLUUID& speaker_id)
LLPointer<LLSpeaker> speakerp = findSpeaker(speaker_id);
if (!speakerp) return;
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
data["method"] = "mute update";
data["session-id"] = getSessionID();
@@ -940,7 +931,7 @@ void LLIMSpeakerMgr::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmu
// do not send voice moderation changes for avatars not in voice channel
if (!is_in_voice) return;
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
data["method"] = "mute update";
data["session-id"] = getSessionID();
@@ -980,7 +971,7 @@ void LLIMSpeakerMgr::processSessionUpdate(const LLSD& session_update)
void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallow_voice)
{
std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest");
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
LLSD data;
data["method"] = "session update";
data["session-id"] = session_id;
@@ -996,13 +987,13 @@ void LLIMSpeakerMgr::moderateVoiceSession(const LLUUID& session_id, bool disallo
void LLIMSpeakerMgr::forceVoiceModeratedMode(bool should_be_muted)
{
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
for (auto& speaker : mSpeakers)
{
LLUUID speaker_id = speaker_it->first;
LLSpeaker* speakerp = speaker_it->second;
LLUUID speaker_id = speaker.first;
LLSpeaker* speakerp = speaker.second;
// participant does not match requested state
if (should_be_muted != (bool)speakerp->mModeratorMutedVoice)
if (should_be_muted != static_cast<bool>(speakerp->mModeratorMutedVoice))
{
moderateVoiceParticipant(speaker_id, !should_be_muted);
}
@@ -1036,10 +1027,9 @@ void LLActiveSpeakerMgr::updateSpeakerList()
LLSpeakerMgr::updateSpeakerList();
// clean up text only speakers
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
for (auto& speaker : mSpeakers)
{
LLUUID speaker_id = speaker_it->first;
LLSpeaker* speakerp = speaker_it->second;
LLSpeaker* speakerp = speaker.second;
if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
{
// automatically flag text only speakers for removal
@@ -1085,10 +1075,10 @@ void LLLocalSpeakerMgr::updateSpeakerList()
setSpeakers(speakers);
// check if text only speakers have moved out of chat range
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); ++speaker_it)
for (auto& speaker : mSpeakers)
{
LLUUID speaker_id = speaker_it->first;
LLPointer<LLSpeaker> speakerp = speaker_it->second;
LLUUID speaker_id = speaker.first;
LLPointer<LLSpeaker> speakerp = speaker.second;
if (speakerp.notNull() && speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY)
{
LLVOAvatar* avatarp = gObjectList.findAvatar(speaker_id);

View File

@@ -36,7 +36,7 @@ class LLSpeakerMgr;
class LLVoiceChannel;
// data for a given participant in a voice channel
class LLSpeaker : public LLRefCount, public LLOldEvents::LLObservable, public LLHandleProvider<LLSpeaker>, public boost::signals2::trackable
class LLSpeaker final : public LLRefCount, public LLOldEvents::LLObservable, public LLHandleProvider<LLSpeaker>, public boost::signals2::trackable
{
public:
typedef enum e_speaker_type
@@ -80,7 +80,7 @@ public:
};
LLSpeaker(const speaker_entry_t& entry);
~LLSpeaker() {};
~LLSpeaker() = default;
void update(const speaker_entry_t& entry);
void lookupName();
@@ -130,44 +130,44 @@ public:
S32 mSortIndex;
};
class LLSpeakerUpdateSpeakerEvent : public LLOldEvents::LLEvent
class LLSpeakerUpdateSpeakerEvent final : public LLOldEvents::LLEvent
{
public:
LLSpeakerUpdateSpeakerEvent(LLSpeaker* source);
/*virtual*/ LLSD getValue();
/*virtual*/ LLSD getValue() override;
private:
const LLUUID& mSpeakerID;
};
class LLSpeakerUpdateModeratorEvent : public LLOldEvents::LLEvent
class LLSpeakerUpdateModeratorEvent final : public LLOldEvents::LLEvent
{
public:
LLSpeakerUpdateModeratorEvent(LLSpeaker* source);
/*virtual*/ LLSD getValue();
/*virtual*/ LLSD getValue() override;
private:
const LLUUID& mSpeakerID;
BOOL mIsModerator;
};
class LLSpeakerTextModerationEvent : public LLOldEvents::LLEvent
class LLSpeakerTextModerationEvent final : public LLOldEvents::LLEvent
{
public:
LLSpeakerTextModerationEvent(LLSpeaker* source);
/*virtual*/ LLSD getValue();
/*virtual*/ LLSD getValue() override;
};
class LLSpeakerVoiceModerationEvent : public LLOldEvents::LLEvent
class LLSpeakerVoiceModerationEvent final : public LLOldEvents::LLEvent
{
public:
LLSpeakerVoiceModerationEvent(LLSpeaker* source);
/*virtual*/ LLSD getValue();
/*virtual*/ LLSD getValue() override;
};
class LLSpeakerListChangeEvent : public LLOldEvents::LLEvent
class LLSpeakerListChangeEvent final : public LLOldEvents::LLEvent
{
public:
LLSpeakerListChangeEvent(LLSpeakerMgr* source, const LLUUID& speaker_id);
/*virtual*/ LLSD getValue();
/*virtual*/ LLSD getValue() override;
private:
const LLUUID& mSpeakerID;
@@ -183,7 +183,7 @@ private:
* Otherwise it should be deleted manually in place where it is used.
* If action callback is not set timer will tick only once and deleted.
*/
class LLSpeakerActionTimer : public LLEventTimer
class LLSpeakerActionTimer final : public LLEventTimer
{
public:
typedef std::function<bool(const LLUUID&)> action_callback_t;
@@ -200,14 +200,14 @@ public:
* @param speaker_id - LLUUID of speaker which will be passed into action callback.
*/
LLSpeakerActionTimer(action_callback_t action_cb, F32 action_period, const LLUUID& speaker_id);
virtual ~LLSpeakerActionTimer() {};
virtual ~LLSpeakerActionTimer() = default;
/**
* Implements timer "tick".
*
* If action callback is not specified returns true. Instance will be deleted by LLEventTimer::updateClass().
*/
virtual BOOL tick();
BOOL tick() override;
/**
* Clears the callback.
@@ -285,13 +285,13 @@ public:
void setSpeakers(const std::vector<speaker_entry_t>& speakers);
LLPointer<LLSpeaker> setSpeaker(const speaker_entry_t& speakers);
BOOL isVoiceActive();
BOOL isVoiceActive() const;
typedef std::vector<LLPointer<LLSpeaker> > speaker_list_t;
void getSpeakerList(speaker_list_t* speaker_list, BOOL include_text);
LLVoiceChannel* getVoiceChannel() { return mVoiceChannel; }
const LLUUID getSessionID();
bool isSpeakerToBeRemoved(const LLUUID& speaker_id);
const LLUUID getSessionID() const;
bool isSpeakerToBeRemoved(const LLUUID& speaker_id) const;
/**
* Removes avaline speaker.
@@ -310,7 +310,7 @@ public:
protected:
virtual void updateSpeakerList();
void setSpeakerNotInChannel(LLSpeaker* speackerp);
void setSpeakerNotInChannel(LLPointer<LLSpeaker> speackerp);
bool removeSpeaker(const LLUUID& speaker_id);
typedef std::map<LLUUID, LLPointer<LLSpeaker> > speaker_map_t;
@@ -336,7 +336,7 @@ protected:
bool mModerateModeHandledFirstTime;
};
class LLIMSpeakerMgr : public LLSpeakerMgr
class LLIMSpeakerMgr final : public LLSpeakerMgr
{
LOG_CLASS(LLIMSpeakerMgr);
@@ -376,7 +376,7 @@ public:
void processSessionUpdate(const LLSD& session_update);
protected:
virtual void updateSpeakerList();
void updateSpeakerList() override;
void moderateVoiceSession(const LLUUID& session_id, bool disallow_voice);
@@ -387,24 +387,24 @@ protected:
};
class LLActiveSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr>
class LLActiveSpeakerMgr final : public LLSpeakerMgr, public LLSingleton<LLActiveSpeakerMgr>
{
LOG_CLASS(LLActiveSpeakerMgr);
public:
LLActiveSpeakerMgr();
protected:
virtual void updateSpeakerList();
void updateSpeakerList() override;
};
class LLLocalSpeakerMgr : public LLSpeakerMgr, public LLSingleton<LLLocalSpeakerMgr>
class LLLocalSpeakerMgr final : public LLSpeakerMgr, public LLSingleton<LLLocalSpeakerMgr>
{
LOG_CLASS(LLLocalSpeakerMgr);
public:
LLLocalSpeakerMgr();
~LLLocalSpeakerMgr ();
protected:
virtual void updateSpeakerList();
void updateSpeakerList() override;
};
#endif // LL_LLSPEAKERS_H

View File

@@ -3019,17 +3019,7 @@ void pass_processObjectPropertiesFamily(LLMessageSystem *msg, void**)
void process_script_running_reply(LLMessageSystem* msg, void** v)
{
LLLiveLSLEditor::processScriptRunningReply(msg, v);
if (ScriptCounter::sCheckMap.size())
{
LLUUID item_id;
msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id);
std::map<LLUUID,ScriptCounter*>::iterator it = ScriptCounter::sCheckMap.find(item_id);
if (it != ScriptCounter::sCheckMap.end())
{
it->second->processRunningReply(msg);
ScriptCounter::sCheckMap.erase(it);
}
}
ScriptCounter::processScriptRunningReply(msg);
}
void register_viewer_callbacks(LLMessageSystem* msg)

View File

@@ -403,7 +403,7 @@ void LLToolGrab::startGrab()
mDragStartPointGlobal = grab_start_global;
mDragStartFromCamera = grab_start_global - gAgentCamera.getCameraPositionGlobal();
send_ObjectGrab_message(objectp, mGrabPick, grab_offset);
send_ObjectGrab_message(objectp, true, &mGrabPick, grab_offset);
mGrabOffsetFromCenterInitial = grab_offset;
mGrabHiddenOffsetFromCamera = mDragStartFromCamera;
@@ -1079,7 +1079,7 @@ void LLToolGrab::stopGrab()
case GRAB_ACTIVE_CENTER:
case GRAB_NONPHYSICAL:
case GRAB_LOCKED:
send_ObjectDeGrab_message(objectp, pick);
send_ObjectGrab_message(objectp, false, &pick);
mVerticalDragging = FALSE;
break;
@@ -1133,64 +1133,45 @@ LLVector3d LLToolGrab::getGrabPointGlobal()
}
void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, const LLVector3 &grab_offset)
void send_ObjectGrab_message(LLViewerObject* object, bool grab, const LLPickInfo* const pick, const LLVector3 &grab_offset)
{
if (!object) return;
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectGrab);
msg->newMessageFast(grab ? _PREHASH_ObjectGrab : _PREHASH_ObjectDeGrab);
msg->nextBlockFast( _PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast( _PREHASH_ObjectData);
msg->addU32Fast( _PREHASH_LocalID, object->mLocalID);
msg->addVector3Fast(_PREHASH_GrabOffset, grab_offset);
msg->nextBlock("SurfaceInfo");
msg->addVector3("UVCoord", LLVector3(pick.mUVCoords));
msg->addVector3("STCoord", LLVector3(pick.mSTCoords));
msg->addS32Fast(_PREHASH_FaceIndex, pick.mObjectFace);
msg->addVector3("Position", pick.mIntersection);
msg->addVector3("Normal", pick.mNormal);
msg->addVector3("Binormal", pick.mBinormal);
if (grab) msg->addVector3Fast(_PREHASH_GrabOffset, grab_offset);
if (pick)
{
msg->nextBlock("SurfaceInfo");
msg->addVector3("UVCoord", LLVector3(pick->mUVCoords));
msg->addVector3("STCoord", LLVector3(pick->mSTCoords));
msg->addS32Fast(_PREHASH_FaceIndex, pick->mObjectFace);
msg->addVector3("Position", pick->mIntersection);
msg->addVector3("Normal", pick->mNormal);
msg->addVector3("Binormal", pick->mBinormal);
}
msg->sendMessage( object->getRegion()->getHost());
/* Diagnostic code
LL_INFOS() << "mUVCoords: " << pick.mUVCoords
<< ", mSTCoords: " << pick.mSTCoords
<< ", mObjectFace: " << pick.mObjectFace
<< ", mIntersection: " << pick.mIntersection
<< ", mNormal: " << pick.mNormal
<< ", mBinormal: " << pick.mBinormal
if (pick)
{
LL_INFOS() << "mUVCoords: " << pick->mUVCoords
<< ", mSTCoords: " << pick->mSTCoords
<< ", mObjectFace: " << pick->mObjectFace
<< ", mIntersection: " << pick->mIntersection
<< ", mNormal: " << pick->mNormal
<< ", mBinormal: " << pick->mBinormal
<< LL_ENDL;
}
LL_INFOS() << "Avatar pos: " << gAgent.getPositionAgent() << LL_ENDL;
LL_INFOS() << "Object pos: " << object->getPosition() << LL_ENDL;
*/
}
void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick)
{
if (!object) return;
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectDeGrab);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU32Fast(_PREHASH_LocalID, object->mLocalID);
msg->nextBlock("SurfaceInfo");
msg->addVector3("UVCoord", LLVector3(pick.mUVCoords));
msg->addVector3("STCoord", LLVector3(pick.mSTCoords));
msg->addS32Fast(_PREHASH_FaceIndex, pick.mObjectFace);
msg->addVector3("Position", pick.mIntersection);
msg->addVector3("Normal", pick.mNormal);
msg->addVector3("Binormal", pick.mBinormal);
msg->sendMessage(object->getRegion()->getHost());
}

View File

@@ -41,9 +41,7 @@ class LLPickInfo;
// Message utilities
void send_ObjectGrab_message(LLViewerObject* object, const LLPickInfo & pick, const LLVector3 &grab_offset);
void send_ObjectDeGrab_message(LLViewerObject* object, const LLPickInfo & pick);
void send_ObjectGrab_message(LLViewerObject* object, bool grab, const LLPickInfo* const pick = nullptr, const LLVector3& grab_offset = LLVector3::zero);
class LLToolGrab : public LLTool, public LLSingleton<LLToolGrab>

View File

@@ -1792,21 +1792,18 @@ class LLObjectTouch : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
handle_object_touch();
handle_object_touch(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(), &LLToolPie::getInstance()->getPick());
return true;
}
};
void handle_object_touch()
void handle_object_touch(LLViewerObject* object, const LLPickInfo* const pick)
{
LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
if (!object) return;
LLPickInfo pick = LLToolPie::getInstance()->getPick();
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.1.0l
// NOTE: fallback code since we really shouldn't be getting an active selection if we can't touch this
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, pick.mObjectOffset)) )
if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canTouch(object, pick ? pick->mObjectOffset : LLVector3::zero)) )
{
RLV_ASSERT(false);
return;
@@ -1816,28 +1813,30 @@ void handle_object_touch()
// *NOTE: Hope the packets arrive safely and in order or else
// there will be some problems.
// *TODO: Just fix this bad assumption.
send_ObjectGrab_message(object, pick, LLVector3::zero);
send_ObjectDeGrab_message(object, pick);
send_ObjectGrab_message(object, true, pick);
send_ObjectGrab_message(object, false, pick);
}
bool enable_object_touch(LLViewerObject* obj, const LLVector3& offset = LLVector3::zero)
{
bool new_value = obj && obj->flagHandleTouch();
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.1g) | Added: RLVa-1.2.1g
if (new_value && rlv_handler_t::isEnabled())
{
// RELEASE-RLVa: [RLVa-1.2.1] Make sure this stays in sync with handle_object_touch()
new_value = gRlvHandler.canTouch(obj, offset);
}
// [/RLVa:KB]
return new_value;
}
bool enable_object_touch(const LLSD& userdata)
{
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
bool new_value = obj && obj->flagHandleTouch();
// [RLVa:KB] - Checked: 2010-11-12 (RLVa-1.2.1g) | Added: RLVa-1.2.1g
if ( (rlv_handler_t::isEnabled()) && (new_value) )
{
// RELEASE-RLVa: [RLVa-1.2.1] Make sure this stays in sync with handle_object_touch()
new_value = gRlvHandler.canTouch(obj, LLToolPie::getInstance()->getPick().mObjectOffset);
}
// [/RLVa:KB]
std::string touch_text;
// Update label based on the node touch name if available.
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode();
auto selection = LLSelectMgr::getInstance()->getSelection();
LLSelectNode* node = selection->getFirstRootNode();
if (node && node->mValid && !node->mTouchName.empty())
{
touch_text = node->mTouchName;
@@ -1849,7 +1848,8 @@ bool enable_object_touch(const LLSD& userdata)
gMenuHolder->childSetText("Object Touch", touch_text);
gMenuHolder->childSetText("Attachment Object Touch", touch_text);
return new_value;
return enable_object_touch(selection->getPrimaryObject(), LLToolPie::getInstance()->getPick().mObjectOffset);
};
// One object must have touch sensor
@@ -4084,6 +4084,11 @@ void handle_reset_view()
}
else
{
if (gAgent.getAutoPilot())
{
gAgent.stopAutoPilot(true);
}
reset_view_final( true );
}
}
@@ -9422,6 +9427,26 @@ class ListTeleportTo : public view_listener_t
}
};
class ListStalk : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLAvatarActions::showOnMap(LFIDBearer::getActiveSelectedID());
return true;
}
};
class ListStalkable : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
BOOL is_agent_mappable(const LLUUID& agent_id);
const auto& ids = LFIDBearer::getActiveSelectedIDs();
gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && is_agent_mappable(ids[0]));
return true;
}
};
class ListAbuseReport : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9673,6 +9698,82 @@ class ListObjectEnablePay : public view_listener_t
}
};
void list_for_each_object(std::function<void(LLViewerObject*)> func)
{
for (const auto& id : LFIDBearer::getActiveSelectedIDs())
if (auto obj = gObjectList.findObject(id))
func(obj);
}
class ListObjectTouch : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
list_for_each_object([](LLViewerObject* obj) { if (enable_object_touch(obj)) handle_object_touch(obj); });
return true;
}
};
bool list_has_valid_object(std::function<bool(LLViewerObject*)> func)
{
for (const auto& id : LFIDBearer::getActiveSelectedIDs())
if (func(gObjectList.findObject(id)))
return true; // First is fine enough, we'll use all we can
return false;
}
// One object must have touch sensor
class ListObjectEnableTouch : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
gMenuHolder->findControl(userdata["control"].asString())->setValue(list_has_valid_object([](LLViewerObject* obj){ return enable_object_touch(obj); }));
return true;
}
};
class ListObjectEdit : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
std::vector<LLViewerObject*> objs;
auto func = rlv_handler_t::isEnabled() ? static_cast<std::function<void(LLViewerObject* obj)>>([&objs](LLViewerObject* obj) { if (gRlvHandler.canEdit(obj)) objs.push_back(obj); }) : [&objs](LLViewerObject* obj) { if (obj) objs.push_back(obj); };
list_for_each_object(func);
if (objs.empty()) return true;
bool new_selection = userdata.asBoolean();
auto& selmgr = LLSelectMgr::instance();
if (new_selection) selmgr.deselectAll();
auto selection = new_selection ? nullptr : selmgr.getSelection();
auto old_primary = selection ? selection->getPrimaryObject() : nullptr;
for (const auto& obj : objs)
selmgr.selectObjectAndFamily(obj, true);
if (old_primary) selmgr.selectObjectAndFamily(old_primary);
if (new_selection) handle_object_edit();
return true;
}
};
class ListObjectCanEdit : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
bool new_selection = userdata["data"].asBoolean();
auto& selmgr = LLSelectMgr::instance();
auto selection = new_selection ? nullptr : selmgr.getSelection();
bool has_old_selection = selection && !selection->isEmpty() && !selection->isAttachment();
auto func = rlv_handler_t::isEnabled() ? static_cast<std::function<bool(LLViewerObject* obj)>>([](LLViewerObject* obj) { return !!gRlvHandler.canEdit(obj); }) : [](LLViewerObject* obj) { return !!obj; };
gMenuHolder->findControl(userdata["control"].asString())
->setValue((new_selection || has_old_selection) && list_has_valid_object(func));
return true;
}
};
class MediaCtrlCopyURL : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -10049,6 +10150,8 @@ void initialize_menus()
addMenu(new ListStartCall(), "List.StartCall");
addMenu(new ListStartConference(), "List.StartConference");
addMenu(new ListStartIM(), "List.StartIM");
addMenu(new ListStalk, "List.Stalk");
addMenu(new ListStalkable, "List.Stalkable");
addMenu(new ListTeleportTo, "List.TeleportTo");
addMenu(new ListAbuseReport(), "List.AbuseReport");
addMenu(new ListIsNearby, "List.IsNearby");
@@ -10069,6 +10172,10 @@ void initialize_menus()
addMenu(new ListObjectSit, "List.Object.Sit");
addMenu(new ListObjectPay, "List.Object.Pay");
addMenu(new ListObjectEnablePay, "List.Object.EnablePay");
addMenu(new ListObjectTouch, "List.Object.Touch");
addMenu(new ListObjectEnableTouch, "List.Object.EnableTouch");
addMenu(new ListObjectEdit, "List.Object.Edit");
addMenu(new ListObjectCanEdit, "List.Object.CanEdit");
add_radar_listeners();

View File

@@ -38,8 +38,10 @@
class LLUICtrl;
class LLView;
class LLParcelSelection;
class LLPickInfo;
class LLObjectSelection;
class LLSelectNode;
class LLViewerObject;
void pre_init_menus();
void init_menus();
@@ -95,7 +97,7 @@ void exchange_callingcard(const LLUUID& dest_id);
void handle_gestures(void*);
void handle_sit_down(void*);
void handle_object_build(void*);
void handle_object_touch();
void handle_object_touch(LLViewerObject*, const LLPickInfo* const = nullptr);
bool enable_object_open();
void handle_object_open();
@@ -133,7 +135,7 @@ void handle_toggle_flycam();
void handle_fake_away_status(void*);
void handle_object_sit_or_stand();
void handle_give_money_dialog(class LLViewerObject*);
void handle_give_money_dialog(LLViewerObject*);
bool enable_pay_object(LLViewerObject*);
bool enable_buy_object();
void handle_go_to(const LLVector3d& pos);

View File

@@ -3211,13 +3211,15 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
((IM_TELEPORT_REQUEST == dialog) && (RlvActions::autoAcceptTeleportRequest(from_id))) );
// [/RLVa:KB]
if (is_muted)
bool following = gAgent.getAutoPilotLeaderID() == from_id;
if (!following && is_muted)
{
return;
}
// else if (is_do_not_disturb)
// else if (!following && is_do_not_disturb)
// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9)
else if ( (is_do_not_disturb) && (!fRlvAutoAccept) )
else if (!following && is_do_not_disturb && !fRlvAutoAccept )
// [/RLVa:KB]
{
send_do_not_disturb_message(msg, from_id);
@@ -3344,10 +3346,14 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
*/
LLNotification::Params params(IM_LURE_USER == dialog ? "TeleportOffered" : "TeleportRequest");
params.substitutions = args;
params.payload = payload;
if (following)
{
LLNotifications::instance().forceResponse(LLNotification::Params(params.name).payload(payload), 0);
}
else
// [RLVa:KB] - Checked: 20103-11-08 (RLVa-1.4.9)
if ( (rlv_handler_t::isEnabled()) && (fRlvAutoAccept) )
{
@@ -5269,6 +5275,9 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
{
LL_RECORD_BLOCK_TIME(FTM_PROCESS_OBJECTS);
auto agent_region = gAgent.getRegion();
if (!agent_region) return;
LLUUID id;
U32 local_id;
S32 i;
@@ -5276,7 +5285,7 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
num_objects = mesgsys->getNumberOfBlocksFast(_PREHASH_ObjectData);
bool different_region = mesgsys->getSender().getIPandPort() != gAgent.getRegion()->getHost().getIPandPort();
bool different_region = mesgsys->getSender().getIPandPort() != agent_region->getHost().getIPandPort();
for (i = 0; i < num_objects; i++)
{

View File

@@ -2081,8 +2081,6 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window)
adjust_rect_top_right("FloaterMiniMapRect", window);
adjust_rect_top_right("FloaterLagMeter", window);
adjust_rect_top_left("FloaterBuildOptionsRect", window);
adjust_rect_bottom_left("FloaterActiveSpeakersRect", window);

View File

@@ -33,6 +33,7 @@
#include "scriptcounter.h"
#include "llavataractions.h"
#include "llavatarnamecache.h"
#include "llviewerregion.h"
#include "llselectmgr.h"
@@ -44,15 +45,6 @@ void cmdline_printchat(const std::string& message);
LLVOAvatar* find_avatar_from_object( LLViewerObject* object );
namespace
{
void countedScriptsOnAvatar(LLStringUtil::format_map_t args, const LLAvatarName& av_name)
{
args["NAME"] = av_name.getNSName();
cmdline_printchat(LLTrans::getString("ScriptCountAvatar", args));
}
}
std::map<LLUUID, ScriptCounter*> ScriptCounter::sCheckMap;
ScriptCounter::ScriptCounter(bool do_delete, LLViewerObject* object)
@@ -82,22 +74,23 @@ void ScriptCounter::requestInventories()
LLVOAvatar* av = static_cast<LLVOAvatar*>(foo);
// Iterate through all the attachment points
for (LLVOAvatar::attachment_map_t::iterator i = av->mAttachmentPoints.begin(); i != av->mAttachmentPoints.end(); ++i)
for (const auto& i : av->mAttachmentPoints)
{
if (LLViewerJointAttachment* attachment = i->second)
if (LLViewerJointAttachment* attachment = i.second)
{
if (!attachment->getValid()) continue;
// Iterate through all the attachments on this point
for (LLViewerJointAttachment::attachedobjs_vec_t::const_iterator j = attachment->mAttachedObjects.begin(); j != attachment->mAttachedObjects.end(); ++j)
if (LLViewerObject* object = *j)
for (const auto& object : attachment->mAttachedObjects)
if (object)
requestInventoriesFor(object);
}
}
}
else // Iterate through all the selected objects
{
for (LLObjectSelection::valid_root_iterator i = LLSelectMgr::getInstance()->getSelection()->valid_root_begin(); i != LLSelectMgr::getInstance()->getSelection()->valid_root_end(); ++i)
auto selection = LLSelectMgr::getInstance()->getSelection();
for (auto i = selection->valid_root_begin(), end = selection->valid_root_end(); i != end; ++i)
if (LLSelectNode* selectNode = *i)
if (LLViewerObject* object = selectNode->getObject())
requestInventoriesFor(object);
@@ -111,10 +104,8 @@ void ScriptCounter::requestInventoriesFor(LLViewerObject* object)
{
++objectCount;
requestInventoryFor(object);
LLViewerObject::child_list_t child_list = object->getChildren();
for (LLViewerObject::child_list_t::iterator i = child_list.begin(); i != child_list.end(); ++i)
for (auto child : object->getChildren())
{
LLViewerObject* child = *i;
if (child->isAvatar()) continue;
requestInventoryFor(child);
}
@@ -140,41 +131,55 @@ void ScriptCounter::inventoryChanged(LLViewerObject* obj, LLInventoryObject::obj
if (inv)
{
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for (LLInventoryObject::object_list_t::const_iterator i = inv->begin(); i != end; ++i)
if (LLInventoryObject* asset = (*i))
if (asset->getType() == LLAssetType::AT_LSL_TEXT)
uuid_vec_t ids;
for (auto asset : *inv)
{
const LLUUID& id = asset->getUUID();
if (asset->getType() == LLAssetType::AT_LSL_TEXT && id.notNull())
{
++scriptcount;
if (doDelete)
ids.push_back(id);
else
{
++scriptcount;
if (doDelete)
{
const LLUUID& id = asset->getUUID();
if (id.notNull())
{
//LL_INFOS() << "Deleting script " << id << " in " << objid << LL_ENDL;
obj->removeInventory(id);
--i; // Avoid iteration when removing, everything has shifted
end = inv->end();
}
}
else
{
const LLUUID& id = asset->getUUID();
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GetScriptRunning);
msg->nextBlockFast(_PREHASH_Script);
msg->addUUIDFast(_PREHASH_ObjectID, obj->getID());
msg->addUUIDFast(_PREHASH_ItemID, id);
msg->sendReliable(obj->getRegion()->getHost());
sCheckMap[id] = this;
++checking;
}
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_GetScriptRunning);
msg->nextBlockFast(_PREHASH_Script);
msg->addUUIDFast(_PREHASH_ObjectID, obj->getID());
msg->addUUIDFast(_PREHASH_ItemID, id);
msg->sendReliable(obj->getRegion()->getHost());
sCheckMap[id] = this;
++checking;
}
}
}
for (const auto& id : ids)
{
//LL_INFOS() << "Deleting script " << id << " in " << objid << LL_ENDL;
obj->removeInventory(id);
}
}
summarize();
}
void ScriptCounter::processScriptRunningReply(LLMessageSystem* msg)
{
if (!sCheckMap.empty())
{
LLUUID item_id;
msg->getUUIDFast(_PREHASH_Script, _PREHASH_ItemID, item_id);
auto it = sCheckMap.find(item_id);
if (it != sCheckMap.end())
{
it->second->processRunningReply(msg);
sCheckMap.erase(it);
}
}
}
void ScriptCounter::processRunningReply(LLMessageSystem* msg)
{
BOOL is;
@@ -199,7 +204,10 @@ void ScriptCounter::summarize()
args["RUNNING"] = stringize(mRunningCount);
args["MONO"] = stringize(mMonoCount);
if (foo->isAvatar())
LLAvatarNameCache::get(foo->getID(), boost::bind(countedScriptsOnAvatar, args, _2));
{
args["NAME"] = LLAvatarActions::getSLURL(foo->getID());
cmdline_printchat(LLTrans::getString("ScriptCountAvatar", args));
}
else
cmdline_printchat(LLTrans::getString(doDelete ? "ScriptDeleteObject" : "ScriptCountObject", args));

View File

@@ -33,19 +33,19 @@
#include "llvoinventorylistener.h"
class ScriptCounter : public LLInstanceTracker<ScriptCounter, LLUUID>, public LLVOInventoryListener
class ScriptCounter final : public LLInstanceTracker<ScriptCounter, LLUUID>, public LLVOInventoryListener
{
public:
ScriptCounter(bool do_delete, LLViewerObject* object);
~ScriptCounter();
/*virtual*/ void inventoryChanged(LLViewerObject* obj, LLInventoryObject::object_list_t* inv, S32, void*);
void inventoryChanged(LLViewerObject* obj, LLInventoryObject::object_list_t* inv, S32, void*) override;
void requestInventories();
static void processScriptRunningReply(LLMessageSystem* msg);
private:
void requestInventoriesFor(LLViewerObject* object);
void requestInventoryFor(LLViewerObject* object);
friend void process_script_running_reply(LLMessageSystem* msg, void**);
void processRunningReply(LLMessageSystem* msg);
void summarize(); // Check if finished, if so, output and destroy.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@@ -57,6 +57,8 @@ with the same filename but different name
<texture name="Favorite_Star_Over" file_name="navbar/Favorite_Star_Over.png" preload="false" />
<texture name="Favorite_Link_Over" file_name="navbar/Favorite_Link_Over.png" preload="false" />
<texture name="FMOD_Logo" file_name="FMOD Logo.png" preload="true"/>
<texture name="Parcel_M_Dark" file_name="map_event_mature.tga" preload="true" />
<texture name="Parcel_M_Light" file_name="map_event_mature.tga" preload="false" />
<texture name="Parcel_PG_Light" file_name="map_event.tga" preload="false" />

View File

@@ -68,6 +68,10 @@
<on_click function="List.RequestTeleport"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Find on Map" name="Find on Map">
<on_click function="List.Stalk"/>
<on_visible function="List.Stalkable"/>
</menu_item_call>
<menu_item_call label="Share" name="Share">
<on_click function="List.Share"/>
<on_visible function="List.EnableSingleSelected"/>

View File

@@ -65,6 +65,10 @@
<on_click function="List.RequestTeleport"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Find on Map" name="Find on Map">
<on_click function="List.Stalk"/>
<on_visible function="List.Stalkable"/>
</menu_item_call>
<menu_item_call label="Share" name="Share">
<on_click function="List.Share"/>
<on_visible function="List.EnableSingleSelected"/>

View File

@@ -24,6 +24,18 @@
<on_click function="List.Object.Pay"/>
<on_visible function="List.Object.EnablePay"/>
</menu_item_call>
<menu_item_call label="Touch" name="Touch">
<on_click function="List.Object.Touch"/>
<on_visible function="List.Object.EnableTouch"/>
</menu_item_call>
<menu_item_call label="Edit" name="Edit">
<on_click function="List.Object.Edit" userdata="true"/>
<on_visible function="List.Object.CanEdit" userdata="true"/>
</menu_item_call>
<menu_item_call label="Add to Selection" name="Add to Selection">
<on_click function="List.Object.Edit" userdata=""/>
<on_visible function="List.Object.CanEdit" userdata=""/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Copy Key" name="Copy Key">
<on_click function="List.CopyUUIDs"/>

View File

@@ -65,6 +65,10 @@
<on_click function="List.RequestTeleport"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Find on Map" name="Find on Map">
<on_click function="List.Stalk"/>
<on_visible function="List.Stalkable"/>
</menu_item_call>
<menu_item_call label="Share" name="Share">
<on_click function="List.Share"/>
<on_visible function="List.EnableSingleSelected"/>

View File

@@ -52,6 +52,10 @@
<menu_item_call label="Request Teleport" name="Request Teleport">
<on_click function="List.RequestTeleport"/>
</menu_item_call>
<menu_item_call label="Find on Map" name="Find on Map">
<on_click function="List.Stalk"/>
<on_visible function="List.Stalkable"/>
</menu_item_call>
<menu_item_call label="Share" name="Share">
<on_click function="List.Share"/>
</menu_item_call>

View File

@@ -64,6 +64,18 @@
<on_click function="List.Object.Pay"/>
<on_visible function="List.Object.EnablePay"/>
</menu_item_call>
<menu_item_call label="Touch" name="Touch">
<on_click function="List.Object.Touch"/>
<on_visible function="List.Object.EnableTouch"/>
</menu_item_call>
<menu_item_call label="Edit" name="Edit">
<on_click function="List.Object.Edit" userdata="true"/>
<on_visible function="List.Object.CanEdit" userdata="true"/>
</menu_item_call>
<menu_item_call label="Add to Selection" name="Add to Selection">
<on_click function="List.Object.Edit" userdata=""/>
<on_visible function="List.Object.CanEdit" userdata=""/>
</menu_item_call>
<menu_item_separator
layout="topleft" />
<menu_item_call

View File

@@ -80,6 +80,8 @@
<button bottom_delta="0" left="146" height="16" width="16" follows="left|bottom" image_overlay="inv_folder_trash.tga" scale_image="true" label="" tool_tip="Delete the currently selected remembered login info, if any." name="remove_login"/>
<check_box bottom_delta="0" left="173" control_name="RememberPassword" follows="left|bottom" height="16" label="Save password" name="remember_check" width="158"/>
<icon name="fmod_logo" bottom="7" height="60" left="-425" width="228" follows="right|bottom" image_name="FMOD_Logo"/>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="45" drop_shadow_visible="true" follows="right|bottom"
font="SansSerifSmall" font-style="UNDERLINE" h_pad="0" halign="right" height="16"

View File

@@ -3559,6 +3559,8 @@ If you continue to receive this message, please contact Second Life support for
<string name="Bottom">Bottom</string>
<string name="Bottom Right">Bottom Right</string>
<string name="Complexity">Complexity: [NUM]</string>
<!-- compile queue-->
<string name="CompileQueueDownloadedCompiling">Downloaded, now compiling</string>
<string name="CompileQueueServiceUnavailable">Script compilation service not available</string>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB