Compare commits
17 Commits
sv-1.8.7.8
...
sv-1.8.7.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc1c816b99 | ||
|
|
32424e5640 | ||
|
|
760f1308f3 | ||
|
|
dfe8e364be | ||
|
|
33feeb0a01 | ||
|
|
50eb21ce23 | ||
|
|
d2052b9e4c | ||
|
|
2c5ad97697 | ||
|
|
8283422717 | ||
|
|
4a293ff1e1 | ||
|
|
828307ca96 | ||
|
|
a83901d2e4 | ||
|
|
878ba534b5 | ||
|
|
f17e6637d6 | ||
|
|
66b2ad5f30 | ||
|
|
463151c830 | ||
|
|
77b6a903ac |
@@ -118,7 +118,7 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
|
||||
fail_if_not_legacy = true;
|
||||
}
|
||||
|
||||
if (!strncasecmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
|
||||
if (!strnicmp(LEGACY_NON_HEADER, hdr_buf, strlen(LEGACY_NON_HEADER))) /* Flawfinder: ignore */
|
||||
{
|
||||
legacy_no_header = true;
|
||||
inbuf = (int)str.gcount();
|
||||
@@ -141,9 +141,8 @@ bool LLSDSerialize::deserialize(LLSD& sd, std::istream& str, S32 max_bytes)
|
||||
}
|
||||
header = hdr_buf;
|
||||
|
||||
std::string::size_type start = std::string::npos;
|
||||
std::string::size_type start = header.find_first_not_of("<? ");
|
||||
std::string::size_type end = std::string::npos;
|
||||
start = header.find_first_not_of("<? ");
|
||||
if (start != std::string::npos)
|
||||
{
|
||||
end = header.find_first_of(" ?", start);
|
||||
@@ -1304,8 +1303,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
||||
}
|
||||
|
||||
bool need_comma = false;
|
||||
LLSD::map_const_iterator iter = data.beginMap();
|
||||
LLSD::map_const_iterator end = data.endMap();
|
||||
auto iter = data.beginMap();
|
||||
auto end = data.endMap();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
if(need_comma) ostr << ",";
|
||||
@@ -1323,8 +1322,8 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
||||
{
|
||||
ostr << post << pre << "[";
|
||||
bool need_comma = false;
|
||||
LLSD::array_const_iterator iter = data.beginArray();
|
||||
LLSD::array_const_iterator end = data.endArray();
|
||||
auto iter = data.beginArray();
|
||||
auto end = data.endArray();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
if(need_comma) ostr << ",";
|
||||
@@ -1392,22 +1391,22 @@ S32 LLSDNotationFormatter::format_impl(const LLSD& data, std::ostream& ostr, U32
|
||||
// *FIX: memory inefficient.
|
||||
const std::vector<U8>& buffer = data.asBinary();
|
||||
ostr << "b(" << buffer.size() << ")\"";
|
||||
if(buffer.size())
|
||||
if(!buffer.empty())
|
||||
{
|
||||
if (options & LLSDFormatter::OPTIONS_PRETTY_BINARY)
|
||||
{
|
||||
std::ios_base::fmtflags old_flags = ostr.flags();
|
||||
ostr.setf( std::ios::hex, std::ios::basefield );
|
||||
ostr << "0x";
|
||||
for (size_t i = 0; i < buffer.size(); i++)
|
||||
for (unsigned char i : buffer)
|
||||
{
|
||||
ostr << (int) buffer[i];
|
||||
ostr << static_cast<int>(i);
|
||||
}
|
||||
ostr.flags(old_flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
ostr.write((const char*)&buffer[0], buffer.size());
|
||||
ostr.write(reinterpret_cast<const char*>(&buffer[0]), buffer.size());
|
||||
}
|
||||
}
|
||||
ostr << "\"";
|
||||
@@ -1444,9 +1443,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
||||
{
|
||||
ostr.put('{');
|
||||
U32 size_nbo = htonl(data.size());
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
LLSD::map_const_iterator iter = data.beginMap();
|
||||
LLSD::map_const_iterator end = data.endMap();
|
||||
ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32));
|
||||
auto iter = data.beginMap();
|
||||
auto end = data.endMap();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
ostr.put('k');
|
||||
@@ -1461,9 +1460,9 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
||||
{
|
||||
ostr.put('[');
|
||||
U32 size_nbo = htonl(data.size());
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
LLSD::array_const_iterator iter = data.beginArray();
|
||||
LLSD::array_const_iterator end = data.endArray();
|
||||
ostr.write(reinterpret_cast<const char*>(&size_nbo), sizeof(U32));
|
||||
auto iter = data.beginArray();
|
||||
auto end = data.endArray();
|
||||
for(; iter != end; ++iter)
|
||||
{
|
||||
format_count += format(*iter, ostr);
|
||||
@@ -1529,7 +1528,7 @@ S32 LLSDBinaryFormatter::format(const LLSD& data, std::ostream& ostr, U32 option
|
||||
const std::vector<U8>& buffer = data.asBinary();
|
||||
U32 size_nbo = htonl(buffer.size());
|
||||
ostr.write((const char*)(&size_nbo), sizeof(U32));
|
||||
if(buffer.size()) ostr.write((const char*)&buffer[0], buffer.size());
|
||||
if(!buffer.empty()) ostr.write((const char*)&buffer[0], buffer.size());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1706,12 +1705,12 @@ int deserialize_string_raw(
|
||||
// *FIX: This is memory inefficient.
|
||||
S32 len = strtol(buf + 1, NULL, 0);
|
||||
if((max_bytes>0)&&(len>max_bytes)) return LLSDParser::PARSE_FAILURE;
|
||||
std::vector<char> buf;
|
||||
std::vector<char> buf2;
|
||||
if(len)
|
||||
{
|
||||
buf.resize(len);
|
||||
count += (int)fullread(istr, (char *)&buf[0], len);
|
||||
value.assign(buf.begin(), buf.end());
|
||||
buf2.resize(len);
|
||||
count += (int)fullread(istr, (char *)&buf2[0], len);
|
||||
value.assign(buf2.begin(), buf2.end());
|
||||
}
|
||||
c = istr.get();
|
||||
++count;
|
||||
@@ -2095,7 +2094,18 @@ std::string zip_llsd(LLSD& data)
|
||||
}
|
||||
|
||||
have = CHUNK-strm.avail_out;
|
||||
output = (U8*) realloc(output, cur_size+have);
|
||||
U8* new_output = (U8*) realloc(output, cur_size+have);
|
||||
if (new_output == NULL)
|
||||
{
|
||||
LL_WARNS() << "Failed to compress LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
|
||||
deflateEnd(&strm);
|
||||
if (output)
|
||||
{
|
||||
free(output);
|
||||
}
|
||||
return std::string();
|
||||
}
|
||||
output = new_output;
|
||||
memcpy(output+cur_size, out, have);
|
||||
cur_size += have;
|
||||
}
|
||||
@@ -2114,15 +2124,6 @@ std::string zip_llsd(LLSD& data)
|
||||
deflateEnd(&strm);
|
||||
free(output);
|
||||
|
||||
#if 0 //verify results work with unzip_llsd
|
||||
std::istringstream test(result);
|
||||
LLSD test_sd;
|
||||
if (!unzip_llsd(test_sd, test, result.size()))
|
||||
{
|
||||
LL_ERRS() << "Invalid compression result!" << LL_ENDL;
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2173,7 +2174,19 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
|
||||
|
||||
U32 have = CHUNK-strm.avail_out;
|
||||
|
||||
result = (U8*) realloc(result, cur_size + have);
|
||||
U8* new_result = (U8*)realloc(result, cur_size + have);
|
||||
if (new_result == NULL)
|
||||
{
|
||||
LL_WARNS() << "Failed to unzip LLSD block: can't reallocate memory, current size: " << cur_size << " bytes; requested " << cur_size + have << " bytes." << LL_ENDL;
|
||||
inflateEnd(&strm);
|
||||
if (result)
|
||||
{
|
||||
free(result);
|
||||
}
|
||||
delete in;
|
||||
return false;
|
||||
}
|
||||
result = new_result;
|
||||
memcpy(result+cur_size, out, have);
|
||||
cur_size += have;
|
||||
|
||||
@@ -2219,6 +2232,11 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
|
||||
//and trailers are different for the formats.
|
||||
U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32 size )
|
||||
{
|
||||
if (size == 0)
|
||||
{
|
||||
LL_WARNS() << "No data to unzip." << LL_ENDL;
|
||||
return NULL;
|
||||
}
|
||||
U8* result = NULL;
|
||||
U32 cur_size = 0;
|
||||
z_stream strm;
|
||||
@@ -2258,7 +2276,23 @@ U8* unzip_llsdNavMesh( bool& valid, unsigned int& outsize, std::istream& is, S32
|
||||
}
|
||||
U32 have = CHUNK-strm.avail_out;
|
||||
|
||||
result = (U8*) realloc(result, cur_size + have);
|
||||
U8* new_result = (U8*) realloc(result, cur_size + have);
|
||||
if (new_result == NULL)
|
||||
{
|
||||
LL_WARNS() << "Failed to unzip LLSD NavMesh block: can't reallocate memory, current size: " << cur_size
|
||||
<< " bytes; requested " << cur_size + have
|
||||
<< " bytes; total syze: ." << size << " bytes."
|
||||
<< LL_ENDL;
|
||||
inflateEnd(&strm);
|
||||
if (result)
|
||||
{
|
||||
free(result);
|
||||
}
|
||||
delete [] in;
|
||||
valid = false;
|
||||
return NULL;
|
||||
}
|
||||
result = new_result;
|
||||
memcpy(result+cur_size, out, have);
|
||||
cur_size += have;
|
||||
|
||||
|
||||
@@ -4228,9 +4228,9 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
||||
if (always_underline) link_style->mUnderline = true;
|
||||
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
||||
};
|
||||
const auto&& cb = boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3);
|
||||
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : static_cast<LLUrlLabelCallback>(LLUrlRegistryNullCallback);
|
||||
auto& urlr = LLUrlRegistry::instance();
|
||||
while (!text.empty() && (force_replace_links ? urlr.findUrl(text, match, cb) : urlr.findUrl(text, match)))
|
||||
while (!text.empty() && urlr.findUrl(text, match, cb))
|
||||
{
|
||||
start = match.getStart();
|
||||
end = match.getEnd()+1;
|
||||
|
||||
@@ -673,12 +673,9 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
}
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgent::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return name_wait_str;
|
||||
}
|
||||
}
|
||||
@@ -789,12 +786,9 @@ std::string LLUrlEntryAgentName::getLabel(const std::string &url, const LLUrlLab
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
}
|
||||
auto connection = LLAvatarNameCache::get(agent_id, boost::bind(&LLUrlEntryAgentName::onAvatarNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.emplace(agent_id, connection);
|
||||
addObserver(agent_id_string, url, cb);
|
||||
return name_wait_str;
|
||||
}
|
||||
}
|
||||
@@ -928,13 +922,10 @@ std::string LLUrlEntryGroup::getLabel(const std::string &url, const LLUrlLabelCa
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cb)
|
||||
{
|
||||
gCacheName->getGroup(group_id,
|
||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||
this, _1, _2, _3));
|
||||
addObserver(group_id_string, url, cb);
|
||||
}
|
||||
gCacheName->getGroup(group_id,
|
||||
boost::bind(&LLUrlEntryGroup::onGroupNameReceived,
|
||||
this, _1, _2, _3));
|
||||
addObserver(group_id_string, url, cb);
|
||||
return LLTrans::getString("LoadingData");
|
||||
}
|
||||
}
|
||||
@@ -1038,7 +1029,7 @@ std::string LLUrlEntryParcel::getLabel(const std::string &url, const LLUrlLabelC
|
||||
std::string parcel_id_string = unescapeUrl(path_array[2]); // parcel id
|
||||
|
||||
// Add an observer to call LLUrlLabelCallback when we have parcel name.
|
||||
if (cb) addObserver(parcel_id_string, url, cb);
|
||||
addObserver(parcel_id_string, url, cb);
|
||||
|
||||
LLUUID parcel_id(parcel_id_string);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ class LLAvatarName;
|
||||
typedef boost::signals2::signal<void (const std::string& url,
|
||||
const std::string& label,
|
||||
const std::string& icon)> LLUrlLabelSignal;
|
||||
typedef LLUrlLabelSignal::slot_function_type LLUrlLabelCallback;
|
||||
typedef LLUrlLabelSignal::slot_type LLUrlLabelCallback;
|
||||
|
||||
///
|
||||
/// LLUrlEntryBase is the base class of all Url types registered in the
|
||||
|
||||
@@ -917,6 +917,17 @@
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
</map>
|
||||
<key>SinguFollowDistance</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Distance at which to follow objects and avatars at, from menus that offer follow (minimum 0.5)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<string>1.0</string>
|
||||
</map>
|
||||
<key>SinguLastKnownReleaseBuild</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
||||
@@ -1690,7 +1690,7 @@ void LLAgent::startFollowPilot(const LLUUID &leader_id, BOOL allow_flying, F32 s
|
||||
}
|
||||
|
||||
startAutoPilotGlobal(object->getPositionGlobal(),
|
||||
std::string(), // behavior_name
|
||||
"Follow", // behavior_name
|
||||
NULL, // target_rotation
|
||||
NULL, // finish_callback
|
||||
NULL, // callback_data
|
||||
@@ -1707,6 +1707,9 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
{
|
||||
if (mAutoPilot)
|
||||
{
|
||||
if (!user_cancel && mAutoPilotBehaviorName == "Follow")
|
||||
return; // Follow means actually follow
|
||||
|
||||
mAutoPilot = FALSE;
|
||||
if (mAutoPilotUseRotation && !user_cancel)
|
||||
{
|
||||
@@ -1726,6 +1729,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
||||
mAutoPilotFinishedCallback = NULL;
|
||||
}
|
||||
mLeaderID = LLUUID::null;
|
||||
mAutoPilotNoProgressFrameCount = 0;
|
||||
|
||||
setControlFlags(AGENT_CONTROL_STOP);
|
||||
|
||||
@@ -1750,20 +1754,24 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
{
|
||||
if (mAutoPilot)
|
||||
{
|
||||
if (!mLeaderID.isNull())
|
||||
bool follow = !mLeaderID.isNull(); //mAutoPilotBehaviorName == "Follow";
|
||||
if (follow)
|
||||
{
|
||||
LLViewerObject* object = gObjectList.findObject(mLeaderID);
|
||||
if (!object)
|
||||
if (!object)
|
||||
{
|
||||
mAutoPilotBehaviorName.clear(); // Nothing left to follow pilot
|
||||
stopAutoPilot();
|
||||
return;
|
||||
}
|
||||
mAutoPilotTargetGlobal = object->getPositionGlobal();
|
||||
if (const auto& av = object->asAvatar()) // Fly if avatar target is flying
|
||||
setFlying(av->mInAir);
|
||||
}
|
||||
|
||||
if (!isAgentAvatarValid()) return;
|
||||
|
||||
if (gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
if (!follow && gAgentAvatarp->mInAir && mAutoPilotAllowFlying)
|
||||
{
|
||||
setFlying(TRUE);
|
||||
}
|
||||
@@ -1775,7 +1783,7 @@ void LLAgent::autoPilot(F32 *delta_yaw)
|
||||
|
||||
F32 target_dist = direction.magVec();
|
||||
|
||||
if (target_dist >= mAutoPilotTargetDist)
|
||||
if (!follow && target_dist >= mAutoPilotTargetDist)
|
||||
{
|
||||
mAutoPilotNoProgressFrameCount++;
|
||||
if (mAutoPilotNoProgressFrameCount > AUTOPILOT_MAX_TIME_NO_PROGRESS * gFPSClamped)
|
||||
|
||||
@@ -217,7 +217,7 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
|
||||
|
||||
void LLChatBar::onFocusLost()
|
||||
{
|
||||
stopChat();
|
||||
//stopChat();
|
||||
}
|
||||
|
||||
void LLChatBar::refresh()
|
||||
|
||||
@@ -347,18 +347,6 @@ void track_av(const LLUUID& id)
|
||||
LLTracker::trackLocation(avatars[id], LLStringUtil::null, LLStringUtil::null);
|
||||
}
|
||||
|
||||
void teleport_to(const LLUUID& id)
|
||||
{
|
||||
if (auto entry = LLFloaterAvatarList::instanceExists() ? LLFloaterAvatarList::instance().getAvatarEntry(id) : nullptr)
|
||||
gAgent.teleportViaLocation(entry->getPosition());
|
||||
else
|
||||
{
|
||||
LLWorld::pos_map_t avatars;
|
||||
LLWorld::instance().getAvatars(&avatars);
|
||||
gAgent.teleportViaLocation(avatars[id]);
|
||||
}
|
||||
}
|
||||
|
||||
static void cmd_profile(const LLAvatarListEntry* entry);
|
||||
static void cmd_toggle_mark(LLAvatarListEntry* entry);
|
||||
static void cmd_ar(const LLAvatarListEntry* entry);
|
||||
@@ -412,15 +400,6 @@ namespace
|
||||
}
|
||||
};
|
||||
|
||||
class RadarTeleportTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
teleport_to(LFIDBearer::getActiveSelectedID());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class RadarAnnounceKeys : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -440,7 +419,6 @@ void add_radar_listeners()
|
||||
addMenu(new RadarFocus, "Radar.Focus");
|
||||
addMenu(new RadarFocusPrev, "Radar.FocusPrev");
|
||||
addMenu(new RadarFocusNext, "Radar.FocusNext");
|
||||
addMenu(new RadarTeleportTo, "Radar.TeleportTo");
|
||||
addMenu(new RadarAnnounceKeys, "Radar.AnnounceKeys");
|
||||
}
|
||||
|
||||
|
||||
@@ -306,6 +306,8 @@ void LLHoverView::updateText()
|
||||
line.append(LLTrans::getString("TooltipPerson"));
|
||||
}
|
||||
mText.push_back(line);
|
||||
|
||||
mText.push_back(llformat("ARC: %d", hit_object->asAvatar()->getVisualComplexity()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -542,11 +544,16 @@ void LLHoverView::updateText()
|
||||
line.append(LLTrans::getString("TooltipForSaleMsg", args));
|
||||
}
|
||||
mText.push_back(line);
|
||||
|
||||
auto& objects = LLSelectMgr::getInstance()->getHoverObjects();
|
||||
|
||||
line.clear();
|
||||
S32 prim_count = LLSelectMgr::getInstance()->getHoverObjects()->getObjectCount();
|
||||
S32 prim_count = objects->getObjectCount();
|
||||
line.append(llformat("Prims: %d", prim_count));
|
||||
mText.push_back(line);
|
||||
|
||||
mText.push_back(llformat("LI: %.2f", objects->getSelectedLinksetCost()));
|
||||
|
||||
line.clear();
|
||||
line.append("Position: ");
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ LLXMLNodePtr LLNameBox::getXML(bool save_children) const
|
||||
LLView* LLNameBox::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory)
|
||||
{
|
||||
S8 type = AVATAR;
|
||||
node->getAttributeS8("type", type);
|
||||
node->getAttributeS8("id_type", type);
|
||||
LLUUID id;
|
||||
node->getAttributeUUID("id", id);
|
||||
std::string loading;
|
||||
|
||||
@@ -137,7 +137,7 @@ LLView* LLNameEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory
|
||||
S32 max_text_length = 1024;
|
||||
node->getAttributeS32("max_length", max_text_length);
|
||||
S8 type = AVATAR;
|
||||
node->getAttributeS8("type", type);
|
||||
node->getAttributeS8("id_type", type);
|
||||
LLUUID id;
|
||||
node->getAttributeUUID("id", id);
|
||||
std::string loading;
|
||||
|
||||
@@ -2505,15 +2505,22 @@ BOOL enable_has_attachments(void*)
|
||||
//---------------------------------------------------------------------------
|
||||
// Avatar pie menu
|
||||
//---------------------------------------------------------------------------
|
||||
//void handle_follow(void *userdata)
|
||||
//{
|
||||
// // follow a given avatar by ID
|
||||
// LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
// if (objectp)
|
||||
// {
|
||||
// gAgent.startFollowPilot(objectp->getID());
|
||||
// }
|
||||
//}
|
||||
|
||||
class LLObjectFollow : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
// follow a given avatar by ID
|
||||
LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
|
||||
if (objectp)
|
||||
{
|
||||
if (auto av = objectp->getAvatarAncestor()) // Follow the avatar, not a control avatar or an attachment, if possible
|
||||
objectp = av;
|
||||
gAgent.startFollowPilot(objectp->getID(), true, gSavedSettings.getF32("SinguFollowDistance"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
bool enable_object_mute()
|
||||
{
|
||||
@@ -9352,6 +9359,17 @@ class ListStartIM : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
const LLVector3d& get_av_pos(const LLUUID& id);
|
||||
class ListTeleportTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
gAgent.teleportViaLocation(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id)->getPositionGlobal() : get_av_pos(id));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListAbuseReport : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9384,12 +9402,21 @@ class ListIsNearby : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(is_nearby(LFIDBearer::getActiveSelectedID()));
|
||||
const auto&& id = LFIDBearer::getActiveSelectedID();
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? gObjectList.findObject(id) : is_nearby(id));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListFollow : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gAgent.startFollowPilot(LFIDBearer::getActiveSelectedID(), true, gSavedSettings.getF32("SinguFollowDistance"));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
const LLVector3d& get_av_pos(const LLUUID& id);
|
||||
class ListGoTo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9802,6 +9829,7 @@ void initialize_menus()
|
||||
addMenu(new LLOHGOD(), "Object.EnableExplode");
|
||||
add_wave_listeners();
|
||||
add_dae_listeners();
|
||||
addMenu(new LLObjectFollow(), "Object.Follow");
|
||||
// </edit>
|
||||
addMenu(new LLObjectMute(), "Object.Mute");
|
||||
addMenu(new LLObjectBuy(), "Object.Buy");
|
||||
@@ -9931,8 +9959,10 @@ void initialize_menus()
|
||||
addMenu(new ListStartCall(), "List.StartCall");
|
||||
addMenu(new ListStartConference(), "List.StartConference");
|
||||
addMenu(new ListStartIM(), "List.StartIM");
|
||||
addMenu(new ListTeleportTo, "List.TeleportTo");
|
||||
addMenu(new ListAbuseReport(), "List.AbuseReport");
|
||||
addMenu(new ListIsNearby, "List.IsNearby");
|
||||
addMenu(new ListFollow, "List.Follow");
|
||||
addMenu(new ListGoTo, "List.GoTo");
|
||||
addMenu(new ListTrack, "List.Track");
|
||||
addMenu(new ListEject(), "List.ParcelEject");
|
||||
|
||||
@@ -4153,10 +4153,7 @@ void LLVOAvatar::clearNameTag()
|
||||
//static
|
||||
void LLVOAvatar::invalidateNameTag(const LLUUID& agent_id)
|
||||
{
|
||||
LLViewerObject* obj = gObjectList.findObject(agent_id);
|
||||
if (!obj) return;
|
||||
|
||||
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(obj);
|
||||
LLVOAvatar* avatar = gObjectList.findAvatar(agent_id);
|
||||
if (!avatar) return;
|
||||
|
||||
avatar->clearNameTag();
|
||||
|
||||
@@ -35,8 +35,6 @@ public:
|
||||
*/
|
||||
static bool canReceiveIM(const LLUUID& idSender);
|
||||
|
||||
/*
|
||||
|
||||
/*
|
||||
* Returns true if the user is allowed to chat on the specified channel
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<name_box type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-162" drop_shadow_visible="true" enabled="false" follows="left|top"
|
||||
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="96"
|
||||
mouse_opaque="true" name="GroupText" v_pad="0" type="1"/>
|
||||
mouse_opaque="true" name="GroupText" v_pad="0" id_type="1"/>
|
||||
<button bottom="-160" enabled="true" follows="left|top" font="SansSerifSmall"
|
||||
halign="center" height="16" label="Set..." label_selected="Set..."
|
||||
left="350" mouse_opaque="true" name="Set..." scale_image="true" width="90" />
|
||||
|
||||
@@ -497,7 +497,7 @@
|
||||
bottom="-126"
|
||||
left_delta="78"
|
||||
name="Group Name Proxy"
|
||||
width="142" type="1"/>
|
||||
width="142" id_type="1"/>
|
||||
<button bottom="-126" follows="top|right" font="SansSerifSmall" halign="center"
|
||||
height="16" label="Set" label_selected="Set..." left_delta="142"
|
||||
mouse_opaque="true" name="button set group" scale_image="TRUE" width="30" />
|
||||
|
||||
@@ -45,6 +45,11 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
@@ -55,7 +60,7 @@
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
|
||||
@@ -45,17 +45,21 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
@@ -67,20 +71,20 @@
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Track/Untrack" name="Track/Untrack">
|
||||
<on_click function="List.Track"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_click function="Radar.Track"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Names" name="Copy Names">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
|
||||
@@ -67,6 +67,9 @@
|
||||
<on_click function="ShowFloater" userdata="show inspect" />
|
||||
<on_enable function="Object.EnableInspect" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="Object.Follow"/>
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
<menu_item_call enabled="false" label="Send IM..." mouse_opaque="true" name="Send IM...">
|
||||
<on_click function="Avatar.SendIM" />
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
<menu_item_separator />
|
||||
<menu_item_call enabled="true" label="Reload" mouse_opaque="true" name="Reload Textures">
|
||||
<on_click function="Object.ReloadTextures" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="Object.Follow"/>
|
||||
</menu_item_call>
|
||||
</pie_menu>
|
||||
<menu_item_call enabled="false" label="Mute" mouse_opaque="true" name="Object Mute">
|
||||
|
||||
@@ -45,18 +45,21 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To" shortcut="control|Enter">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
<on_click function="List.RequestTeleport"/>
|
||||
@@ -68,19 +71,20 @@
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Chat History" name="Chat History">
|
||||
<on_click function="List.ShowLog"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Track/Untrack" name="Track/Untrack">
|
||||
<on_click function="Radar.Track"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator/>
|
||||
<menu_item_call label="Copy Key" name="Copy Key">
|
||||
<on_click function="List.CopyUUIDs"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy Name" name="Copy Name">
|
||||
<menu_item_call label="Copy Names" name="Copy Names">
|
||||
<on_click function="List.CopyNames"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Copy SLURL" name="Copy SLURL">
|
||||
<on_click function="List.CopySLURL"/>
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<menu_item_call label="Invite To Group" name="Invite To Group">
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
@@ -42,7 +46,7 @@
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To" name="Teleport To">
|
||||
<on_click function="Radar.TeleportTo"/>
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Request Teleport" name="Request Teleport">
|
||||
@@ -59,7 +63,7 @@
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Focus" name="Focus">
|
||||
<on_click function="List.Focus"/>
|
||||
<on_click function="Radar.Focus"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
</menu>
|
||||
|
||||
@@ -34,12 +34,24 @@
|
||||
function="Text.Url" userdata="ShowOnMap" />
|
||||
</menu_item_call>
|
||||
<menu_item_call
|
||||
label="Teleport to Object Location"
|
||||
label="Teleport to Object URL Location"
|
||||
layout="topleft"
|
||||
name="teleport_to_object">
|
||||
<menu_item_call.on_click
|
||||
function="Text.Url" userdata="Teleport" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Follow" name="Follow">
|
||||
<on_click function="List.Follow"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Move To" name="Move To">
|
||||
<on_click function="List.GoTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Teleport To (current location)" name="Teleport To (current location)">
|
||||
<on_click function="List.TeleportTo"/>
|
||||
<on_visible function="List.IsNearby"/>
|
||||
</menu_item_call>
|
||||
<menu_item_separator
|
||||
layout="topleft" />
|
||||
<menu_item_call
|
||||
|
||||
@@ -22,7 +22,7 @@ Hover your mouse over the options for more help.
|
||||
<name_box bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
|
||||
bottom="-20" drop_shadow_visible="true" follows="left|top"
|
||||
font="SansSerifBig" h_pad="0" halign="left" height="16" left="7"
|
||||
mouse_opaque="true" name="group_name" v_pad="0" type="1">
|
||||
mouse_opaque="true" name="group_name" v_pad="0" id_type="1">
|
||||
Type your new group name here
|
||||
</name_box>
|
||||
<text font="SansSerifSmall" name="prepend_founded_by">
|
||||
|
||||
Reference in New Issue
Block a user