diff --git a/.hgeol b/.hgeol
new file mode 100644
index 0000000000..94205bd3ef
--- /dev/null
+++ b/.hgeol
@@ -0,0 +1,12 @@
+[repository]
+native = LF
+
+[patterns]
+path:indra/lscript/lscript_compile/windows/unistd.h = CRLF
+path:indra/newview/installers/windows/FILES_ARE_UNICODE_UTF-16LE.txt = CRLF
+path:indra/tools/vstool/README.txt = CRLF
+**.h = native
+**.cpp = native
+**.py = native
+**.xml = native
+**.txt = native
diff --git a/.hgpatchinfo/Appearance-Misc.dep b/.hgpatchinfo/Appearance-Misc.dep
index 1cea281640..0f6e0edc63 100644
--- a/.hgpatchinfo/Appearance-Misc.dep
+++ b/.hgpatchinfo/Appearance-Misc.dep
@@ -1 +1 @@
-6fe7cc30ebc09cfe92787b71fa9dc55fd0396ec5
\ No newline at end of file
+471361eabfbf2865016a50e8087712b2266e83c7
\ No newline at end of file
diff --git a/.hgpatchinfo/RLVa.dep b/.hgpatchinfo/RLVa.dep
index 07f2e4f2f9..938785d899 100644
--- a/.hgpatchinfo/RLVa.dep
+++ b/.hgpatchinfo/RLVa.dep
@@ -1 +1 @@
-543c14d1270ba0327474287b08ae6463d8c03fdb
\ No newline at end of file
+264c7688ecdba8432a64f36a24e389eb85cbc10d
\ No newline at end of file
diff --git a/.hgpatchinfo/Viewer-Build.dep b/.hgpatchinfo/Viewer-Build.dep
index ac16606ab8..631a7e898a 100644
--- a/.hgpatchinfo/Viewer-Build.dep
+++ b/.hgpatchinfo/Viewer-Build.dep
@@ -1 +1 @@
-a48d42d15595c42a3ccb17a7c5ed246b87225cf3
\ No newline at end of file
+59b305ccfba9d4ba7935475d31f94b6ecfe415a4
\ No newline at end of file
diff --git a/.hgpatchinfo/Viewer-Build.desc b/.hgpatchinfo/Viewer-Build.desc
index b6edfa6f3b..8d302b3560 100644
--- a/.hgpatchinfo/Viewer-Build.desc
+++ b/.hgpatchinfo/Viewer-Build.desc
@@ -1,14 +1,11 @@
[Viewer/Build]
-- changed : compiler options for "Release with Debug" builds
-- changed : compiler and linker options for "Release" builds
-- changed : removed LL's changeset tags and added new (consistent) SL-X.Y.Z tags for releases
-- changed : break into the debugger rather than forcing the process into an unrecoverable state for "llerrs" on non-release builds
+* Changed compiler options for "Release with Debug" builds
+* Changed compiler and linker options for "Release" builds
+* Removed LL's changeset tags and added new (consistent) SL-X.Y.Z tags for releases
+* Break into the debugger rather than forcing the process into an unrecoverable state for "llerrs" on non-release builds
-> Windows only
-- changed : set the "UNATTENDED" flag to FALSE for all (Windows) *OS build configurations
-- changed : updated OpenJPEG package with debug information for crash debugging
-- fixed : *OS builds don't set the default Visual Studio project and configuration
-- fixed : libpng is built with "Whole Program Optimization" and causing slow linker performance
- -> "MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance"
- -> causes the linker to abort the current run and start over
-- fixed : viewer fails to compile with only the Windows 8 SDK installed
-- fixed : viewer won't compile when bison v2.7.1 is installed
+* Set the "UNATTENDED" flag to FALSE for all (Windows) *OS build configurations
+* CATZ-234: Updated FMOD Ex library to v4.44.61 (Windows)
+* CATZ-232: Updated OpenJPEG library to v1.5.2 (Windows)
+* [FIXED] Viewer fails to compile with only the Windows 8 SDK installed
+* [FIXED] JpegLib is built with "Whole Program Optimization" and causing slow linker performance
diff --git a/autobuild.xml b/autobuild.xml
index 5008f49113..6170fb62e6 100755
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -27,9 +27,9 @@
archive
name
windows
@@ -71,9 +71,9 @@
archive
name
darwin
@@ -295,9 +295,9 @@
archive
name
darwin
@@ -347,9 +347,9 @@
archive
name
darwin
@@ -401,9 +401,9 @@
archive
name
darwin
@@ -975,9 +975,9 @@
archive
name
darwin
@@ -1301,9 +1301,9 @@
archive
name
darwin
@@ -1673,11 +1673,11 @@
archive
name
darwin
@@ -2135,9 +2135,9 @@
archive
name
darwin
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 0ff2985b80..4f0fd0df23 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -147,8 +147,8 @@ if (WINDOWS)
add_definitions(/WX)
endif (NOT VS_DISABLE_FATAL_WARNINGS)
- # configure win32 API for windows XP+ compatibility
- set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
+ # configure win32 API for Windows Vista+ compatibility
+ set(WINVER "0x0600" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
if( ND_BUILD64BIT_ARCH )
@@ -312,6 +312,9 @@ if (DARWIN)
set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(DARWIN_extra_cstar_flags "-g -Wno-unused-local-typedef -Wno-deprecated-declarations")
+ # Take a deep breath and turn on C++11...
+ set(DARWIN_extra_cstar_flags "-std=c++11 -stdlib=libc++ -Wno-overloaded-virtual ${DARWIN_extra_cstar_flags}")
+ #
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
# NOTE: it's critical that the optimization flag is put in front.
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index b5da4d88ea..fcd584cab4 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -152,16 +152,37 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(DARWIN 1)
# now we only support Xcode 6.0 using 10.9 (Mavericks), minimum OS 10.7 (Lion)
- set(XCODE_VERSION 6.0)
+ # Be a bit more flexible: support Xcode 6 or 7 and SDKs from 10.9 to 10.11
+ #set(XCODE_VERSION 6.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
- set(CMAKE_OSX_SYSROOT macosx10.9)
+ #set(CMAKE_OSX_SYSROOT macosx10.9)
+ if(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
+ # Assume Xcode 7 if El Capitan SDK is present
+ set(XCODE_VERSION 7.3)
+ set(CMAKE_OSX_SYSROOT macosx10.11)
+ message(STATUS "OS X SDK 10.11 found.")
+ elseif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk")
+ # Assume Xcode 7 if Yosemite SDK is present
+ set(XCODE_VERSION 7.0)
+ set(CMAKE_OSX_SYSROOT macosx10.10)
+ message(STATUS "OS X SDK 10.10 found.")
+ elseif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
+ # Assume Xcode 6 if only Mavericks SDK is present
+ set(XCODE_VERSION 6.0)
+ set(CMAKE_OSX_SYSROOT macosx10.9)
+ message(STATUS "OS X SDK 10.9 found.")
+ else(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
+ error("Unable to determine which OS X SDK to use. Giving up.")
+ endif(IS_DIRECTORY "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL 3)
set(CMAKE_XCODE_ATTRIBUTE_GCC_STRICT_ALIASING NO)
set(CMAKE_XCODE_ATTRIBUTE_GCC_FAST_MATH NO)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS ssse3)
- set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
+ # Need libc++ for C++11 and Boost
+ #set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
+ set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
# Build only for i386 by default, system default on MacOSX 10.6+ is x86_64
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index d16bf0160b..69acc452ee 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -234,8 +234,16 @@ void LLCoros::toplevel(coro::self& self, CoroData* data, const callable_t& calla
{
// capture the 'self' param in CoroData
data->mSelf = &self;
+
+ // FIRE-19481; do not let any exception propagate
+ // callable();
+
+ try {
// run the code the caller actually wants in the coroutine
callable();
+ } catch( ... ){ LL_WARNS() << "Exception during coroutine" << LL_ENDL; }
+ //
+
// This cleanup isn't perfectly symmetrical with the way we initially set
// data->mPrev, but this is our last chance to reset mCurrentCoro.
sCurrentCoro.reset(data->mPrev);
diff --git a/indra/llcommon/llerror.cpp b/indra/llcommon/llerror.cpp
index 9d0ed0e641..7acbdd0c08 100644
--- a/indra/llcommon/llerror.cpp
+++ b/indra/llcommon/llerror.cpp
@@ -1104,7 +1104,12 @@ namespace LLError
{
return false;
}
-
+
+ // FIRE-19403/BUG-18253/MAINT-6469; During viewer shutdown the static instance could have already been destroyed
+ if( !Settings::instanceExists() )
+ return false;
+ //
+
SettingsConfigPtr s = Settings::getInstance()->getSettingsConfig();
s->mShouldLogCallCounter++;
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index d9b0112edb..25b89017cb 100644
--- a/indra/llcommon/llevents.cpp
+++ b/indra/llcommon/llevents.cpp
@@ -45,6 +45,7 @@
#include
// external library headers
#include
+#include // for abnormal_exit
#if LL_WINDOWS
#pragma warning (push)
#pragma warning (disable : 4701) // compiler thinks might use uninitialized var, but no
@@ -512,7 +513,15 @@ bool LLEventStream::post(const LLSD& event)
// Let caller know if any one listener handled the event. This is mostly
// useful when using LLEventStream as a listener for an upstream
// LLEventPump.
+
+ // FIRE-19481; do not let any abnormal_exit propagate
+ // return (*signal)(event);
+
+ try {
return (*signal)(event);
+ }catch( boost::dcoroutines::abnormal_exit& )
+ { return false; }
+ //
}
/*****************************************************************************
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 3e25228aeb..6dfabd5f94 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -45,7 +45,10 @@ typedef FILE LLFILE;
typedef struct _stat llstat;
#else
typedef struct stat llstat;
-#include
+// This file only exists on Linux
+# if LL_LINUX
+# include
+# endif
#endif
#ifndef S_ISREG
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index 6aa62554c3..2f194658b5 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -201,7 +201,7 @@
#elif LL_LINUX
#define LL_TYPEOF(exp) typeof(exp)
#elif LL_DARWIN
-#define LL_TYPEOF(exp) typeof(exp)
+#define LL_TYPEOF(exp) decltype(exp)
#endif
#define LL_TO_STRING_HELPER(x) #x
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index a75744617a..9a24087fcd 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -444,7 +444,7 @@ public:
struct LLDictionaryLess
{
public:
- bool operator()(const std::string& a, const std::string& b)
+ bool operator()(const std::string& a, const std::string& b) const
{
return (LLStringUtil::precedesDict(a, b) ? true : false);
}
diff --git a/indra/llcommon/lluri.cpp b/indra/llcommon/lluri.cpp
index 96e0c3f16f..db881954ba 100644
--- a/indra/llcommon/lluri.cpp
+++ b/indra/llcommon/lluri.cpp
@@ -261,7 +261,7 @@ static BOOL isDefault(const std::string& scheme, U16 port)
void LLURI::parseAuthorityAndPathUsingOpaque()
{
- if (mScheme == "http" || mScheme == "https" || mScheme == "hop" ||
+ if (mScheme == "http" || mScheme == "https" || mScheme == "hop" || mScheme == "inworldz" || mScheme == "iw" ||
mScheme == "ftp" || mScheme == "secondlife" ||
mScheme == "x-grid-location-info")
{
diff --git a/indra/llmath/v4color.cpp b/indra/llmath/v4color.cpp
index 79a64b24f2..aa84374372 100644
--- a/indra/llmath/v4color.cpp
+++ b/indra/llmath/v4color.cpp
@@ -122,7 +122,7 @@ LLColor4 LLColor4::cyan6(0.2f, 0.6f, 0.6f, 1.0f);
//////////////////////////////////////////////////////////////////////////////
// conversion
-LLColor4::operator const LLColor4U() const
+LLColor4::operator /*const*/ LLColor4U() const
{
return LLColor4U(
(U8)llclampb(ll_round(mV[VRED]*255.f)),
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 0d632f59be..7d553ef62a 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -131,7 +131,7 @@ class LLColor4
friend const LLColor4& operator*=(LLColor4 &a, const LLColor4 &b); // Doesn't multiply alpha! (for lighting)
// conversion
- operator const LLColor4U() const;
+ operator /*const*/ LLColor4U() const;
// Basic color values.
static LLColor4 red;
diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h
index 5d525762a4..2101efc5fc 100644
--- a/indra/llmath/v4coloru.h
+++ b/indra/llmath/v4coloru.h
@@ -130,7 +130,7 @@ public:
static BOOL parseColor4U(const std::string& buf, LLColor4U* value);
// conversion
- operator const LLColor4() const
+ operator /*const*/ LLColor4() const
{
return LLColor4(*this);
}
diff --git a/indra/llmessage/llavatarnamecache.cpp b/indra/llmessage/llavatarnamecache.cpp
index 332d6f45ec..756f815cc7 100644
--- a/indra/llmessage/llavatarnamecache.cpp
+++ b/indra/llmessage/llavatarnamecache.cpp
@@ -498,6 +498,13 @@ void LLAvatarNameCache::cleanupClass()
sCache.clear();
}
+// FIRE-6659: Legacy "Resident" name toggle
+void LLAvatarNameCache::clearCache()
+{
+ sCache.clear();
+}
+//
+
bool LLAvatarNameCache::importFile(std::istream& istr)
{
LLSD data;
diff --git a/indra/llmessage/llavatarnamecache.h b/indra/llmessage/llavatarnamecache.h
index 480e236313..a37f86c04d 100644
--- a/indra/llmessage/llavatarnamecache.h
+++ b/indra/llmessage/llavatarnamecache.h
@@ -102,6 +102,9 @@ namespace LLAvatarNameCache
F64 nameExpirationFromHeaders(const LLSD& headers);
void addUseDisplayNamesCallback(const use_display_name_signal_t::slot_type& cb);
+
+ // FIRE-6659: Legacy "Resident" name toggle
+ void clearCache();
}
// Parse a cache-control header to get the max-age delta-seconds.
diff --git a/indra/llui/llstatgraph.h b/indra/llui/llstatgraph.h
index f381e92a4d..ba7cfc5d10 100644
--- a/indra/llui/llstatgraph.h
+++ b/indra/llui/llstatgraph.h
@@ -126,7 +126,7 @@ private:
F32 mValue;
LLUIColor mColor;
- bool operator <(const Threshold& other)
+ bool operator <(const Threshold& other) const
{
return mValue < other.mValue;
}
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index 30c33b2584..8cbd9cde5e 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -520,7 +520,9 @@ void LLUICtrl::setEnabledControlVariable(LLControlVariable* control)
{
mEnabledControlVariable = control;
mEnabledControlConnection = mEnabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("enabled")));
- setEnabled(mEnabledControlVariable->getValue().asBoolean());
+ // enabled_control / disabled_control don't work properly with LLRadioGroup
+ //setEnabled(mEnabledControlVariable->getValue().asBoolean());
+ setEnabled(mEnabledControlVariable->getValue().asString() == "0" ? FALSE : mEnabledControlVariable->getValue().asBoolean());
}
}
@@ -535,7 +537,9 @@ void LLUICtrl::setDisabledControlVariable(LLControlVariable* control)
{
mDisabledControlVariable = control;
mDisabledControlConnection = mDisabledControlVariable->getSignal()->connect(boost::bind(&controlListener, _2, getHandle(), std::string("disabled")));
- setEnabled(!(mDisabledControlVariable->getValue().asBoolean()));
+ // enabled_control / disabled_control don't work properly with LLRadioGroup
+ //setEnabled(!(mDisabledControlVariable->getValue().asBoolean()));
+ setEnabled(!(mDisabledControlVariable->getValue().asString() == "0" ? FALSE : mDisabledControlVariable->getValue().asBoolean()));
}
}
@@ -587,12 +591,18 @@ bool LLUICtrl::controlListener(const LLSD& newvalue, LLHandle handle,
}
else if (type == "enabled")
{
- ctrl->setEnabled(newvalue.asBoolean());
+ // enabled_control / disabled_control don't work properly with LLRadioGroup
+ //ctrl->setEnabled(newvalue.asBoolean());
+ ctrl->setEnabled(newvalue.asString() == "0" ? FALSE : newvalue.asBoolean());
+ //
return true;
}
else if(type =="disabled")
{
- ctrl->setEnabled(!newvalue.asBoolean());
+ // enabled_control / disabled_control don't work properly with LLRadioGroup
+ //ctrl->setEnabled(!newvalue.asBoolean());
+ ctrl->setEnabled(!(newvalue.asString() == "0" ? FALSE : newvalue.asBoolean()));
+ //
return true;
}
else if (type == "visible")
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp
index c8f971c299..e3b67ffd35 100644
--- a/indra/llui/llurlentry.cpp
+++ b/indra/llui/llurlentry.cpp
@@ -42,7 +42,7 @@
// hop:// protocol>
//#define APP_HEADER_REGEX "((x-grid-location-info://[-\\w\\.]+/app)|(secondlife:///app))"
-#define APP_HEADER_REGEX "(((hop|x-grid-location-info)://[-\\w\\.\\:\\@]+/app)|((hop|secondlife):///app))"
+#define APP_HEADER_REGEX "(((hop|x-grid-location-info)://[-\\w\\.\\:\\@]+/app)|((hop|secondlife|inworldz|iw):///app))"
//
// Utility functions
@@ -340,7 +340,9 @@ std::string LLUrlEntryHTTPNoProtocol::getTooltip(const std::string &url) const
LLUrlEntryInvalidSLURL::LLUrlEntryInvalidSLURL()
: LLUrlEntryBase()
{
- mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+ // Inworldz special
+ //mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|secondlife://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
+ mPattern = boost::regex("(http://(maps.secondlife.com|slurl.com)/secondlife/|(secondlife|inworldz|iw)://(/app/(worldmap|teleport)/)?)[^ /]+(/-?[0-9]+){1,3}(/?(\\?title|\\?img|\\?msg)=\\S*)?/?",
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_http.xml";
mTooltip = LLTrans::getString("TooltipHttpUrl");
@@ -1016,7 +1018,7 @@ LLUrlEntryObjectIM::LLUrlEntryObjectIM()
{
// hop:// protocol; Ansa: Stop at first space so we can use it in notifications!
//mPattern = boost::regex("secondlife:///app/objectim/[\\da-f-]+\?.*",
- mPattern = boost::regex("(hop|secondlife):///app/objectim/[\\da-f-]+\?[^ \t\r\n\v\f]*",
+ mPattern = boost::regex("(hop|secondlife|inworldz|iw):///app/objectim/[\\da-f-]+\?[^ \t\r\n\v\f]*",
//
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_objectim.xml";
@@ -1145,7 +1147,9 @@ void LLUrlEntryParcel::processParcelInfo(const LLParcelData& parcel_data)
//
LLUrlEntryPlace::LLUrlEntryPlace()
{
- mPattern = boost::regex("((hop://[-\\w\\.\\:\\@]+/)|((x-grid-location-info://[-\\w\\.]+/region/)|(secondlife://)))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", //
+ // Inworldz special
+ //mPattern = boost::regex("((hop://[-\\w\\.\\:\\@]+/)|((x-grid-location-info://[-\\w\\.]+/region/)|(secondlife://)))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", //
+ mPattern = boost::regex("((hop://[-\\w\\.\\:\\@]+/)|((x-grid-location-info://[-\\w\\.]+/region/)|((secondlife|inworldz|iw)://)))\\S+/?(\\d+/\\d+/\\d+|\\d+/\\d+)/?", //
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slurl.xml";
mTooltip = LLTrans::getString("TooltipSLURL");
@@ -1327,7 +1331,7 @@ std::string LLUrlEntryTeleport::getLocation(const std::string &url) const
//
LLUrlEntrySL::LLUrlEntrySL()
{
- mPattern = boost::regex("(hop|secondlife)://(\\w+)?(:\\d+)?/\\S+", //
+ mPattern = boost::regex("(hop|secondlife|inworldz|iw)://(\\w+)?(:\\d+)?/\\S+", //
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipSLAPP");
@@ -1344,7 +1348,7 @@ std::string LLUrlEntrySL::getLabel(const std::string &url, const LLUrlLabelCallb
//
LLUrlEntrySLLabel::LLUrlEntrySLLabel()
{
- mPattern = boost::regex("\\[(hop|secondlife)://\\S+[ \t]+[^\\]]+\\]", //
+ mPattern = boost::regex("\\[(hop|secondlife|inworldz|iw)://\\S+[ \t]+[^\\]]+\\]", //
boost::regex::perl|boost::regex::icase);
mMenuName = "menu_url_slapp.xml";
mTooltip = LLTrans::getString("TooltipSLAPP");
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index a78fec1f2e..cd6147fbf2 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -236,8 +236,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAClosestPolicy,
NSOpenGLPFAAccelerated,
- NSOpenGLPFASampleBuffers, (samples > 0 ? 1 : 0),
- NSOpenGLPFASamples, samples,
+ NSOpenGLPFASampleBuffers, static_cast(samples > 0 ? 1 : 0),
+ NSOpenGLPFASamples, static_cast(samples),
NSOpenGLPFAStencilSize, 8,
NSOpenGLPFADepthSize, 24,
NSOpenGLPFAAlphaSize, 8,
@@ -380,8 +380,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (void)mouseMoved:(NSEvent *)theEvent
{
float mouseDeltas[2] = {
- [theEvent deltaX],
- [theEvent deltaY]
+ static_cast([theEvent deltaX]),
+ static_cast([theEvent deltaY])
};
callDeltaUpdate(mouseDeltas, 0);
@@ -401,8 +401,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
// The old CoreGraphics APIs we previously relied on are now flagged as obsolete.
// NSEvent isn't obsolete, and provides us with the correct deltas.
float mouseDeltas[2] = {
- [theEvent deltaX],
- [theEvent deltaY]
+ static_cast([theEvent deltaX]),
+ static_cast([theEvent deltaY])
};
callDeltaUpdate(mouseDeltas, 0);
@@ -604,13 +604,13 @@ attributedStringInfo getSegments(NSAttributedString *str)
if (mMarkedTextAllowed)
{
unsigned int selected[2] = {
- selectedRange.location,
- selectedRange.length
+ static_cast(selectedRange.location),
+ static_cast(selectedRange.length)
};
unsigned int replacement[2] = {
- replacementRange.location,
- replacementRange.length
+ static_cast(replacementRange.location),
+ static_cast(replacementRange.length)
};
int string_length = [aString length];
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index 07861f125e..978a5d0aac 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -553,7 +553,7 @@ void getPreeditLocation(float *location, unsigned int length)
preeditor->getPreeditLocation(length, &coord, &rect, NULL);
- float c[4] = {coord.mX, coord.mY, 0, 0};
+ float c[4] = {static_cast(coord.mX), static_cast(coord.mY), 0, 0};
convertRectToScreen(gWindowImplementation->getWindow(), c);
@@ -909,7 +909,7 @@ BOOL LLWindowMacOSX::setPosition(const LLCoordScreen position)
{
if(mWindow)
{
- float pos[2] = {position.mX, position.mY};
+ float pos[2] = {static_cast(position.mX), static_cast(position.mY)};
setWindowPos(mWindow, pos);
}
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 72c6cc93da..adb3e2f732 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -123,7 +123,8 @@ if (DARWIN)
PREFIX ""
BUILD_WITH_INSTALL_RPATH 1
INSTALL_NAME_DIR "@executable_path"
- LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
+ CXX_FLAGS "-std=c++11 -stdlib=libc++"
+ LINK_FLAGS "-stdlib=libc++ -exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
add_custom_command(TARGET media_plugin_cef
diff --git a/indra/media_plugins/quicktime/CMakeLists.txt b/indra/media_plugins/quicktime/CMakeLists.txt
index c5615145be..4e3a564cd8 100644
--- a/indra/media_plugins/quicktime/CMakeLists.txt
+++ b/indra/media_plugins/quicktime/CMakeLists.txt
@@ -75,7 +75,7 @@ if (QUICKTIME)
PREFIX ""
BUILD_WITH_INSTALL_RPATH 1
INSTALL_NAME_DIR "@executable_path"
- LINK_FLAGS "-exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
+ LINK_FLAGS "-stdlib=libc++ -exported_symbols_list ${CMAKE_CURRENT_SOURCE_DIR}/../base/media_plugin_base.exp"
)
# We use a bunch of deprecated system APIs.
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index c7c5fd94cd..27a113368d 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -127,6 +127,7 @@ set(viewer_SOURCE_FILES
floatermedialists.cpp
fsareasearch.cpp
fsareasearchmenu.cpp
+ fsavatarrenderpersistence.cpp
fsavatarsearchmenu.cpp
fsblocklistmenu.cpp
fschathistory.cpp
@@ -864,6 +865,7 @@ set(viewer_HEADER_FILES
floatermedialists.h
fsareasearch.h
fsareasearchmenu.h
+ fsavatarrenderpersistence.h
fsavatarsearchmenu.h
fsblocklistmenu.h
fschathistory.h
@@ -1546,9 +1548,6 @@ set(viewer_HEADER_FILES
pieseparator.h
pieslice.h
pipeline.h
- roles_constants.h
- qtoolalign.h
- quickprefs.h
rlvactions.h
rlvdefines.h
rlvhandler.h
@@ -1559,6 +1558,9 @@ set(viewer_HEADER_FILES
rlvextensions.h
rlvfloaters.h
rlvui.h
+ roles_constants.h
+ qtoolalign.h
+ quickprefs.h
sanitycheck.h
streamtitledisplay.h
utilitybar.h
diff --git a/indra/newview/aoengine.cpp b/indra/newview/aoengine.cpp
index 0188fba6f4..aa242241d6 100644
--- a/indra/newview/aoengine.cpp
+++ b/indra/newview/aoengine.cpp
@@ -574,17 +574,21 @@ void AOEngine::checkSitCancel()
if (foreignAnimations(seat))
{
- LLUUID animation = mCurrentSet->getStateByRemapID(ANIM_AGENT_SIT)->mCurrentAnimationID;
- if (animation.notNull())
+ AOSet::AOState* aoState = mCurrentSet->getStateByRemapID(ANIM_AGENT_SIT);
+ if (aoState)
{
- LL_DEBUGS("AOEngine") << "Stopping sit animation due to foreign animations running" << LL_ENDL;
- gAgent.sendAnimationRequest(animation, ANIM_REQUEST_STOP);
- // remove cycle point cover-up
- gAgent.sendAnimationRequest(ANIM_AGENT_SIT_GENERIC, ANIM_REQUEST_STOP);
- gAgentAvatarp->LLCharacter::stopMotion(animation);
- mSitCancelTimer.stop();
- // stop cycle tiemr
- mCurrentSet->stopTimer();
+ LLUUID animation = aoState->mCurrentAnimationID;
+ if (animation.notNull())
+ {
+ LL_DEBUGS("AOEngine") << "Stopping sit animation due to foreign animations running" << LL_ENDL;
+ gAgent.sendAnimationRequest(animation, ANIM_REQUEST_STOP);
+ // remove cycle point cover-up
+ gAgent.sendAnimationRequest(ANIM_AGENT_SIT_GENERIC, ANIM_REQUEST_STOP);
+ gAgentAvatarp->LLCharacter::stopMotion(animation);
+ mSitCancelTimer.stop();
+ // stop cycle tiemr
+ mCurrentSet->stopTimer();
+ }
}
}
}
@@ -931,6 +935,11 @@ BOOL AOEngine::removeSet(AOSet* set)
BOOL AOEngine::removeAnimation(const AOSet* set, AOSet::AOState* state, S32 index)
{
+ if (index < 0)
+ {
+ return FALSE;
+ }
+
S32 numOfAnimations = state->mAnimations.size();
if (numOfAnimations == 0)
{
@@ -1717,9 +1726,16 @@ void AOEngine::onNotecardLoadComplete(LLVFS* vfs, const LLUUID& assetUUID, LLAss
S32 notecardSize = vfs->getSize(assetUUID, type);
char* buffer = new char[notecardSize];
- vfs->getData(assetUUID, type, (U8*) buffer, 0, notecardSize);
- AOEngine::instance().parseNotecard(buffer);
+ S32 ret = vfs->getData(assetUUID, type, reinterpret_cast(buffer), 0, notecardSize);
+ if (ret > 0)
+ {
+ AOEngine::instance().parseNotecard(buffer);
+ }
+ else
+ {
+ delete[] buffer;
+ }
}
void AOEngine::parseNotecard(const char* buffer)
@@ -1739,7 +1755,7 @@ void AOEngine::parseNotecard(const char* buffer)
}
std::string text(buffer);
- delete buffer;
+ delete[] buffer;
std::vector lines;
LLStringUtil::getTokens(text, lines, "\n");
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b2ecf501c8..aea7ecd0de 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1309,6 +1309,17 @@
Value
1
+ RLVaExperimentalCommands
+
RLVaHideLockedLayers
- RLVaShowNameTags
-
RLVaTopLevelMenu
@@ -24009,6 +24009,28 @@ Change of this parameter will affect the layout of buttons in notification toast
Value
0
+ FSTagShowTooComplexARW
+
+ FSTagAlwaysShowARW
+
diff --git a/indra/newview/app_settings/settings_crash_behavior.xml b/indra/newview/app_settings/settings_crash_behavior.xml
index a4dc379226..a22d9a5452 100644
--- a/indra/newview/app_settings/settings_crash_behavior.xml
+++ b/indra/newview/app_settings/settings_crash_behavior.xml
@@ -33,5 +33,16 @@
Value
0
+ CrashHostUrl
+
diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp
index 714dfacc14..e459912fc6 100644
--- a/indra/newview/chatbar_as_cmdline.cpp
+++ b/indra/newview/chatbar_as_cmdline.cpp
@@ -777,7 +777,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
report_to_nearby_chat(llformat("Object with key %s not found!", target_key.asString().c_str()));
return false;
}
- if ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(myObject, LLVector3::zero)))
+ if ((!RlvActions::isRlvEnabled()) || (RlvActions::canSit(myObject, LLVector3::zero)))
{
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_AgentRequestSit);
diff --git a/indra/newview/floatermedialists.cpp b/indra/newview/floatermedialists.cpp
index 8730e30283..19973e164d 100644
--- a/indra/newview/floatermedialists.cpp
+++ b/indra/newview/floatermedialists.cpp
@@ -57,17 +57,18 @@ BOOL FloaterMediaLists::postBuild()
element["columns"][0]["column"] = "list";
element["columns"][0]["value"] = itr["domain"].asString();
if (itr["action"].asString() == "allow")
- {
+ {
mWhitelistSLC->addElement(element);
- mWhitelistSLC->sortByColumn("list", TRUE);
}
else if (itr["action"].asString() == "deny")
{
mBlacklistSLC->addElement(element);
- mBlacklistSLC->sortByColumn("list", TRUE);
}
}
+ mWhitelistSLC->sortByColumn("list", TRUE);
+ mBlacklistSLC->sortByColumn("list", TRUE);
+
return TRUE;
}
@@ -87,7 +88,7 @@ void FloaterMediaLists::onWhitelistRemove()
{
std::string domain = mWhitelistSLC->getSelectedItemLabel();
- for(S32 i = 0;i<(S32)LLViewerParcelMedia::sMediaFilterList.size();i++)
+ for (S32 i = 0; i < (S32)LLViewerParcelMedia::sMediaFilterList.size(); ++i)
{
if (LLViewerParcelMedia::sMediaFilterList[i]["domain"].asString() == domain)
{
@@ -121,7 +122,7 @@ void FloaterMediaLists::onBlacklistRemove()
{
std::string domain = mBlacklistSLC->getSelectedItemLabel();
- for(S32 i = 0;i<(S32)LLViewerParcelMedia::sMediaFilterList.size();i++)
+ for (S32 i = 0; i < (S32)LLViewerParcelMedia::sMediaFilterList.size(); ++i)
{
if (LLViewerParcelMedia::sMediaFilterList[i]["domain"].asString() == domain)
{
@@ -160,7 +161,7 @@ bool FloaterMediaLists::handleAddDomainCallback(const LLSD& notification, const
LLViewerParcelMedia::sMediaFilterList.append(newmedia);
LLViewerParcelMedia::saveDomainFilterList();
- LLFloater* floater = LLFloaterReg::getInstance("media_lists");
+ LLFloater* floater = LLFloaterReg::findInstance("media_lists");
if (floater)
{
LLScrollListCtrl* list = floater->getChild(whitelist ? "whitelist" : "blacklist");
diff --git a/indra/newview/floatermedialists.h b/indra/newview/floatermedialists.h
index 15d4d6d888..5fdcc90bff 100644
--- a/indra/newview/floatermedialists.h
+++ b/indra/newview/floatermedialists.h
@@ -36,7 +36,7 @@ class LLButton;
class FloaterMediaLists : public LLFloater
{
public:
- FloaterMediaLists(const LLSD& key);
+ FloaterMediaLists(const LLSD& key);
BOOL postBuild();
static bool handleAddDomainCallback(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/fonts/fonts_deja_vu_all_caps.xml b/indra/newview/fonts/fonts_deja_vu_all_caps.xml
index a4f0c1583f..e3901a7470 100644
--- a/indra/newview/fonts/fonts_deja_vu_all_caps.xml
+++ b/indra/newview/fonts/fonts_deja_vu_all_caps.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fonts/fonts_droid.xml b/indra/newview/fonts/fonts_droid.xml
index 2eb42ad0f9..bc9a1f677c 100644
--- a/indra/newview/fonts/fonts_droid.xml
+++ b/indra/newview/fonts/fonts_droid.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fonts/fonts_dyslexia.xml b/indra/newview/fonts/fonts_dyslexia.xml
index 8e9badc8a4..0b7c4aa13b 100644
--- a/indra/newview/fonts/fonts_dyslexia.xml
+++ b/indra/newview/fonts/fonts_dyslexia.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fonts/fonts_liberation.xml b/indra/newview/fonts/fonts_liberation.xml
index 904160566e..c30f15a89c 100644
--- a/indra/newview/fonts/fonts_liberation.xml
+++ b/indra/newview/fonts/fonts_liberation.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fonts/fonts_mobi.xml b/indra/newview/fonts/fonts_mobi.xml
index 2952932487..bc892879c6 100644
--- a/indra/newview/fonts/fonts_mobi.xml
+++ b/indra/newview/fonts/fonts_mobi.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fonts/fonts_roboto.xml b/indra/newview/fonts/fonts_roboto.xml
index cbfb2af731..cab758adf8 100644
--- a/indra/newview/fonts/fonts_roboto.xml
+++ b/indra/newview/fonts/fonts_roboto.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fonts/fonts_ubuntu.xml b/indra/newview/fonts/fonts_ubuntu.xml
index f0405d9c7c..84ba831f6a 100644
--- a/indra/newview/fonts/fonts_ubuntu.xml
+++ b/indra/newview/fonts/fonts_ubuntu.xml
@@ -16,7 +16,9 @@
ヒラギノ角ゴ Pro W3.otf
ヒラギノ角ゴ ProN W3.otf
ヒラギノ明朝 ProN W3.ttc
+
AppleSDGothicNeo.ttc
+
AppleGothic.dfont
AppleGothic.ttf
AppleSDGothicNeo-Regular.otf
diff --git a/indra/newview/fsavatarrenderpersistence.cpp b/indra/newview/fsavatarrenderpersistence.cpp
new file mode 100644
index 0000000000..1d0b99bf1c
--- /dev/null
+++ b/indra/newview/fsavatarrenderpersistence.cpp
@@ -0,0 +1,122 @@
+/**
+ * @file fsavatarrenderpersistence.cpp
+ * @brief Firestorm avatar render settings persistence
+ *
+ * $LicenseInfo:firstyear=2016&license=viewerlgpl$
+ * Copyright (c) 2016 Ansariel Hiller @ Second Life
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
+ * http://www.firestormviewer.org
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "fsavatarrenderpersistence.h"
+#include "llsdserialize.h"
+
+FSAvatarRenderPersistence::FSAvatarRenderPersistence()
+{
+}
+
+FSAvatarRenderPersistence::~FSAvatarRenderPersistence()
+{
+ saveAvatarRenderSettings();
+}
+
+void FSAvatarRenderPersistence::init()
+{
+ LL_INFOS() << "Initializing avatar render persistence manager..." << LL_ENDL;
+ loadAvatarRenderSettings();
+}
+
+LLVOAvatar::VisualMuteSettings FSAvatarRenderPersistence::getAvatarRenderSettings(const LLUUID& avatar_id)
+{
+ avatar_render_setting_t::iterator found = mAvatarRenderMap.find(avatar_id);
+ if (found != mAvatarRenderMap.end())
+ {
+ return found->second;
+ }
+
+ return LLVOAvatar::AV_RENDER_NORMALLY;
+}
+
+void FSAvatarRenderPersistence::setAvatarRenderSettings(const LLUUID& avatar_id, LLVOAvatar::VisualMuteSettings render_settings)
+{
+ if (render_settings == LLVOAvatar::AV_RENDER_NORMALLY)
+ {
+ avatar_render_setting_t::iterator found = mAvatarRenderMap.find(avatar_id);
+ if (found != mAvatarRenderMap.end())
+ {
+ mAvatarRenderMap.erase(found);
+ }
+ }
+ else
+ {
+ mAvatarRenderMap[avatar_id] = render_settings;
+ }
+}
+
+void FSAvatarRenderPersistence::loadAvatarRenderSettings()
+{
+ const std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "avatar_render_settings.xml");
+
+ if (LLFile::isfile(filename))
+ {
+ llifstream file(filename.c_str());
+ if (!file.is_open())
+ {
+ LL_WARNS() << "Failed to open avatar render settings file." << LL_ENDL;
+ return;
+ }
+ LLSD data;
+ LLSDSerialize::fromXMLDocument(data, file);
+ file.close();
+
+ mAvatarRenderMap.clear();
+ for (LLSD::map_const_iterator it = data.beginMap(); it != data.endMap(); ++it)
+ {
+ LLUUID avatar_id(it->first);
+ LLVOAvatar::VisualMuteSettings render_settings = (LLVOAvatar::VisualMuteSettings)it->second.asInteger();
+
+ mAvatarRenderMap[avatar_id] = render_settings;
+ }
+ }
+}
+
+void FSAvatarRenderPersistence::saveAvatarRenderSettings()
+{
+ LL_INFOS() << "Saving avatar render settings..." << LL_ENDL;
+
+ const std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, "avatar_render_settings.xml");
+
+ LLSD data(LLSD::emptyMap());
+
+ for (avatar_render_setting_t::iterator it = mAvatarRenderMap.begin(); it != mAvatarRenderMap.end(); ++it)
+ {
+ data[it->first.asString()] = (S32)it->second;
+ }
+
+ llofstream file(filename.c_str());
+ if (!file.is_open())
+ {
+ LL_WARNS() << "Unable to save avatar render settings!" << LL_ENDL;
+ return;
+ }
+ LLSDSerialize::toPrettyXML(data, file);
+ file.close();
+}
diff --git a/indra/newview/fsavatarrenderpersistence.h b/indra/newview/fsavatarrenderpersistence.h
new file mode 100644
index 0000000000..db893f66fa
--- /dev/null
+++ b/indra/newview/fsavatarrenderpersistence.h
@@ -0,0 +1,57 @@
+/**
+ * @file fsavatarrenderpersistence.h
+ * @brief Firestorm avatar render settings persistence
+ *
+ * $LicenseInfo:firstyear=2016&license=viewerlgpl$
+ * Copyright (c) 2016 Ansariel Hiller @ Second Life
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA
+ * http://www.firestormviewer.org
+ * $/LicenseInfo$
+ */
+
+#ifndef FS_AVATARRENDERPERSISTENCE_H
+#define FS_AVATARRENDERPERSISTENCE_H
+
+#include "llsingleton.h"
+#include "llvoavatar.h"
+
+class FSAvatarRenderPersistence
+ : public LLSingleton
+{
+ LOG_CLASS(FSAvatarRenderPersistence);
+
+friend class LLSingleton;
+friend class FSPanelPreferenceBackup;
+
+public:
+ void init();
+ LLVOAvatar::VisualMuteSettings getAvatarRenderSettings(const LLUUID& avatar_id);
+ void setAvatarRenderSettings(const LLUUID& avatar_id, LLVOAvatar::VisualMuteSettings render_settings);
+
+private:
+ FSAvatarRenderPersistence();
+ virtual ~FSAvatarRenderPersistence();
+
+ void loadAvatarRenderSettings();
+ void saveAvatarRenderSettings();
+
+ typedef std::map avatar_render_setting_t;
+ avatar_render_setting_t mAvatarRenderMap;
+};
+
+#endif // FS_AVATARRENDERPERSISTENCE_H
diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp
index b118bab962..1e832201b3 100644
--- a/indra/newview/fschathistory.cpp
+++ b/indra/newview/fschathistory.cpp
@@ -740,10 +740,11 @@ protected:
void showInfoCtrl()
{
- const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && (CHAT_SOURCE_SYSTEM != mSourceType || mType == CHAT_TYPE_RADAR);
+// const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && (CHAT_SOURCE_SYSTEM != mSourceType || mType == CHAT_TYPE_RADAR);;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
- if (isVisible && mShowInfoCtrl)
+ const bool isVisible = mShowInfoCtrl && !mAvatarID.isNull() && !mFrom.empty() && (CHAT_SOURCE_SYSTEM != mSourceType || mType == CHAT_TYPE_RADAR);;
// [/RLVa:KB]
+ if (isVisible)
{
const LLRect sticky_rect = mUserNameTextBox->getRect();
S32 icon_x = llmin(sticky_rect.mLeft + mUserNameTextBox->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp
index 4191c1bd52..b29b8590a2 100644
--- a/indra/newview/fscommon.cpp
+++ b/indra/newview/fscommon.cpp
@@ -38,6 +38,7 @@
#include "llmutelist.h"
#include "llnotificationmanager.h"
#include "lltooldraganddrop.h"
+#include "lltrans.h"
#include "llviewerinventory.h"
#include "llviewernetwork.h"
#include "llviewerobject.h"
diff --git a/indra/newview/fsgridhandler.cpp b/indra/newview/fsgridhandler.cpp
index 1a3aa35046..482e29ff47 100644
--- a/indra/newview/fsgridhandler.cpp
+++ b/indra/newview/fsgridhandler.cpp
@@ -1432,6 +1432,10 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid)
{
ret = mGridList[grid][GRID_APP_SLURL_BASE].asString();
}
+ else if (grid == INWORLDZ_URI)
+ {
+ ret = "inworldz:///app";
+ }
else
{
std::string app_base;
@@ -1463,6 +1467,6 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid)
ret = llformat(app_base.c_str(), grid_norm.c_str());
}
- LL_DEBUGS("GridManager") << "App slurl base: " << ret << LL_ENDL;
+ LL_DEBUGS("GridManager") << "App slurl base: " << ret << " - grid = " << grid << LL_ENDL;
return ret;
}
diff --git a/indra/newview/fsgridhandler.h b/indra/newview/fsgridhandler.h
index 7b293ebf07..9424787f57 100644
--- a/indra/newview/fsgridhandler.h
+++ b/indra/newview/fsgridhandler.h
@@ -70,6 +70,9 @@ const std::string GRID_SLURL_BASE = "slurl_base";
const std::string GRID_APP_SLURL_BASE = "app_slurl_base";
//
+// Inworldz special
+#define INWORLDZ_URI "inworldz.com:8002"
+
class GridInfoRequestResponder;
//
diff --git a/indra/newview/fsslurl.cpp b/indra/newview/fsslurl.cpp
index 93b1b840c2..5307651f5b 100644
--- a/indra/newview/fsslurl.cpp
+++ b/indra/newview/fsslurl.cpp
@@ -52,14 +52,17 @@ const char* LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME = "x-grid-location-info";
const char* LLSLURL::WWW_SLURL_COM = "www.slurl.com";
const char* LLSLURL::MAPS_SECONDLIFE_COM = "maps.secondlife.com";
-//
const char* LLSLURL::SLURL_COM = "slurl.com";
const char* LLSLURL::SLURL_APP_PATH = "app";
const char* LLSLURL::SLURL_SECONDLIFE_PATH = "secondlife";
const char* LLSLURL::SLURL_REGION_PATH = "region";
const char* LLSLURL::SIM_LOCATION_HOME = "home";
const char* LLSLURL::SIM_LOCATION_LAST = "last";
-//
+
+// Inworldz special
+const char* LLSLURL::SLURL_INWORLDZ_SCHEME = "inworldz";
+const char* LLSLURL::SLURL_IW_SCHEME = "iw";
+const char* LLSLURL::PLACES_INWORLDZ_COM = "places.inworldz.com";
// resolve a simstring from a slurl
LLSLURL::LLSLURL(const std::string& slurl)
@@ -212,7 +215,7 @@ LLSLURL::LLSLURL(const std::string& slurl)
if(mGrid.empty() && LLStartUp::getStartupState() == STATE_STARTED)
{
// we couldn't find the grid in the grid manager, so bail
- LL_WARNS() << "unable to find grid" << LL_ENDL;
+ LL_WARNS("SLURL") << "unable to find grid" << LL_ENDL;
return;
}
// set the type as appropriate.
@@ -241,6 +244,55 @@ LLSLURL::LLSLURL(const std::string& slurl)
path_array.insert(0, slurl_uri.hostNameAndPort());
}
}
+ else if (slurl_uri.scheme() == LLSLURL::SLURL_INWORLDZ_SCHEME ||
+ slurl_uri.scheme() == LLSLURL::SLURL_IW_SCHEME)
+ {
+ LL_DEBUGS("SLURL") << "inworldz scheme" << LL_ENDL;
+
+ mGrid = INWORLDZ_URI;
+
+ if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
+ {
+ // it's in the form iw:///(app)
+ // so parse the grid name to derive the grid ID
+ if (!slurl_uri.hostNameAndPort().empty())
+ {
+ LL_DEBUGS("SLURL") << "(inworldz|iw):///app" << LL_ENDL;
+
+ mGrid = LLGridManager::getInstance()->getGridByProbing(slurl_uri.hostNameAndPort());
+ if (mGrid.empty())
+ {
+ mGrid = LLGridManager::getInstance()->getGridByProbing(slurl_uri.hostName());
+ }
+ }
+ else if (path_array[0].asString() == LLSLURL::SLURL_APP_PATH)
+ {
+ LL_DEBUGS("SLURL") << "(inworldz|iw):///app" << LL_ENDL;
+
+ // for app style slurls, where no grid name is specified, assume the currently
+ // selected or logged in grid.
+ mGrid = LLGridManager::getInstance()->getGridId();
+ }
+
+ if (mGrid.empty() && LLStartUp::getStartupState() == STATE_STARTED)
+ {
+ // we couldn't find the grid in the grid manager, so bail
+ LL_WARNS("SLURL")<<"unable to find grid"< or /app/, so it must be iw://
+ // therefore the hostname will be the region name, and it's a location type
+ mType = LOCATION;
+ // 'normalize' it so the region name is in fact the head of the path_array
+ path_array.insert(0, slurl_uri.hostName());
+ }
+ }
else if((slurl_uri.scheme() == LLSLURL::SLURL_HTTP_SCHEME)
|| (slurl_uri.scheme() == LLSLURL::SLURL_HTTPS_SCHEME)
|| (slurl_uri.scheme() == LLSLURL::SLURL_X_GRID_LOCATION_INFO_SCHEME)
@@ -257,6 +309,13 @@ LLSLURL::LLSLURL(const std::string& slurl)
else
mGrid = default_grid;
}
+ // places.inworldz.com isn't your regular everyday slurl
+ else if (slurl_uri.hostName() == LLSLURL::PLACES_INWORLDZ_COM)
+ {
+ // likewise, places.inworldz.com implies inworldz and a location
+ mGrid = INWORLDZ_URI;
+ mType = LOCATION;
+ }
else
{
LL_DEBUGS("SLURL") << "slurl style Standalone" << LL_ENDL;
@@ -330,14 +389,12 @@ LLSLURL::LLSLURL(const std::string& slurl)
path_array.erase(0);
// leave app appended.
}
-//
else if ( slurl_uri.scheme() == LLSLURL::HOP_SCHEME)
{
LL_DEBUGS("SLURL") << "It's a location hop" << LL_ENDL;
mType = LOCATION;
}
-//
- else
+ else if (slurl_uri.hostName() != LLSLURL::PLACES_INWORLDZ_COM)
{
LL_DEBUGS("SLURL") << "Not a valid https/http/x-grid-location-info slurl " << slurl << LL_ENDL;
// not a valid https/http/x-grid-location-info slurl, so it'll likely just be a URL
diff --git a/indra/newview/fsslurl.h b/indra/newview/fsslurl.h
index c2b9808819..ef19cda080 100644
--- a/indra/newview/fsslurl.h
+++ b/indra/newview/fsslurl.h
@@ -53,6 +53,11 @@ public:
static const char* SLURL_APP_PATH;
static const char* SLURL_REGION_PATH;
+ // Inworldz special
+ static const char* SLURL_INWORLDZ_SCHEME;
+ static const char* SLURL_IW_SCHEME;
+ static const char* PLACES_INWORLDZ_COM;
+
enum SLURL_TYPE
{
INVALID,
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 46ceef7a9d..4a2d824ada 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -98,14 +98,17 @@
#include "stringize.h"
#include "boost/foreach.hpp"
#include "llcorehttputil.h"
+// [RLVa:KB] - Checked: 2011-11-04 (RLVa-1.4.4a)
+#include "rlvactions.h"
+#include "rlvhandler.h"
+#include "rlvhelper.h"
+#include "rlvui.h"
+// [/RLVa:KB]
// Firestorm includes
#include "fslslbridge.h"
#include "kcwlinterface.h"
#include "llpresetsmanager.h"
-#include "rlvactions.h"
-#include "rlvhandler.h"
-#include "rlvhelper.h"
#include "NACLantispam.h"
using namespace LLAvatarAppearanceDefines;
@@ -216,7 +219,10 @@ private:
class LLTeleportRequestViaLocationLookAt : public LLTeleportRequestViaLocation
{
public:
- LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal);
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal, const LLVector3& look_at);
+// [/RLVa:KB]
+// LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal);
virtual ~LLTeleportRequestViaLocationLookAt();
virtual bool canRestartTeleport();
@@ -225,8 +231,14 @@ public:
virtual void restartTeleport();
protected:
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ const LLVector3& getLookAt() const { return mLookAt; }
+// [/RLVa:KB]
private:
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ LLVector3 mLookAt;
+// [/RLVa:KB]
};
@@ -2300,7 +2312,10 @@ std::ostream& operator<<(std::ostream &s, const LLAgent &agent)
//-----------------------------------------------------------------------------
BOOL LLAgent::needsRenderAvatar()
{
- if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
+// if (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson)
+// [RLVa:KB] - Checked: RLVa-2.0.2
+ if ( (gAgentCamera.cameraMouselook() && !LLVOAvatar::sVisibleInFirstPerson) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELF)) )
+// [/RLVa:KB]
{
return FALSE;
}
@@ -2311,7 +2326,10 @@ BOOL LLAgent::needsRenderAvatar()
// TRUE if we need to render your own avatar's head.
BOOL LLAgent::needsRenderHead()
{
- return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
+// [RLVa:KB] - Checked: RLVa-2.0.2
+ return ((LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELFHEAD));
+// [/RLVa:KB]
+// return (LLVOAvatar::sVisibleInFirstPerson && LLPipeline::sReflectionRender) || (mShowAvatar && !gAgentCamera.cameraMouselook());
}
//-----------------------------------------------------------------------------
@@ -2934,15 +2952,11 @@ void LLAgent::onAnimStop(const LLUUID& id)
}
else if (id == ANIM_AGENT_AWAY)
{
-// clearAFK();
// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Added: RLVa-1.1.0g
-#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
if (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE))
clearAFK();
-#else
- clearAFK();
-#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
+// clearAFK();
}
else if (id == ANIM_AGENT_STANDUP)
{
@@ -4627,10 +4641,13 @@ void LLAgent::handleTeleportFailed()
}
}
-void LLAgent::teleportRequest(
- const U64& region_handle,
- const LLVector3& pos_local,
- bool look_at_from_camera)
+//void LLAgent::teleportRequest(
+// const U64& region_handle,
+// const LLVector3& pos_local,
+// bool look_at_from_camera)
+// [RLVa:KB] - Checked: RLVa-2.0.0
+void LLAgent::teleportRequest(const U64& region_handle, const LLVector3& pos_local, const LLVector3& look_at)
+// [/RLVa:KB]
{
LLViewerRegion* regionp = getRegion();
bool is_local = (region_handle == regionp->getHandle());
@@ -4646,11 +4663,11 @@ void LLAgent::teleportRequest(
msg->nextBlockFast(_PREHASH_Info);
msg->addU64("RegionHandle", region_handle);
msg->addVector3("Position", pos_local);
- LLVector3 look_at(0,1,0);
- if (look_at_from_camera)
- {
- look_at = LLViewerCamera::getInstance()->getAtAxis();
- }
+// LLVector3 look_at(0,1,0);
+// if (look_at_from_camera)
+// {
+// look_at = LLViewerCamera::getInstance()->getAtAxis();
+// }
msg->addVector3("LookAt", look_at);
sendReliableMessage();
}
@@ -4763,13 +4780,10 @@ void LLAgent::restoreCanceledTeleportRequest()
void LLAgent::teleportViaLocation(const LLVector3d& pos_global)
{
-// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.2.0c) | Modified: RLVa-1.2.0a
- if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) )
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ if ( (RlvActions::isRlvEnabled()) && (!RlvUtil::isForceTp()) )
{
- // If we're getting teleported due to @tpto we should disregard any @tploc=n or @unsit=n restrictions from the same object
- if ( (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOC, gRlvHandler.getCurrentObject())) ||
- ( (isAgentAvatarValid()) && (gAgentAvatarp->isSitting()) &&
- (gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, gRlvHandler.getCurrentObject()))) )
+ if ( (RlvActions::isLocalTp(pos_global)) ? !RlvActions::canTeleportToLocal(pos_global) : !RlvActions::canTeleportToLocation() )
{
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
return;
@@ -4844,25 +4858,37 @@ void LLAgent::doTeleportViaLocation(const LLVector3d& pos_global)
}
// Teleport to global position, but keep facing in the same direction
-void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
+// [RLVa:KB] - Checked: RLVa-2.0.0
+void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at)
{
-// [RLVa:KB] - Checked: 2010-10-07 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
- // RELEASE-RLVa: [SL-2.2.0] Make sure this isn't used for anything except double-click teleporting
- if ( (rlv_handler_t::isEnabled()) && (!RlvUtil::isForceTp()) &&
- ((gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) || (!RlvActions::canStand())) )
+ if ( (RlvActions::isRlvEnabled()) && (!RlvUtil::isForceTp()) )
{
- RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
- return;
- }
-// [/RLVa:KB]
+ if ( (RlvActions::isLocalTp(pos_global)) ? !RlvActions::canTeleportToLocal(pos_global) : !RlvActions::canTeleportToLocation() )
+ {
+ RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT);
+ return;
+ }
- mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global));
+ if ( (gRlvHandler.getCurrentCommand()) && (RLV_BHVR_TPTO == gRlvHandler.getCurrentCommand()->getBehaviourType()) )
+ {
+ gRlvHandler.setCanCancelTp(false);
+ }
+ }
+
+ mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global, (look_at.isExactlyZero()) ? LLViewerCamera::getInstance()->getAtAxis() : look_at));
startTeleportRequest();
}
+// [/RLVa:KB]
+//void LLAgent::teleportViaLocationLookAt(const LLVector3d& pos_global)
+//{
+// mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLocationLookAt(pos_global));
+// startTeleportRequest();
+//}
-void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
+// [RLVa:KB] - Checked: RLVa-2.0.0
+void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at)
{
- mbTeleportKeepsLookAt = true;
+ mbTeleportKeepsLookAt = look_at.isExactlyZero();
if(!gAgentCamera.isfollowCamLocked())
{
@@ -4878,7 +4904,7 @@ void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global)
}
//
LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle));
- teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
+ teleportRequest(region_handle, pos_local, look_at);
// Client LSL Bridge
if (FSLSLBridge::instance().canUseBridge())
@@ -4896,6 +4922,21 @@ LLAgent::ETeleportState LLAgent::getTeleportState() const
return (mTeleportRequest && (mTeleportRequest->getStatus() == LLTeleportRequest::kFailed)) ?
TELEPORT_NONE : mTeleportState;
}
+// [/RLVa:KB]
+//void LLAgent::doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at)
+//{
+// mbTeleportKeepsLookAt = true;
+//
+// if(!gAgentCamera.isfollowCamLocked())
+// {
+// gAgentCamera.setFocusOnAvatar(FALSE, ANIMATE); // detach camera form avatar, so it keeps direction
+// }
+//
+// U64 region_handle = to_region_handle(pos_global);
+// LLVector3 pos_local = (LLVector3)(pos_global - from_region_handle(region_handle));
+// teleportRequest(region_handle, pos_local, look_at);
+// teleportRequest(region_handle, pos_local, getTeleportKeepsLookAt());
+//}
void LLAgent::setTeleportState(ETeleportState state)
@@ -5402,11 +5443,18 @@ void LLTeleportRequestViaLocation::restartTeleport()
// LLTeleportRequestViaLocationLookAt
//-----------------------------------------------------------------------------
-LLTeleportRequestViaLocationLookAt::LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal)
- : LLTeleportRequestViaLocation(pPosGlobal)
+// [RLVa:KB] - Checked: RLVa-2.0.0
+LLTeleportRequestViaLocationLookAt::LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal, const LLVector3& look_at)
+ : LLTeleportRequestViaLocation(pPosGlobal), mLookAt(look_at)
{
LL_INFOS("Teleport") << "LLTeleportRequestViaLocationLookAt created" << LL_ENDL;
}
+// [/RLVa:KB]
+
+//LLTeleportRequestViaLocationLookAt::LLTeleportRequestViaLocationLookAt(const LLVector3d &pPosGlobal)
+// : LLTeleportRequestViaLocation(pPosGlobal)
+//{
+//}
LLTeleportRequestViaLocationLookAt::~LLTeleportRequestViaLocationLookAt()
{
@@ -5422,13 +5470,19 @@ bool LLTeleportRequestViaLocationLookAt::canRestartTeleport()
void LLTeleportRequestViaLocationLookAt::startTeleport()
{
LL_INFOS("Teleport") << "LLTeleportRequestViaLocationLookAt::startTeleport" << LL_ENDL;
- gAgent.doTeleportViaLocationLookAt(getPosGlobal());
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ gAgent.doTeleportViaLocationLookAt(getPosGlobal(), getLookAt());
+// [/RLVa:KB]
+// gAgent.doTeleportViaLocationLookAt(getPosGlobal());
}
void LLTeleportRequestViaLocationLookAt::restartTeleport()
{
LL_INFOS("Teleport") << "LLTeleportRequestViaLocationLookAt::restartTeleport" << LL_ENDL;
- gAgent.doTeleportViaLocationLookAt(getPosGlobal());
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ gAgent.doTeleportViaLocationLookAt(getPosGlobal(), getLookAt());
+// [/RLVa:KB]
+// gAgent.doTeleportViaLocationLookAt(getPosGlobal());
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index d557a251f2..c24f844dac 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -721,7 +721,10 @@ public:
void teleportHome() { teleportViaLandmark(LLUUID::null); } // Go home
void teleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
void teleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
- void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ void teleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at = LLVector3::zero);// To a global location, preserving camera rotation
+// [/RLVa:KB]
+// void teleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
void teleportCancel(); // May or may not be allowed by server
void restoreCanceledTeleportRequest();
bool getTeleportKeepsLookAt() { return mbTeleportKeepsLookAt; } // Whether look-at reset after teleport
@@ -765,13 +768,19 @@ private:
bool hasPendingTeleportRequest();
void startTeleportRequest();
- void teleportRequest(const U64& region_handle,
- const LLVector3& pos_local, // Go to a named location home
- bool look_at_from_camera = false);
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ void teleportRequest(const U64& region_handle, const LLVector3& pos_local, const LLVector3& look_at = LLVector3(0, 1, 0));
+// [/RLVa:KB]
+// void teleportRequest(const U64& region_handle,
+// const LLVector3& pos_local, // Go to a named location home
+// bool look_at_from_camera = false);
void doTeleportViaLandmark(const LLUUID& landmark_id); // Teleport to a landmark
void doTeleportViaLure(const LLUUID& lure_id, BOOL godlike); // To an invited location
void doTeleportViaLocation(const LLVector3d& pos_global); // To a global location - this will probably need to be deprecated
- void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ void doTeleportViaLocationLookAt(const LLVector3d& pos_global, const LLVector3& look_at);// To a global location, preserving camera rotation
+// [/RLVa:KB]
+// void doTeleportViaLocationLookAt(const LLVector3d& pos_global);// To a global location, preserving camera rotation
void handleTeleportFinished();
void handleTeleportFailed();
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 1d29bf4b9e..a6b4c6cd92 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -217,10 +217,18 @@ void LLAgentCamera::init()
mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("CameraOffsetRearView");
mCameraOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("CameraOffsetFrontView");
mCameraOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("CameraOffsetGroupView");
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ mCameraOffsetInitial[CAMERA_RLV_SETCAM_VIEW] = gSavedSettings.declareVec3("CameraOffsetRLVaView", LLVector3(mCameraOffsetInitial[CAMERA_PRESET_REAR_VIEW]->getDefault()), "Declared in code", LLControlVariable::PERSIST_NO);
+ mCameraOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->setHiddenFromSettingsEditor(true);
+// [/RLVa:KB]
mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW] = gSavedSettings.getControl("FocusOffsetRearView");
mFocusOffsetInitial[CAMERA_PRESET_FRONT_VIEW] = gSavedSettings.getControl("FocusOffsetFrontView");
mFocusOffsetInitial[CAMERA_PRESET_GROUP_VIEW] = gSavedSettings.getControl("FocusOffsetGroupView");
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ mFocusOffsetInitial[CAMERA_RLV_SETCAM_VIEW] = gSavedSettings.declareVec3("FocusOffsetRLVaView", LLVector3(mFocusOffsetInitial[CAMERA_PRESET_REAR_VIEW]->getDefault()), "Declared in code", LLControlVariable::PERSIST_NO);
+ mFocusOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->setHiddenFromSettingsEditor(true);
+// [/RLVa:KB]
mCameraCollidePlane.clearVec();
mCurrentCameraDistance = getCameraOffsetInitial().magVec() * gSavedSettings.getF32("CameraOffsetScale");
@@ -830,7 +838,13 @@ void LLAgentCamera::setCameraZoomFraction(F32 fraction)
LLVector3d camera_offset_dir = mCameraFocusOffsetTarget;
camera_offset_dir.normalize();
- mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom);
+// [RLVa:KB] - Checked: 2.0.0
+ const LLVector3d focus_offset_target = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom);
+ if ( (RlvActions::isRlvEnabled()) && (!allowFocusOffsetChange(focus_offset_target)) )
+ return;
+ mCameraFocusOffsetTarget = focus_offset_target;
+// [/RLVa:KB]
+// mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom);
}
startCameraAnimation();
}
@@ -962,6 +976,11 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
}
+// [RLVa:KB] - Checked: 2.0.0
+ if ( (RlvActions::isRlvEnabled()) && (!allowFocusOffsetChange(new_distance * camera_offset_unit)) )
+ return;
+// [/RLVa:KB]
+
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
}
@@ -1033,6 +1052,11 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
new_distance = llclamp( new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM );
}
+// [RLVa:KB] - Checked: 2.0.0
+ if ( (RlvActions::isRlvEnabled()) && (!allowFocusOffsetChange(new_distance * camera_offset_unit)) )
+ return;
+// [/RLVa:KB]
+
// Compute new camera offset
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
cameraZoomIn(1.f);
@@ -1177,6 +1201,14 @@ void LLAgentCamera::updateCamera()
mCameraUpVector = LLVector3::z_axis;
//LLVector3 camera_skyward(0.f, 0.f, 1.f);
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ // Set focus back on our avie if something changed it
+ if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_UNLOCK)) && (cameraThirdPerson()) && (!getFocusOnAvatar()) )
+ {
+ setFocusOnAvatar(TRUE, FALSE);
+ }
+// [/RLVa:KB]
+
U32 camera_mode = mCameraAnimating ? mLastCameraMode : mCameraMode;
validateFocusObject();
@@ -1957,6 +1989,44 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
// }
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ if ( (CAMERA_MODE_THIRD_PERSON == mCameraMode) && (RlvActions::isRlvEnabled()) && (RlvActions::isCameraDistanceClamped()) )
+ {
+ m_fRlvMinDist = m_fRlvMaxDist = false;
+
+ // Av-locked | Focus-locked | Result
+ // ===================================================
+ // T | T | skip focus => slam av
+ // T | F | skip focus => slam av
+ // F | T | skip av => slam focus
+ // F | F | clamp focus then av
+ bool fCamAvDistClamped, fCamAvDistLocked = false; float nCamAvDistLimitMin, nCamAvDistLimitMax;
+ if (fCamAvDistClamped = RlvActions::getCameraAvatarDistanceLimits(nCamAvDistLimitMin, nCamAvDistLimitMax))
+ fCamAvDistLocked = nCamAvDistLimitMin == nCamAvDistLimitMax;
+ bool fCamOriginDistClamped, fCamOriginDistLocked = false; float nCamOriginDistLimitMin, nCamOriginDistLimitMax;
+ if (fCamOriginDistClamped = RlvActions::getCameraOriginDistanceLimits(nCamOriginDistLimitMin, nCamOriginDistLimitMax))
+ fCamOriginDistLocked = nCamOriginDistLimitMin == nCamOriginDistLimitMax;
+
+ // Check focus distance limits
+ if ( (fCamOriginDistClamped) && (!fCamAvDistLocked) )
+ {
+ const LLVector3 offsetCameraLocal = mCameraZoomFraction * getCameraOffsetInitial() * gSavedSettings.getF32("CameraOffsetScale");
+ const LLVector3d offsetCamera(gAgent.getFrameAgent().rotateToAbsolute(offsetCameraLocal));
+ const LLVector3d posFocusCam = frame_center_global + head_offset + offsetCamera;
+ if (clampCameraPosition(camera_position_global, posFocusCam, nCamOriginDistLimitMin, nCamOriginDistLimitMax))
+ isConstrained = TRUE;
+ }
+
+ // Check avatar distance limits
+ if ( (fCamAvDistClamped) && (fCamAvDistLocked || !fCamOriginDistClamped) )
+ {
+ const LLVector3d posAvatarCam = gAgent.getPosGlobalFromAgent( (isAgentAvatarValid()) ? gAgentAvatarp->mHeadp->getWorldPosition() : gAgent.getPositionAgent() );
+ if (clampCameraPosition(camera_position_global, posAvatarCam, nCamAvDistLimitMin, nCamAvDistLimitMax))
+ isConstrained = TRUE;
+ }
+ }
+// [/RLVa:KB]
+
// Don't let camera go underground
F32 camera_min_off_ground = getCameraMinOffGround();
@@ -1977,6 +2047,49 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(BOOL *hit_limit)
return camera_position_global;
}
+// [RLVa:KB] - Checked: RLVa-2.0.0
+bool LLAgentCamera::allowFocusOffsetChange(const LLVector3d& offsetFocus)
+{
+ if (RlvActions::isCameraDistanceClamped())
+ {
+ if ( (CAMERA_MODE_THIRD_PERSON == getCameraMode()) && ((m_fRlvMinDist) || (m_fRlvMaxDist)) )
+ {
+ const LLVector3d posFocusGlobal = calcFocusPositionTargetGlobal();
+ // Don't allow moving the focus offset if at minimum and moving closer (or if at maximum and moving further) to prevent camera warping
+ F32 nCurDist = llabs((posFocusGlobal + mCameraFocusOffsetTarget - m_posRlvRefGlobal).magVec());
+ F32 nNewDist = llabs((posFocusGlobal + offsetFocus - m_posRlvRefGlobal).magVec());
+ if ( ((m_fRlvMaxDist) && (nNewDist > nCurDist)) || ((m_fRlvMinDist) && (nNewDist < nCurDist)) )
+ return false;
+ }
+ }
+ return true;
+}
+
+bool LLAgentCamera::clampCameraPosition(LLVector3d& posCamGlobal, const LLVector3d posCamRefGlobal, float nDistMin, float nDistMax)
+{
+ const LLVector3d offsetCamera = posCamGlobal - posCamRefGlobal;
+
+ F32 nCamAvDist = llabs(offsetCamera.magVec()), nDistMult = NAN;
+ if (nCamAvDist > nDistMax)
+ {
+ nDistMult = nDistMax / nCamAvDist;
+ m_fRlvMaxDist = true;
+ }
+ else if (nCamAvDist < nDistMin)
+ {
+ nDistMult = nDistMin / nCamAvDist;
+ m_fRlvMinDist = true;
+ }
+
+ if (!isnan(nDistMult))
+ {
+ posCamGlobal = posCamRefGlobal + nDistMult * offsetCamera;
+ m_posRlvRefGlobal = posCamRefGlobal;
+ return true;
+ }
+ return false;
+}
+// [/RLVa:KB]
LLVector3 LLAgentCamera::getCameraOffsetInitial()
{
@@ -2110,6 +2223,10 @@ void LLAgentCamera::resetCamera()
void LLAgentCamera::changeCameraToMouselook(BOOL animate)
{
if (!gSavedSettings.getBOOL("EnableMouselook")
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ || ( (RlvActions::isRlvEnabled()) && (!RlvActions::canChangeToMouselook()) )
+// [/RLVa:KB]
+
|| LLViewerJoystick::getInstance()->getOverrideCamera())
{
return;
@@ -2404,6 +2521,26 @@ void LLAgentCamera::changeCameraToCustomizeAvatar()
void LLAgentCamera::switchCameraPreset(ECameraPreset preset)
{
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ if (RlvActions::isRlvEnabled())
+ {
+ // Don't allow changing away from the our view if an object is restricting it
+ if (RlvActions::isCameraPresetLocked())
+ preset = CAMERA_RLV_SETCAM_VIEW;
+
+ // Don't reset anything if our view is already current
+ if ( (CAMERA_RLV_SETCAM_VIEW == preset) && (CAMERA_RLV_SETCAM_VIEW == mCameraPreset) )
+ return;
+
+ // Reset our view when switching away
+ if (CAMERA_RLV_SETCAM_VIEW != preset)
+ {
+ mCameraOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->resetToDefault();
+ mFocusOffsetInitial[CAMERA_RLV_SETCAM_VIEW]->resetToDefault();
+ }
+ }
+// [/RLVa:KB]
+
//zoom is supposed to be reset for the front and group views
mCameraZoomFraction = 1.f;
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index 92178c70a5..98296e8a8a 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -56,7 +56,12 @@ enum ECameraPreset
CAMERA_PRESET_FRONT_VIEW,
/** "Above and to the left, over the shoulder, pulled back a little on the zoom" */
- CAMERA_PRESET_GROUP_VIEW
+ CAMERA_PRESET_GROUP_VIEW,
+
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ /* Used by RLVa */
+ CAMERA_RLV_SETCAM_VIEW
+// [/RLVa:KB]
};
//------------------------------------------------------------------------
@@ -305,6 +310,18 @@ public:
F32 mHUDTargetZoom; // Target zoom level for HUD objects (used when editing)
F32 mHUDCurZoom; // Current animated zoom level for HUD objects
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ //--------------------------------------------------------------------
+ // RLVa
+ //--------------------------------------------------------------------
+protected:
+ bool allowFocusOffsetChange(const LLVector3d& offsetFocus);
+ bool clampCameraPosition(LLVector3d& posCamGlobal, const LLVector3d posCamRefGlobal, float nDistMin, float nDistMax);
+
+ bool m_fRlvMaxDist; // True if the camera is at max distance
+ bool m_fRlvMinDist; // True if the camera is at min distance
+ LLVector3d m_posRlvRefGlobal; // Current reference point for distance calculations
+// [/RLVa:KB]
/********************************************************************************
** **
diff --git a/indra/newview/llagentlistener.cpp b/indra/newview/llagentlistener.cpp
index ff3d4e6ce2..85bae5cd75 100644
--- a/indra/newview/llagentlistener.cpp
+++ b/indra/newview/llagentlistener.cpp
@@ -186,7 +186,7 @@ void LLAgentListener::requestSit(LLSD const & event_data) const
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.1.0j
// TODO-RLVa: [RLVa-1.2.1] Figure out how to call this?
- if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canSit(object)) )
+ if ( (rlv_handler_t::isEnabled()) && (!RlvActions::canSit(object)) )
{
return;
}
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm
index c0a89bc0a4..b2ed17364c 100644
--- a/indra/newview/llappdelegate-objc.mm
+++ b/indra/newview/llappdelegate-objc.mm
@@ -109,7 +109,9 @@
callWindowUnhide();
}
-- (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender
+// This got changed at some point in the SDK.
+//- (NSApplicationDelegateReply) applicationShouldTerminate:(NSApplication *)sender
+- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender
{
if (!runMainLoop())
{
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index f6274acc30..3c2a92a6ea 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -59,6 +59,7 @@
#include "llappviewer.h"
#include "llcoros.h"
#include "lleventcoro.h"
+#include "llavatarpropertiesprocessor.h"
#include "llavatarpropertiesprocessor.h"
@@ -67,6 +68,7 @@
#include "rlvhelper.h"
#include "rlvlocks.h"
// [/RLVa:KB]
+
#include "fslslbridge.h"
#if LL_MSVC
@@ -1323,23 +1325,19 @@ static void removeDuplicateItems(LLInventoryModel::item_array_t& items)
// [SL:KB] - Patch: Appearance-WearableDuplicateAssets | Checked: 2015-06-30 (Catznip-3.7)
static void removeDuplicateWearableItemsByAssetID(LLInventoryModel::item_array_t& items)
{
- struct is_duplicate_asset
- {
- bool operator()(const LLViewerInventoryItem* pItem)
+ std::set idsAsset;
+ items.erase(std::remove_if(items.begin(), items.end(),
+ [&idsAsset](const LLViewerInventoryItem* pItem)
{
if (pItem->isWearableType())
{
const LLUUID& idAsset = pItem->getAssetUUID();
- if ( (idAsset.notNull()) && (m_idsAsset.end() != m_idsAsset.find(idAsset)) )
+ if ( (idAsset.notNull()) && (idsAsset.end() != idsAsset.find(idAsset)) )
return true;
- m_idsAsset.insert(idAsset);
+ idsAsset.insert(idAsset);
}
return false;
- }
- protected:
- std::set m_idsAsset;
- };
- items.erase(std::remove_if(items.begin(), items.end(), is_duplicate_asset()), items.end());
+ }), items.end());
}
// [/SL:KB]
@@ -2083,6 +2081,8 @@ void LLAppearanceMgr::filterWearableItems(
}
}
+//void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
+// [RLVa:KB] - Checked: 2010-03-05 (RLVa-1.2.0)
void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
{
LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
@@ -2617,9 +2617,8 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool enforce_item_restrictions,
std::set pendingAttachments;
if (LLAttachmentsMgr::instance().getPendingAttachments(pendingAttachments))
{
- for (std::set::const_iterator itAttachItem = pendingAttachments.begin(); itAttachItem != pendingAttachments.end(); ++itAttachItem)
+ for (const LLUUID& idAttachItem : pendingAttachments)
{
- const LLUUID& idAttachItem = *itAttachItem;
if ( (!gAgentAvatarp->isWearingAttachment(idAttachItem)) || (isLinkedInCOF(idAttachItem)) )
{
LLAttachmentsMgr::instance().clearPendingAttachmentLink(idAttachItem);
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index c24ef03c88..46ebcf89a4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -95,9 +95,8 @@
// [SL:KB] - Patch: Appearance-Misc | Checked: 2013-02-12 (Catznip-3.4)
#include "llappearancemgr.h"
// [/SL:KB]
-// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.4.0)
+// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g)
#include "rlvactions.h"
-#include "rlvhelper.h"
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -543,17 +542,13 @@ void idle_afk_check()
{
// check idle timers
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
-// F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
-// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
-#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
- // Enforce an idle time of 30 minutes if @allowidle=n restricted
// Cache frequently hit location
static LLCachedControl sAFKTimeout(gSavedSettings, "AFKTimeout");
+// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
+ // Enforce an idle time of 30 minutes if @allowidle=n restricted
S32 afk_timeout = (!gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) ? sAFKTimeout : 60 * 30;
-#else
- static LLCachedControl afk_timeout(gSavedSettings, "AFKTimeout"); //
-#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
+// F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
// Explicit conversions just cos.
//if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
if (static_cast(afk_timeout) && (current_idle > static_cast(afk_timeout)) && ! gAgent.getAFK())
@@ -3903,16 +3898,28 @@ LLSD LLAppViewer::getViewerInfo() const
LLViewerRegion* region = gAgent.getRegion();
if (region)
{
- LLVector3d pos = gAgent.getPositionGlobal();
- info["POSITION"] = ll_sd_from_vector3d(pos);
- info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
- info["REGION"] = gAgent.getRegion()->getName();
- info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
- info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
+// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
+ if (RlvActions::canShowLocation())
+ {
+// [/RLVa:KB]
+ LLVector3d pos = gAgent.getPositionGlobal();
+ info["POSITION"] = ll_sd_from_vector3d(pos);
+ info["POSITION_LOCAL"] = ll_sd_from_vector3(gAgent.getPosAgentFromGlobal(pos));
+ info["REGION"] = gAgent.getRegion()->getName();
+ info["HOSTNAME"] = gAgent.getRegion()->getHost().getHostName();
+ info["HOSTIP"] = gAgent.getRegion()->getHost().getString();
+// info["SERVER_VERSION"] = gLastVersionChannel;
+ LLSLURL slurl;
+ LLAgentUI::buildSLURL(slurl);
+ info["SLURL"] = slurl.getSLURLString();
+// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
+ }
+ else
+ {
+ info["REGION"] = RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
+ }
info["SERVER_VERSION"] = gLastVersionChannel;
- LLSLURL slurl;
- LLAgentUI::buildSLURL(slurl);
- info["SLURL"] = slurl.getSLURLString();
+// [/RLVa:KB]
}
// CPU
@@ -3932,7 +3939,7 @@ LLSD LLAppViewer::getViewerInfo() const
#endif
// [RLVa:KB] - Checked: 2010-04-18 (RLVa-1.2.0)
- info["RLV_VERSION"] = (RlvActions::isRlvEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)";
+ info["RLV_VERSION"] = (rlv_handler_t::isEnabled()) ? RlvStrings::getVersionAbout() : "(disabled)";
// [/RLVa:KB]
info["OPENGL_VERSION"] = (const char*)(glGetString(GL_VERSION));
info["LIBCURL_VERSION"] = LLCore::LLHttp::getCURLVersion();
@@ -4114,13 +4121,9 @@ std::string LLAppViewer::getViewerInfoString() const
if (info.has("REGION"))
{
// [RLVa:KB] - Checked: 2014-02-24 (RLVa-1.4.10)
- support << "\n\n";
- if (RlvActions::canShowLocation())
- support << LLTrans::getString("AboutPosition", args);
- else
- support << RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
+ support << "\n\n" << LLTrans::getString( (RlvActions::canShowLocation()) ? "AboutPosition" : "AboutPositionRLVShowLoc", args);
// [/RLVa:KB]
- //support << "\n\n" << LLTrans::getString("AboutPosition", args);
+// support << "\n\n" << LLTrans::getString("AboutPosition", args);
}
support << "\n\n" << LLTrans::getString("AboutSystem", args);
support << "\n";
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp
index 8b4078488a..1a3da9c092 100644
--- a/indra/newview/llappviewermacosx.cpp
+++ b/indra/newview/llappviewermacosx.cpp
@@ -297,7 +297,7 @@ void LLAppViewerMacOSX::initCrashReporting(bool reportFreeze)
std::string appname = gDirUtilp->getExecutableFilename();
std::string str[] = { "-pid", pid_str.str(), "-dumpdir", logdir, "-procname", appname.c_str() };
std::vector< std::string > args( str, str + ( sizeof ( str ) / sizeof ( std::string ) ) );
- LL_WARNS() << "about to launch mac-crash-logger" << pid_str << " " << logdir << " " << appname << LL_ENDL;
+ LL_WARNS() << "about to launch mac-crash-logger" << pid_str.str() << " " << logdir << " " << appname << LL_ENDL;
launchApplication(&command_str, &args);
}
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 1d3de0d2e2..4113bfaa4b 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -74,6 +74,11 @@
#include "llsidepanelinventory.h"
#include "llavatarname.h"
#include "llagentui.h"
+// [RLVa:KB] - Checked: 2011-04-11 (RLVa-1.3.0)
+#include "rlvactions.h"
+#include "rlvcommon.h"
+#include "rlvhandler.h"
+// [/RLVa:KB]
// Firestorm includes
#include "fsfloaterim.h"
@@ -91,9 +96,6 @@
#include "llviewerparcelmgr.h"
#include "llviewerwindow.h" // For opening logs externally
#include "llworld.h"
-#include "rlvactions.h"
-#include "rlvcommon.h"
-#include "rlvhandler.h"
// Flags for kick message
const U32 KICK_FLAGS_DEFAULT = 0x0;
@@ -243,7 +245,7 @@ void LLAvatarActions::startIM(const LLUUID& id)
return;
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
- if ( (!RlvActions::canStartIM(id)) && (!RlvActions::hasOpenP2PSession(id)) )
+ if (!RlvActions::canStartIM(id))
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString()));
@@ -288,7 +290,7 @@ void LLAvatarActions::startCall(const LLUUID& id)
}
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
- if ( (!RlvActions::canStartIM(id)) && (!RlvActions::hasOpenP2PSession(id)) )
+ if (!RlvActions::canStartIM(id))
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("agent", id, "completename").getSLURLString()));
@@ -556,6 +558,17 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
{
LLMessageSystem* msg = gMessageSystem;
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ const LLUUID idRecipient = notification["substitutions"]["uuid"];
+ std::string strMessage = response["message"];
+
+ // Filter the request message if the recipients is IM-blocked
+ if ( (!RlvActions::isRlvEnabled()) || ((RlvActions::canStartIM(idRecipient)) && (RlvActions::canSendIM(idRecipient))) )
+ {
+ strMessage = RlvStrings::getString(RLV_STRING_HIDDEN);
+ }
+// [/RLVa:KB]
+
msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
@@ -573,7 +586,10 @@ void LLAvatarActions::teleport_request_callback(const LLSD& notification, const
LLAgentUI::buildFullname(name);
msg->addStringFast(_PREHASH_FromAgentName, name);
- msg->addStringFast(_PREHASH_Message, response["message"]);
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ msg->addStringFast(_PREHASH_Message, strMessage);
+// [/RLVa:KB]
+// msg->addStringFast(_PREHASH_Message, response["message"]);
msg->addU32Fast(_PREHASH_ParentEstateID, 0);
msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
@@ -601,14 +617,17 @@ void LLAvatarActions::teleportRequest(const LLUUID& id)
LLSD notification;
notification["uuid"] = id;
- LLAvatarName av_name;
- if (!LLAvatarNameCache::get(id, &av_name))
- {
- // unlikely ... they just picked this name from somewhere...
- LLAvatarNameCache::get(id, boost::bind(&LLAvatarActions::teleportRequest, id));
- return; // reinvoke this when the name resolves
- }
- notification["NAME"] = av_name.getCompleteName();
+// [RLVa:KB] - Checked: RLVa-1.5.0
+ notification["NAME"] = LLSLURL("agent", id, (RlvActions::canShowName(RlvActions::SNC_TELEPORTREQUEST, id)) ? "completename" : "rlvanonym").getSLURLString();
+// [/RLVa:KB]
+// LLAvatarName av_name;
+// if (!LLAvatarNameCache::get(id, &av_name))
+// {
+// // unlikely ... they just picked this name from somewhere...
+// LLAvatarNameCache::get(id, boost::bind(&LLAvatarActions::teleportRequest, id));
+// return; // reinvoke this when the name resolves
+// }
+// notification["NAME"] = av_name.getCompleteName();
LLSD payload;
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 5ed7f84f20..4a7cdb4f1a 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -49,8 +49,8 @@
#include "lltooldraganddrop.h"
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a)
#include "rlvhandler.h"
+#include "rlvactions.h"
// [/RLVa:KB]
-
static LLDefaultChildRegistry::Register r("avatar_list");
// Last interaction time update period.
@@ -186,7 +186,7 @@ LLAvatarList::LLAvatarList(const Params& p)
, mShowSpeakingIndicator(p.show_speaking_indicator)
, mShowPermissions(p.show_permissions_granted)
, mShowCompleteName(false)
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
, mRlvCheckShowNames(false)
// [/RLVa:KB]
, mShowVoiceVolume(p.show_voice_volume)
@@ -400,7 +400,7 @@ void LLAvatarList::refresh()
// FIRE-12750: Name filter not working correctly
//if (!have_filter || findInsensitive(getAvatarName(av_name), mNameFilter))
- if (!have_filter || findInsensitive(getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
+ if (!have_filter || findInsensitive(getNameForDisplay(buddy_id, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
//
{
if (nadded >= ADD_LIMIT)
@@ -456,7 +456,7 @@ void LLAvatarList::refresh()
have_names &= LLAvatarNameCache::get(buddy_id, &av_name);
// FIRE-12750: Name filter not working correctly
//if (!findInsensitive(getAvatarName(av_name), mNameFilter))
- if (!findInsensitive(getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
+ if (!findInsensitive(getNameForDisplay(buddy_id, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
//
{
removeItemByUUID(buddy_id);
@@ -533,7 +533,7 @@ bool LLAvatarList::filterHasMatches()
// FIRE-12750: Name filter not working correctly
//if (have_name && !findInsensitive(getAvatarName(av_name), mNameFilter))
- if (have_name && !findInsensitive(getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
+ if (have_name && !findInsensitive(getNameForDisplay(buddy_id, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames), mNameFilter))
//
{
continue;
@@ -589,7 +589,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is
{
LLAvatarListItem* item = new LLAvatarListItem();
item->setShowCompleteName(mShowCompleteName);
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
item->setRlvCheckShowNames(mRlvCheckShowNames);
// [/RLVa:KB]
@@ -618,7 +618,7 @@ BOOL LLAvatarList::handleRightMouseDown(S32 x, S32 y, MASK mask)
BOOL handled = LLUICtrl::handleRightMouseDown(x, y, mask);
// if ( mContextMenu && !isAvalineItemSelected())
// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.2a) | Modified: RLVa-1.2.0d
- if ( (mContextMenu && !isAvalineItemSelected()) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) )
+ if ( (mContextMenu && !isAvalineItemSelected()) && ((!mRlvCheckShowNames) || (!RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMES))) )
// [/RLVa:KB]
{
uuid_vec_t selected_uuids;
@@ -743,27 +743,27 @@ void LLAvatarList::onItemDoubleClicked(LLUICtrl* ctrl, S32 x, S32 y, MASK mask)
{
// mItemDoubleClickSignal(ctrl, x, y, mask);
// [RLVa:KB] - Checked: 2010-06-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
- if ( (!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
+ if ( (!mRlvCheckShowNames) || (!RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMES)) )
mItemDoubleClickSignal(ctrl, x, y, mask);
// [/RLVa:KB]
}
// FIRE-12750: Name filter not working correctly
// static
-std::string LLAvatarList::getNameForDisplay(const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames)
+std::string LLAvatarList::getNameForDisplay(const LLUUID& avatar_id, const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames)
{
- bool fRlvFilter = (rlv_check_shownames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+ bool fRlvCanShowName = (!rlv_check_shownames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar_id));
if (show_displayname && !show_username)
{
- return ( (!fRlvFilter) ? av_name.getDisplayName() : RlvStrings::getAnonym(av_name) );
+ return ( (fRlvCanShowName) ? av_name.getDisplayName() : RlvStrings::getAnonym(av_name) );
}
else if (!show_displayname && show_username)
{
- return ( (!fRlvFilter) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
+ return ( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
}
- else
+ else
{
- return ( (!fRlvFilter) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
+ return ( (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
}
}
//
diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h
index 3a16c40bab..2bbf5a1d86 100644
--- a/indra/newview/llavatarlist.h
+++ b/indra/newview/llavatarlist.h
@@ -103,7 +103,7 @@ public:
// Return true if filter has at least one match.
bool filterHasMatches();
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
void setRlvCheckShowNames(bool fRlvCheckShowNames) { mRlvCheckShowNames = fRlvCheckShowNames; }
// We need this to be public since we call it from RlvUIEnabler::onToggleShowNames()
void updateAvatarNames();
@@ -114,7 +114,7 @@ public:
// [/FS:CR]
// FIRE-12750: Name filter not working correctly
- static std::string getNameForDisplay(const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames);
+ static std::string getNameForDisplay(const LLUUID& avatar_id, const LLAvatarName& av_name, bool show_displayname, bool show_username, bool rlv_check_shownames);
boost::signals2::connection setRefreshCompleteCallback(const commit_signal_t::slot_type& cb);
@@ -155,7 +155,7 @@ private:
bool mShowSpeakingIndicator;
bool mShowPermissions;
bool mShowCompleteName;
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - RLVa-1.2.0
bool mRlvCheckShowNames;
// [/RLVa:KB]
bool mShowDisplayName;
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 0b5c017a9e..bc0813c34a 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -42,8 +42,9 @@
#include "llavatariconctrl.h"
#include "lloutputmonitorctrl.h"
#include "lltooldraganddrop.h"
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
+#include "rlvcommon.h"
// [/RLVa:KB]
#include
#include "llnotificationsutil.h"
@@ -87,7 +88,7 @@ LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
mOnlineStatus(E_UNKNOWN),
mShowInfoBtn(true),
mShowProfileBtn(true),
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
mRlvCheckShowNames(false),
// [/RLVa:KB]
mShowPermissions(false),
@@ -234,9 +235,10 @@ void LLAvatarListItem::onMouseEnter(S32 x, S32 y, MASK mask)
// , removed on-hover visibility. Don't do this. instead flip info buttons on full-time in postbuild.
// mInfoBtn->setVisible(mShowInfoBtn);
// mProfileBtn->setVisible(mShowProfileBtn);
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
- //mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
- //mProfileBtn->setVisible( (mShowProfileBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ //bool fRlvCanShowName = (!mRlvCheckShowNames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mAvatarId));
+ //mInfoBtn->setVisible( (mShowInfoBtn) && (fRlvCanShowName) );
+ //mProfileBtn->setVisible( (mShowProfileBtn) && (fRlvCanShowName) );
// [/RLVa:KB]
mHovered = true;
@@ -424,13 +426,13 @@ void LLAvatarListItem::setLastInteractionTime(U32 secs_since)
void LLAvatarListItem::setShowInfoBtn(bool show)
{
mShowInfoBtn = show;
- mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
+ mInfoBtn->setVisible( (mShowInfoBtn) && ((!mRlvCheckShowNames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mAvatarId))) );
}
void LLAvatarListItem::setShowVoiceVolume(bool show)
{
mShowVoiceVolume = show;
- mVoiceSlider->setVisible( (mShowVoiceVolume) && ((!mRlvCheckShowNames) || (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))) );
+ mVoiceSlider->setVisible( (mShowVoiceVolume) && ((!mRlvCheckShowNames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mAvatarId))) );
if (show)
{
updateVoiceLevelSlider();
@@ -511,7 +513,7 @@ void LLAvatarListItem::onProfileBtnClick()
BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// if(mInfoBtn->getRect().pointInRect(x, y))
-// [SL:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
+// [RVLa:KB] - Checked: RLVa-1.2.2
if ( (mInfoBtn->getVisible()) && (mInfoBtn->getEnabled()) && (mInfoBtn->getRect().pointInRect(x, y)) )
// [/SL:KB]
{
@@ -519,7 +521,7 @@ BOOL LLAvatarListItem::handleDoubleClick(S32 x, S32 y, MASK mask)
return TRUE;
}
// if(mProfileBtn->getRect().pointInRect(x, y))
-// [SL:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
if ( (mProfileBtn->getVisible()) && (mProfileBtn->getEnabled()) && (mProfileBtn->getRect().pointInRect(x, y)) )
// [/SL:KB]
{
@@ -599,22 +601,22 @@ void LLAvatarListItem::onAvatarNameCache(const LLAvatarName& av_name)
//}
//setAvatarName(name_string);
//setAvatarToolTip(av_name.getUserName());
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
// Centralized in LLAvatarList::getNameForDisplay!
- bool fRlvFilter = (mRlvCheckShowNames) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+ bool fRlvCanShowName = (!mRlvCheckShowNames) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mAvatarId));
//if (mShowDisplayName && !mShowUsername)
- // setAvatarName( (!fRlvFilter) ? av_name.getDisplayName() : RlvStrings::getAnonym(av_name) );
+ // setAvatarName( (fRlvCanShowName) ? av_name.getDisplayName() : RlvStrings::getAnonym(av_name) );
//else if (!mShowDisplayName && mShowUsername)
- // setAvatarName( (!fRlvFilter) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
+ // setAvatarName( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
//else
- // setAvatarName( (!fRlvFilter) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
- setAvatarName(LLAvatarList::getNameForDisplay(av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames));
+ // setAvatarName( (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name) );
+ setAvatarName(LLAvatarList::getNameForDisplay(mAvatarId, av_name, mShowDisplayName, mShowUsername, mRlvCheckShowNames));
- // NOTE: If you change this, you will break sorting the contacts list
- // by username unless you go change the comparator too. -- TS
- setAvatarToolTip( (!fRlvFilter) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
+ // NOTE: If you change this, you will break sorting the contacts list
+ // by username unless you go change the comparator too. -- TS
+ setAvatarToolTip( (fRlvCanShowName) ? av_name.getUserName() : RlvStrings::getAnonym(av_name) );
// TODO-RLVa: bit of a hack putting this here. Maybe find a better way?
- mAvatarIcon->setDrawTooltip(!fRlvFilter);
+ mAvatarIcon->setDrawTooltip(fRlvCanShowName);
// [/RLVa:KB]
//KC - store the username for use in sorting
diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h
index da3ff143d8..3b4b6f50f7 100644
--- a/indra/newview/llavatarlistitem.h
+++ b/indra/newview/llavatarlistitem.h
@@ -117,7 +117,7 @@ public:
void showLastInteractionTime(bool show);
void setAvatarIconVisible(bool visible);
void setShowCompleteName(bool show) { mShowCompleteName = show;};
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
void setRlvCheckShowNames(bool fRlvCheckShowNames);
void updateRlvRestrictions();
// [/RLVa:KB]
@@ -253,7 +253,7 @@ private:
bool mShowInfoBtn;
bool mShowVoiceVolume;
bool mShowProfileBtn;
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
bool mRlvCheckShowNames;
// [/RLVa:KB]
std::string mUserName; //KC - username cache used for sorting
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index ab95aa76e9..9b8feba76e 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -661,10 +661,11 @@ protected:
void showInfoCtrl()
{
- const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType;
+// const bool isVisible = !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType;
// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
- if (isVisible && mShowInfoCtrl)
+ const bool isVisible = mShowInfoCtrl && !mAvatarID.isNull() && !mFrom.empty() && CHAT_SOURCE_SYSTEM != mSourceType;
// [/RLVa:KB]
+ if (isVisible)
{
const LLRect sticky_rect = mUserNameTextBox->getRect();
S32 icon_x = llmin(sticky_rect.mLeft + mUserNameTextBox->getTextBoundingRect().getWidth() + 7, sticky_rect.mRight - 3);
diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp
index a44b534189..5bc6864cd2 100644
--- a/indra/newview/lldrawpoolterrain.cpp
+++ b/indra/newview/lldrawpoolterrain.cpp
@@ -324,10 +324,16 @@ void LLDrawPoolTerrain::renderFullShader()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
- LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
- LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
- LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ LLViewerTexture *detail_texture0p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[0] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture1p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[1] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture2p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[2] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture3p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[3] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+// [/SL:KB]
+// LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
+// LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
+// LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
+// LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
@@ -475,10 +481,16 @@ void LLDrawPoolTerrain::renderFull4TU()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
- LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
- LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
- LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ LLViewerTexture *detail_texture0p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[0] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture1p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[1] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture2p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[2] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture3p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[3] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+// [/SL:KB]
+// LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
+// LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
+// LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
+// LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
@@ -677,10 +689,16 @@ void LLDrawPoolTerrain::renderFull2TU()
// Hack! Get the region that this draw pool is rendering from!
LLViewerRegion *regionp = mDrawFace[0]->getDrawable()->getVObj()->getRegion();
LLVLComposition *compp = regionp->getComposition();
- LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
- LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
- LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
- LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ LLViewerTexture *detail_texture0p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[0] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture1p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[1] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture2p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[2] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+ LLViewerTexture *detail_texture3p = (LLPipeline::sRenderTextures) ? compp->mDetailTextures[3] : LLViewerFetchedTexture::sDefaultDiffuseImagep;
+// [/SL:KB]
+// LLViewerTexture *detail_texture0p = compp->mDetailTextures[0];
+// LLViewerTexture *detail_texture1p = compp->mDetailTextures[1];
+// LLViewerTexture *detail_texture2p = compp->mDetailTextures[2];
+// LLViewerTexture *detail_texture3p = compp->mDetailTextures[3];
LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal();
F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sDetailScale)*sDetailScale;
diff --git a/indra/newview/lldrawpooltree.cpp b/indra/newview/lldrawpooltree.cpp
index d07239c0cb..06d8547f12 100644
--- a/indra/newview/lldrawpooltree.cpp
+++ b/indra/newview/lldrawpooltree.cpp
@@ -98,7 +98,13 @@ void LLDrawPoolTree::render(S32 pass)
LLGLState test(GL_ALPHA_TEST, LLGLSLShader::sNoFixedFunction ? 0 : 1);
LLOverrideFaceColor color(this, 1.f, 1.f, 1.f, 1.f);
- gGL.getTexUnit(sDiffTex)->bind(mTexturep);
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ if( (LLPipeline::sRenderTextures) )
+ gGL.getTexUnit(sDiffTex)->bind( mTexturep );
+ else
+ gGL.getTexUnit(sDiffTex)->bind( LLViewerFetchedTexture::sDefaultDiffuseImagep );
+// [/SL:KB]
+// gGL.getTexUnit(sDiffTex)->bind(mTexturep);
for (std::vector::iterator iter = mDrawFace.begin();
iter != mDrawFace.end(); iter++)
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index b339522305..4da204b538 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -53,6 +53,9 @@
#include "llviewershadermgr.h"
#include "llviewertexture.h"
#include "llvoavatar.h"
+// [RLVa:KB] - Checked: RLVa-2.0.0
+#include "rlvhandler.h"
+// [/RLVa:KB]
#if LL_LINUX
// Work-around spurious used before init warning on Vector4a
@@ -166,6 +169,10 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)
mBoundingSphereRadius = 0.0f ;
mHasMedia = FALSE ;
+
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ mShowDiffTexture = true;
+// [/SL:KB]
}
void LLFace::destroy()
@@ -282,6 +289,14 @@ void LLFace::setTexture(U32 ch, LLViewerTexture* tex)
return ;
}
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ if ( (LLRender::DIFFUSE_MAP == ch) && (!mShowDiffTexture) )
+ {
+ mOrigDiffTexture = tex;
+ return;
+ }
+// [/SL:KB]
+
if(mTexture[ch].notNull())
{
mTexture[ch]->removeFace(ch, this) ;
@@ -2698,9 +2713,60 @@ LLViewerTexture* LLFace::getTexture(U32 ch) const
{
llassert(ch < LLRender::NUM_TEXTURE_CHANNELS);
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ // Check whether the diffuse texture needs to be obscured or restored
+ if (mShowDiffTexture != LLPipeline::sRenderTextures)
+ setDefaultTexture(LLRender::DIFFUSE_MAP, !LLPipeline::sRenderTextures);
+// [/SL:KB]
+
return mTexture[ch] ;
}
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+void LLFace::setDefaultTexture(U32 nChannel, bool fShowDefault) const
+{
+ bool fUpdated = false;
+ if ( (LLRender::DIFFUSE_MAP == nChannel) && (mVObjp) && (!mVObjp->isDead()) && ((LL_PCODE_VOLUME == mVObjp->getPCode()) || (LLViewerObject::LL_VO_PART_GROUP == mVObjp->getPCode())) )
+ {
+ if ( ((mShowDiffTexture) && (fShowDefault)) ||
+ ((!mShowDiffTexture) && (fShowDefault) && (mOrigDiffTexture.notNull()) && (mTexture[nChannel]) && (mTexture[nChannel]->getID() != LLViewerFetchedTexture::sDefaultDiffuseImagep->getID())) )
+ {
+ if (mOrigDiffTexture.notNull())
+ mShowDiffTexture = true; // Swap out the default texture
+ else
+ mOrigDiffTexture = mTexture[nChannel]; // Cache the original texture
+
+ if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_TEXTURES)) || (!mVObjp->isAttachment()) )
+ {
+ if (LL_PCODE_VOLUME == mVObjp->getPCode())
+ const_cast(this)->switchTexture(nChannel, LLViewerFetchedTexture::sDefaultDiffuseImagep);
+ else
+ const_cast(this)->setTexture(nChannel, LLViewerFetchedTexture::sDefaultDiffuseImagep);
+ }
+ mShowDiffTexture = false; fUpdated = true;
+ }
+ else if ( (!mShowDiffTexture) && (!fShowDefault) && (mOrigDiffTexture.notNull()) )
+ {
+ mShowDiffTexture = true;
+ if (LL_PCODE_VOLUME == mVObjp->getPCode())
+ const_cast(this)->switchTexture(nChannel, mOrigDiffTexture);
+ else
+ const_cast(this)->setTexture(nChannel, mOrigDiffTexture);
+ mOrigDiffTexture = nullptr; fUpdated = true;
+ }
+
+ if ((fUpdated) && (mDrawablep))
+ {
+ gPipeline.markTextured(mDrawablep);
+ const_cast(mDrawablep.get())->updateTexture();
+ }
+ }
+
+ // Always flip the flag even if we didn't obscure so we don't keep wasting cycles with negative checks
+ mShowDiffTexture = !fShowDefault;
+}
+// [/SL:KB]
+
void LLFace::setVertexBuffer(LLVertexBuffer* buffer)
{
mVertexBuffer = buffer;
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index ee545acb94..35cfdc1f8b 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -220,6 +220,10 @@ public:
BOOL switchTexture() ;
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ void setDefaultTexture(U32 nChannel, bool fShowDefault) const;
+// [/SL:KB]
+
//vertex buffer tracking
void setVertexBuffer(LLVertexBuffer* buffer);
void clearVertexBuffer(); //sets mVertexBuffer to NULL
@@ -294,7 +298,11 @@ private:
F32 mBoundingSphereRadius ;
bool mHasMedia ;
-
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ mutable bool mShowDiffTexture;
+ mutable LLPointer mOrigDiffTexture;
+// [/SL:KB]
+
protected:
static BOOL sSafeRenderSelect;
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index da20794924..f1f464a480 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -408,6 +408,7 @@ void LLFloaterAvatarPicker::onList()
RLV_ASSERT( (pTabs) && (pNearMePanel) );
if ( (pTabs) && (pNearMePanel) )
{
+ // TODO-RLVa: check this for RlvActions::canShowName()
bool fRlvEnable = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
pTabs->enableTabButton(pTabs->getIndexForPanel(pNearMePanel), fRlvEnable);
if ( (!fRlvEnable) && (pTabs->getCurrentPanel() == pNearMePanel) )
diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp
index 5a9cdbba44..fa1667de73 100644
--- a/indra/newview/llfloaterbuy.cpp
+++ b/indra/newview/llfloaterbuy.cpp
@@ -104,7 +104,10 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
// Clean up the lists...
floater->reset();
floater->mSaleInfo = sale_info;
- floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ floater->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
+// [/RLVa:KB]
+// floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
LLSelectNode* node = selection->getFirstRootNode();
if (!node)
diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp
index b32ac860aa..9d0682d251 100644
--- a/indra/newview/llfloaterbuycontents.cpp
+++ b/indra/newview/llfloaterbuycontents.cpp
@@ -104,7 +104,10 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
if (list)
list->deleteAllItems();
- floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ floater->mObjectSelection = LLSelectMgr::getInstance()->getSelection();
+// [/RLVa:KB]
+// floater->mObjectSelection = LLSelectMgr::getInstance()->getEditSelection();
LLUUID owner_id;
std::string owner_name;
diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp
index 6dc7efc5f9..983c1721cf 100644
--- a/indra/newview/llfloaterimnearbychat.cpp
+++ b/indra/newview/llfloaterimnearbychat.cpp
@@ -71,6 +71,7 @@
#include "llautoreplace.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvhandler.h"
+#include "rlvactions.h"
// [/RLVa:KB]
S32 LLFloaterIMNearbyChat::sLastSpecialChatChannel = 0;
@@ -876,7 +877,7 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe
else
{
// Don't allow chat on a non-public channel if sendchannel restricted (unless the channel is an exception)
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) && (!gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, channel)) )
+ if (!RlvActions::canSendChannel(channel))
return;
// Don't allow chat on debug channel if @sendchat, @redirchat or @rediremote restricted (shows as public chat on viewers)
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 552c131f31..bfe543a76a 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -46,8 +46,9 @@
#include "llrootview.h"
#include "lllayoutstack.h"
-// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.0f)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.0
+#include "rlvactions.h"
+#include "rlvcommon.h"
// [/RLVa:KB]
#include "fsconsoleutils.h"
@@ -551,16 +552,16 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
LLChat& tmp_chat = const_cast(chat_msg);
// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
- if (rlv_handler_t::isEnabled())
+ if (RlvActions::isRlvEnabled())
{
// NOTE-RLVa: we can only filter the *message* here since most everything else will already be part of "args" as well
LLChat& tmp_chat = const_cast(chat_msg);
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
+ if ( (!RlvActions::canShowLocation()) && (!tmp_chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
{
RlvUtil::filterLocation(tmp_chat.mText);
tmp_chat.mRlvLocFiltered = TRUE;
}
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
+ if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) && (!tmp_chat.mRlvNamesFiltered) && (CHAT_SOURCE_AGENT != tmp_chat.mSourceType) )
{
RlvUtil::filterNames(tmp_chat.mText);
tmp_chat.mRlvNamesFiltered = TRUE;
@@ -664,8 +665,8 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
LLFirstUse::otherAvatarChatFirst();
// Add sender to the recent people list.
-// [RLVa:KB] - Checked: 2012-03-15 (RLVa-1.4.6) | Added: RLVa-1.4.6
- if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ if ( (!RlvActions::isRlvEnabled()) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, chat_msg.mFromID)) )
LLRecentPeople::instance().add(chat_msg.mFromID);
// [/RLVa:KB]
// LLRecentPeople::instance().add(chat_msg.mFromID);
@@ -784,8 +785,8 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
LLUUID id;
id.generate();
chat["id"] = id;
-// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
- if (rlv_handler_t::isEnabled())
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if (RlvActions::isRlvEnabled())
chat["show_icon_tooltip"] = !chat_msg.mRlvNamesFiltered;
// [/RLVa:KB]
std::string r_color_name = "White";
diff --git a/indra/newview/llfloaterinspect.cpp b/indra/newview/llfloaterinspect.cpp
index 6ae9f045dc..e9aacd408f 100644
--- a/indra/newview/llfloaterinspect.cpp
+++ b/indra/newview/llfloaterinspect.cpp
@@ -42,9 +42,10 @@
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
-// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
-#include "rlvhandler.h"
-#include "llagent.h"
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
+#include "rlvcommon.h"
+#include "rlvui.h"
// [/RLVa:KB]
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
@@ -105,11 +106,13 @@ void LLFloaterInspect::onOpen(const LLSD& key)
mObjectSelection = LLSelectMgr::getInstance()->getSelection();
refresh();
}
-void LLFloaterInspect::onClickCreatorProfile()
+
+// [RLVa:KB] - Checked: RLVa-2.0.1
+const LLSelectNode* LLFloaterInspect::getSelectedNode() /*const*/
{
if(mObjectList->getAllSelected().size() == 0)
{
- return;
+ return NULL;
}
LLScrollListItem* first_selected =mObjectList->getFirstSelected();
@@ -124,41 +127,29 @@ void LLFloaterInspect::onClickCreatorProfile()
return (obj_id == node->getObject()->getID());
}
} func(first_selected->getUUID());
- LLSelectNode* node = mObjectSelection->getFirstNode(&func);
+ return mObjectSelection->getFirstNode(&func);
+ }
+ return NULL;
+}
+
+void LLFloaterInspect::onClickCreatorProfile()
+{
+ const LLSelectNode* node = getSelectedNode();
if(node)
{
-// LLAvatarActions::showProfile(node->mPermissions->getCreator());
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
+ // Only anonymize the creator if they're also the owner or if they're a nearby avie
const LLUUID& idCreator = node->mPermissions->getCreator();
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
- ((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
+ if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) && ((node->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator))) )
{
return;
}
LLAvatarActions::showProfile(idCreator);
-// [/RLVa:KB]
}
- }
}
void LLFloaterInspect::onClickOwnerProfile()
{
- if(mObjectList->getAllSelected().size() == 0) return;
- LLScrollListItem* first_selected =mObjectList->getFirstSelected();
-
- if (first_selected)
- {
- LLUUID selected_id = first_selected->getUUID();
- struct f : public LLSelectedNodeFunctor
- {
- LLUUID obj_id;
- f(const LLUUID& id) : obj_id(id) {}
- virtual bool apply(LLSelectNode* node)
- {
- return (obj_id == node->getObject()->getID());
- }
- } func(selected_id);
- LLSelectNode* node = mObjectSelection->getFirstNode(&func);
+ const LLSelectNode* node = getSelectedNode();
if(node)
{
if(node->mPermissions->isGroupOwned())
@@ -169,30 +160,108 @@ void LLFloaterInspect::onClickOwnerProfile()
else
{
const LLUUID& owner_id = node->mPermissions->getOwner();
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
- return;
-// [/RLVa:KB]
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, owner_id))
+ return;
LLAvatarActions::showProfile(owner_id);
}
}
- }
}
void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
{
-// getChildView("button owner")->setEnabled(true);
-// getChildView("button creator")->setEnabled(true);
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
- getChildView("button owner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
- // TODO-RLVa: [RLVa-1.2.2] Is it worth checking the selected node just to selectively disable this button?
- getChildView("button creator")->setEnabled(true);
-// [/RLVa:KB]
+ if (!RlvActions::isRlvEnabled())
+ {
+ getChildView("button owner")->setEnabled(true);
+ getChildView("button creator")->setEnabled(true);
+ }
+ else
+ {
+ const LLSelectNode* node = getSelectedNode();
+ const LLUUID& idOwner = (node) ? node->mPermissions->getOwner() : LLUUID::null;
+ const LLUUID& idCreator = (node) ? node->mPermissions->getCreator() : LLUUID::null;
+
+ // See LLFloaterInspect::onClickCreatorProfile()
+ getChildView("button owner")->setEnabled( (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idOwner)) || ((node) && (node->mPermissions->isGroupOwned())) );
+ // See LLFloaterInspect::onClickOwnerProfile()
+ getChildView("button creator")->setEnabled( ((idOwner != idCreator) && (!RlvUtil::isNearbyAgent(idCreator))) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) );
+ }
}
}
+// [/RLVa:KB]
+
+//void LLFloaterInspect::onClickCreatorProfile()
+//{
+// if(mObjectList->getAllSelected().size() == 0)
+// {
+// return;
+// }
+// LLScrollListItem* first_selected =mObjectList->getFirstSelected();
+//
+// if (first_selected)
+// {
+// struct f : public LLSelectedNodeFunctor
+// {
+// LLUUID obj_id;
+// f(const LLUUID& id) : obj_id(id) {}
+// virtual bool apply(LLSelectNode* node)
+// {
+// return (obj_id == node->getObject()->getID());
+// }
+// } func(first_selected->getUUID());
+// LLSelectNode* node = mObjectSelection->getFirstNode(&func);
+// if(node)
+// {
+// LLAvatarActions::showProfile(node->mPermissions->getCreator());
+// }
+// }
+//}
+
+//void LLFloaterInspect::onClickOwnerProfile()
+//{
+// if(mObjectList->getAllSelected().size() == 0) return;
+// LLScrollListItem* first_selected =mObjectList->getFirstSelected();
+//
+// if (first_selected)
+// {
+// LLUUID selected_id = first_selected->getUUID();
+// struct f : public LLSelectedNodeFunctor
+// {
+// LLUUID obj_id;
+// f(const LLUUID& id) : obj_id(id) {}
+// virtual bool apply(LLSelectNode* node)
+// {
+// return (obj_id == node->getObject()->getID());
+// }
+// } func(selected_id);
+// LLSelectNode* node = mObjectSelection->getFirstNode(&func);
+// if(node)
+// {
+// if(node->mPermissions->isGroupOwned())
+// {
+// const LLUUID& idGroup = node->mPermissions->getGroup();
+// LLGroupActions::show(idGroup);
+// }
+// else
+// {
+// const LLUUID& owner_id = node->mPermissions->getOwner();
+// LLAvatarActions::showProfile(owner_id);
+// }
+//
+// }
+// }
+//}
+
+//void LLFloaterInspect::onSelectObject()
+//{
+// if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
+// {
+// getChildView("button owner")->setEnabled(true);
+// getChildView("button creator")->setEnabled(true);
+// }
+//}
LLUUID LLFloaterInspect::getSelectedUUID()
{
@@ -278,12 +347,11 @@ void LLFloaterInspect::refresh()
// actual name and set a placeholder.
if (LLAvatarNameCache::get(idOwner, &av_name))
{
-// owner_name = av_name.getCompleteName();
-// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idOwner != gAgent.getID()) &&
- (!obj->mPermissions->isGroupOwned());
- owner_name = (!fRlvFilterOwner) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvCanShowName = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idOwner)) || (obj->mPermissions->isGroupOwned());
+ owner_name = (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]
+// owner_name = av_name.getCompleteName();
}
else
{
@@ -298,14 +366,12 @@ void LLFloaterInspect::refresh()
if (LLAvatarNameCache::get(idCreator, &av_name))
{
-// creator_name = av_name.getCompleteName();
-// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-2.0.1
const LLUUID& idCreator = obj->mPermissions->getCreator();
- LLAvatarNameCache::get(idCreator, &av_name);
- bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (idCreator != gAgent.getID()) &&
- ( (obj->mPermissions->getOwner() == idCreator) || (RlvUtil::isNearbyAgent(idCreator)) );
- creator_name = (!fRlvFilterCreator) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
+ bool fRlvCanShowName = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) || ( (obj->mPermissions->getOwner() != idCreator) && (!RlvUtil::isNearbyAgent(idCreator)) );
+ creator_name = (fRlvCanShowName) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]
+// creator_name = av_name.getCompleteName();
}
else
{
@@ -316,7 +382,7 @@ void LLFloaterInspect::refresh()
}
mCreatorNameCacheConnection = LLAvatarNameCache::get(idCreator, boost::bind(&LLFloaterInspect::onGetCreatorNameCallback, this));
}
-
+
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
row["columns"][0]["type"] = "text";
diff --git a/indra/newview/llfloaterinspect.h b/indra/newview/llfloaterinspect.h
index 44381eac96..7f7f7377f0 100644
--- a/indra/newview/llfloaterinspect.h
+++ b/indra/newview/llfloaterinspect.h
@@ -36,6 +36,9 @@
class LLObjectSelection;
class LLScrollListCtrl;
class LLUICtrl;
+// [RLVa:KB] - Checked: RLVa-2.0.1
+class LLSelectNode;
+// [/RLVa:KB]
class LLFloaterInspect : public LLFloater
{
@@ -61,6 +64,10 @@ protected:
void setDirty() { mDirty = TRUE; }
bool mDirty;
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ const LLSelectNode* getSelectedNode() /*const*/;
+// [/RLVa:KB]
+
private:
void onGetOwnerNameCallback();
void onGetCreatorNameCallback();
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 794ab8d906..972db9a531 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -118,6 +118,10 @@
#include "llteleporthistorystorage.h"
#include "llproxy.h"
#include "llweb.h"
+// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a)
+#include "rlvactions.h"
+#include "rlvhandler.h"
+// [/RLVa:KB]
#include "lllogininstance.h" // to check if logged in yet
#include "llsdserialize.h"
@@ -129,6 +133,7 @@
// Firestorm Includes
#include "exogroupmutelist.h"
+#include "fsavatarrenderpersistence.h"
#include "fsdroptarget.h"
#include "fsfloaterimcontainer.h"
#include "growlmanager.h"
@@ -147,8 +152,6 @@
#include "llwaterparammanager.h"
#include "llwldaycycle.h"
#include "llwlparammanager.h"
-#include "rlvactions.h"
-#include "rlvhandler.h"
#include "NACLantispam.h"
#include "../llcrashlogger/llcrashlogger.h"
@@ -683,10 +686,10 @@ BOOL LLFloaterPreference::postBuild()
//getChild("ObjectIMOptions")->setCommitCallback(boost::bind(&LLFloaterPreference::onNotificationsChange, this,"ObjectIMOptions"));
//
-// ## Zi: Optional Edit Appearance Lighting
+ // Optional Edit Appearance Lighting
gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::onAppearanceCameraChanged, this));
onAppearanceCameraChanged();
-// ## Zi: Optional Edit Appearance Lighting
+ // Optional Edit Appearance Lighting
// if floater is opened before login set default localized do not disturb message
@@ -739,11 +742,11 @@ BOOL LLFloaterPreference::postBuild()
#endif // OPENSIM //
-// ## Zi: Pie menu
+ // Pie menu
gSavedSettings.getControl("OverridePieColors")->getSignal()->connect(boost::bind(&LLFloaterPreference::onPieColorsOverrideChanged, this));
// make sure pie color controls are enabled or greyed out properly
onPieColorsOverrideChanged();
-// ## Zi: Pie menu
+ // Pie menu
// Show email address in preferences (FIRE-1071)
getChild("send_im_to_email")->setLabelArg("[EMAIL]", getString("LoginToChange"));
@@ -757,8 +760,15 @@ BOOL LLFloaterPreference::postBuild()
mFilterEdit->setKeystrokeCallback(boost::bind(&LLFloaterPreference::onUpdateFilterTerm, this, false));
//
- // Update label for max. non imposters
+ // Update label for max. non imposters and max complexity
gSavedSettings.getControl("IndirectMaxNonImpostors")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::updateMaxNonImpostorsLabel, this, _2));
+ gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::updateMaxComplexityLabel, this, _2));
+
+ // Properly disable avatar tag setting
+ gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::onAvatarTagSettingsChanged, this));
+ gSavedSettings.getControl("FSNameTagShowLegacyUsernames")->getCommitSignal()->connect(boost::bind(&LLFloaterPreference::onAvatarTagSettingsChanged, this));
+ onAvatarTagSettingsChanged();
+ //
return TRUE;
}
@@ -2159,8 +2169,14 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLSliderCtrl* terrain_detail = getChild("TerrainDetail"); // can be linked with control var
LLTextBox* terrain_text = getChild("TerrainDetailText");
- ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
-
+// ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
+// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
+ // "Basic Shaders" can't be disabled - but can be enabled - under @setenv=n
+ bool fCtrlShaderEnable = LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable");
+ ctrl_shader_enable->setEnabled(
+ fCtrlShaderEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("VertexShaderEnable"))) );
+// [/RLVa:KB]
+
BOOL shaders = ctrl_shader_enable->get();
if (shaders)
{
@@ -2181,7 +2197,13 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
- ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+// ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+// [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-0.2.0a
+ // "Atmospheric Shaders" can't be disabled - but can be enabled - under @setenv=n
+ bool fCtrlWindLightEnable = fCtrlShaderEnable && shaders;
+ ctrl_wind_light->setEnabled(
+ fCtrlWindLightEnable && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) || (!gSavedSettings.getBOOL("WindLightUseAtmosShaders"))) );
+// [/RLVa:KB]
sky->setEnabled(ctrl_wind_light->get() && shaders);
sky_text->setEnabled(ctrl_wind_light->get() && shaders);
@@ -2289,7 +2311,10 @@ void LLAvatarComplexityControls::setIndirectMaxArc()
else
{
// This is the inverse of the calculation in updateMaxComplexity
- indirect_max_arc = (U32)((log(max_arc) - MIN_ARC_LOG) / ARC_LIMIT_MAP_SCALE) + MIN_INDIRECT_ARC_LIMIT;
+ // Fix math rounding error
+ //indirect_max_arc = (U32)((log(max_arc) - MIN_ARC_LOG) / ARC_LIMIT_MAP_SCALE) + MIN_INDIRECT_ARC_LIMIT;
+ indirect_max_arc = (U32)ll_round(((log(F32(max_arc)) - MIN_ARC_LOG) / ARC_LIMIT_MAP_SCALE)) + MIN_INDIRECT_ARC_LIMIT;
+ //
}
gSavedSettings.setU32("IndirectMaxComplexity", indirect_max_arc);
}
@@ -3031,6 +3056,13 @@ void LLFloaterPreference::updateMaxNonImpostorsLabel(const LLSD& newvalue)
}
setMaxNonImpostorsText(value, getChild("IndirectMaxNonImpostorsText"));
}
+
+void LLFloaterPreference::updateMaxComplexityLabel(const LLSD& newvalue)
+{
+ U32 value = newvalue.asInteger();
+
+ LLAvatarComplexityControls::setText(value, getChild("IndirectMaxComplexityText"));
+}
//
void LLFloaterPreferenceGraphicsAdvanced::updateSliderText(LLSliderCtrl* ctrl, LLTextBox* text_box)
@@ -3108,7 +3140,10 @@ void LLAvatarComplexityControls::updateMax(LLSliderCtrl* slider, LLTextBox* valu
{
// if this is changed, the inverse calculation in setIndirectMaxArc
// must be changed to match
- max_arc = (U32)exp(MIN_ARC_LOG + (ARC_LIMIT_MAP_SCALE * (indirect_value - MIN_INDIRECT_ARC_LIMIT)));
+ // Fix math rounding error
+ //max_arc = (U32)exp(MIN_ARC_LOG + (ARC_LIMIT_MAP_SCALE * (indirect_value - MIN_INDIRECT_ARC_LIMIT)));
+ max_arc = (U32)ll_round(exp(MIN_ARC_LOG + (ARC_LIMIT_MAP_SCALE * (indirect_value - MIN_INDIRECT_ARC_LIMIT))));
+ //
}
gSavedSettings.setU32("RenderAvatarMaxComplexity", (U32)max_arc);
@@ -3123,7 +3158,12 @@ void LLAvatarComplexityControls::setText(U32 value, LLTextBox* text_box)
}
else
{
- text_box->setText(llformat("%d", value));
+ // Proper number formatting with delimiter
+ //text_box->setText(llformat("%d", value));
+ std::string output_string;
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(output_string, value);
+ text_box->setText(output_string);
}
}
@@ -3354,6 +3394,18 @@ void LLFloaterPreference::saveGraphicsPreset(const std::string& preset)
mSavedGraphicsPreset = preset;
}
+
+// Properly disable avatar tag setting
+void LLFloaterPreference::onAvatarTagSettingsChanged()
+{
+ bool usernames_enabled = gSavedSettings.getBOOL("NameTagShowUsernames");
+ bool legacy_enabled = gSavedSettings.getBOOL("FSNameTagShowLegacyUsernames");
+
+ childSetEnabled("FSshow_legacyun", usernames_enabled);
+ childSetEnabled("legacy_trim_check", usernames_enabled && legacy_enabled);
+}
+//
+
//------------------------------Updater---------------------------------------
// FIRE-6340, FIRE-6567 - Setting Bandwidth issues
@@ -4820,6 +4872,9 @@ void FSPanelPreferenceBackup::onClickBackupSettings()
std::string backup_per_account_name = gDirUtilp->getExpandedFilename(LL_PATH_NONE, backup_per_account_folder,
LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount"));
+ // Make sure to persist settings to file before we copy them
+ FSAvatarRenderPersistence::instance().saveAvatarRenderSettings();
+
LL_INFOS("SettingsBackup") << "copying per account settings" << LL_ENDL;
// create per-user folder if it doesn't exist yet
LLFile::mkdir(backup_per_account_folder.c_str());
@@ -5146,6 +5201,7 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const
exoGroupMuteList::instance().loadMuteList();
}
#endif
+ FSAvatarRenderPersistence::instance().loadAvatarRenderSettings();
LLPanelMainInventory::sSaveFilters = false;
}
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h
index 40737bd140..9d417c024c 100644
--- a/indra/newview/llfloaterpreference.h
+++ b/indra/newview/llfloaterpreference.h
@@ -161,6 +161,9 @@ protected:
void loadFontPresetsFromDir(const std::string& dir, LLComboBox* font_selection_combo);
//
+ // Properly disable avatar tag setting
+ void onAvatarTagSettingsChanged();
+
public:
// This function squirrels away the current values of the controls so that
// cancel() can restore them.
@@ -232,6 +235,7 @@ public:
void updateMaxNonImpostors();
void setMaxNonImpostorsText(U32 value, LLTextBox* text_box);
void updateMaxNonImpostorsLabel(const LLSD& newvalue);
+ void updateMaxComplexityLabel(const LLSD& newvalue);
//
void refreshUI();
diff --git a/indra/newview/llfloaterproperties.cpp b/indra/newview/llfloaterproperties.cpp
index 3ba8bbf2dc..e3a468167f 100644
--- a/indra/newview/llfloaterproperties.cpp
+++ b/indra/newview/llfloaterproperties.cpp
@@ -59,8 +59,9 @@
#include "lluictrlfactory.h"
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
+#include "rlvcommon.h"
// [/RLVa:KB]
#include "llviewernetwork.h" // For OpenSim export perms
#include "llexperiencecache.h"
@@ -306,11 +307,10 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
getChildView("BtnCreator")->setEnabled(TRUE);
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
getChildView("LabelCreatorName")->setEnabled(TRUE);
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
+// [RLVa:KB] - Checked: RLVa-2.0.1
// If the object creator matches the object owner we need to anonymize the creator field as well
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
- ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
- (RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
+ if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, item->getCreatorUUID())) &&
+ ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) || (RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
{
childSetEnabled("BtnCreator", FALSE);
name = RlvStrings::getAnonym(name);
@@ -331,6 +331,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
////////////////
if(perm.isOwned())
{
+// [RLVa:KB] - Checked: RVLa-2.0.1
+ bool fRlvCanShowOwner = true;
+// [/RLVa:KB]
std::string name;
if (perm.isGroupOwned())
{
@@ -339,14 +342,18 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
else
{
gCacheName->getFullName(perm.getOwner(), name);
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
- name = RlvStrings::getAnonym(name);
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ if (RlvActions::isRlvEnabled())
+ {
+ fRlvCanShowOwner = RlvActions::canShowName(RlvActions::SNC_DEFAULT, perm.getOwner());
+ if (!fRlvCanShowOwner)
+ name = RlvStrings::getAnonym(name);
+ }
// [/RLVa:KB]
}
// getChildView("BtnOwner")->setEnabled(TRUE);
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
- getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ getChildView("BtnOwner")->setEnabled(fRlvCanShowOwner);
// [/RLVa:KB]
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(TRUE);
@@ -616,12 +623,12 @@ void LLFloaterProperties::onClickCreator()
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+// [RLVa:KB] - Checked: RLVa-1.2.1
+ const LLUUID& idCreator = item->getCreatorUUID();
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) )
{
const LLPermissions& perm = item->getPermissions();
- if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) ||
- (RlvUtil::isNearbyAgent(item->getCreatorUUID())) )
+ if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == idCreator) ) || (RlvUtil::isNearbyAgent(idCreator)) )
{
return;
}
@@ -642,8 +649,8 @@ void LLFloaterProperties::onClickOwner()
}
else
{
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+// [RLVa:KB] - Checked: RLVa-1.0.0
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, item->getPermissions().getOwner())) )
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getPermissions().getOwner());
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 29e2505237..07bb73015d 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -61,6 +61,10 @@
#include "chatbar_as_cmdline.h" // For FIRE-1624
+// [RLVa:KB] - Checked: RLVa-2.0.0
+#include "rlvactions.h"
+// [/RLVa:KB]
+
// Longest time, in seconds, to wait for all animations to stop playing
const F32 MAX_WAIT_ANIM_SECS = 60.f;
@@ -532,6 +536,11 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
{
if (!gesture) return;
+// [RLVa:KB] - Checked: RLVa-2.0.0 | Handles: @sendgesture
+ if (!RlvActions::canPlayGestures())
+ return;
+// [/RLVa:KB]
+
// Reset gesture to first step
gesture->mCurrentStep = 0;
diff --git a/indra/newview/llgiveinventory.cpp b/indra/newview/llgiveinventory.cpp
index d8b5e81ca1..1062e1ae78 100644
--- a/indra/newview/llgiveinventory.cpp
+++ b/indra/newview/llgiveinventory.cpp
@@ -46,9 +46,10 @@
#include "llrecentpeople.h"
#include "llviewerobjectlist.h"
#include "llvoavatarself.h"
-// [RLVa:KB] - Checked: 2010-03-04 (RLVa-1.2.2a)
+// [RLVa:KB] - Checked: RLVa-1.2.2
#include "llavatarnamecache.h"
-#include "rlvhandler.h"
+#include "rlvactions.h"
+#include "rlvcommon.h"
#include "rlvui.h"
// [/RLVa:KB]
#include "llworld.h" // Aurora Sim
@@ -326,9 +327,8 @@ void LLGiveInventory::logInventoryOffer(const LLUUID& to_agent, const LLUUID &im
{
gIMMgr->addSystemMessage(im_session_id, "inventory_item_offered", args);
}
-// [RLVa:KB] - Checked: 2010-05-26 (RLVa-1.2.2a) | Modified: RLVa-1.2.0h
- else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(to_agent)) &&
- (!RlvUIEnabler::hasOpenProfile(to_agent)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ else if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, to_agent)) && (RlvUtil::isNearbyAgent(to_agent)) && (!RlvUIEnabler::hasOpenProfile(to_agent)) )
{
// Log to chat history if the user didn't drop on an IM session or a profile to avoid revealing the name of the recipient
std::string strMsgName = "inventory_item_offered-im"; LLSD args; LLAvatarName avName;
@@ -462,10 +462,10 @@ void LLGiveInventory::commitGiveInventoryItem(const LLUUID& to_agent,
// add buddy to recent people list
// LLRecentPeople::instance().add(to_agent);
-// [RLVa:KB] - Checked: 2010-04-21 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
+// [RLVa:KB] - Checked: RLVa-2.0.0
// Block the recent activity update if this was an in-world drop on an avatar (as opposed to a drop on an IM session or on a profile)
- if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) ||
- (RlvUIEnabler::hasOpenProfile(to_agent)) )
+ if ( (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, to_agent)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) || (RlvUIEnabler::hasOpenProfile(to_agent)) )
{
LLRecentPeople::instance().add(to_agent);
}
@@ -536,10 +536,10 @@ bool LLGiveInventory::commitGiveInventoryCategory(const LLUUID& to_agent,
// add buddy to recent people list
// LLRecentPeople::instance().add(to_agent);
-// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
+// [RLVa:KB] - Checked: RLVa-2.0.0
// Block the recent activity update if this was an in-world drop on an avatar (as opposed to a drop on an IM session or on a profile)
- if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) ||
- (RlvUIEnabler::hasOpenProfile(to_agent)) )
+ if ( (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, to_agent)) || (im_session_id.notNull()) || (!RlvUtil::isNearbyAgent(to_agent)) || (RlvUIEnabler::hasOpenProfile(to_agent)) )
{
LLRecentPeople::instance().add(to_agent);
}
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index 8a6052c153..822016942c 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -64,7 +64,9 @@
#include "llspatialpartition.h"
#include "llviewershadermgr.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
+#include "rlvactions.h"
#include "rlvhandler.h"
+#include "rlvhelper.h"
// [/RLVa:KB]
// Height of the yellow selection highlight posts for land
@@ -167,13 +169,15 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0g
if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))
{
+ static RlvCachedBehaviourModifier s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST);
+
// We'll allow drag selection under fartouch, but only within the fartouch range
// (just copy/paste the code above us to make that work, thank you Lindens!)
LLVector3 relative_av_pos = av_pos;
relative_av_pos -= LLViewerCamera::getInstance()->getOrigin();
- F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + 1.5f;
- F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - 1.5f;
+ F32 new_far = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() + s_nFartouchDist;
+ F32 new_near = relative_av_pos * LLViewerCamera::getInstance()->getAtAxis() - s_nFartouchDist;
new_near = llmax(new_near, 0.1f);
@@ -182,7 +186,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
// Usurp these two
limit_select_distance = TRUE;
- select_dist_squared = 1.5f * 1.5f;
+ select_dist_squared = s_nFartouchDist * s_nFartouchDist;
}
// [/RLVa:KB]
LLViewerCamera::getInstance()->setPerspective(FOR_SELECTION,
@@ -269,7 +273,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
}
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Added: RLVa-1.3.0c
- if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.canEdit(vobjp)) )
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canEdit(vobjp)) )
{
continue;
}
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 56a7938ab3..dbe14c9616 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -41,6 +41,12 @@
#include "llnotificationsutil.h"
#include "llstatusbar.h" // can_afford_transaction()
#include "groupchatlistener.h"
+// [RLVa:KB] - Checked: 2011-03-28 (RLVa-1.3.0)
+#include "llslurl.h"
+#include "rlvactions.h"
+#include "rlvcommon.h"
+#include "rlvhandler.h"
+// [/RLVa:KB]
// Firestorm includes
#include "exogroupmutelist.h"
@@ -51,10 +57,6 @@
#include "fsfloaterim.h"
#include "llpanelgroup.h"
#include "llresmgr.h"
-#include "llslurl.h"
-#include "rlvactions.h"
-#include "rlvcommon.h"
-#include "rlvhandler.h"
//
// Globals
@@ -235,7 +237,7 @@ void LLGroupActions::startCall(const LLUUID& group_id)
}
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
- if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) )
+ if (!RlvActions::canStartIM(group_id))
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
@@ -614,7 +616,7 @@ LLUUID LLGroupActions::startIM(const LLUUID& group_id)
if (group_id.isNull()) return LLUUID::null;
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
- if ( (!RlvActions::canStartIM(group_id)) && (!RlvActions::hasOpenGroupSession(group_id)) )
+ if (!RlvActions::canStartIM(group_id))
{
make_ui_sound("UISndInvalidOp");
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_STARTIM, LLSD().with("RECIPIENT", LLSLURL("group", group_id, "about").getSLURLString()));
@@ -834,7 +836,10 @@ void LLGroupActions::ejectFromGroup(const LLUUID& idGroup, const LLUUID& idAgent
LLSD payload;
payload["avatar_id"] = idAgent;
payload["group_id"] = idGroup;
- std::string fullname = LLSLURL("agent", idAgent, "inspect").getSLURLString();
+ // Show complete name in eject dialog
+ //std::string fullname = LLSLURL("agent", idAgent, "inspect").getSLURLString();
+ std::string fullname = LLSLURL("agent", idAgent, "completename").getSLURLString();
+ //
args["AVATAR_NAME"] = fullname;
LLNotificationsUtil::add("EjectGroupMemberWarning",
args,
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 8f325043e3..ad4dc3a1de 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -46,7 +46,8 @@
#include "llstatusbar.h"
#include "llmenugl.h"
#include "pipeline.h"
-// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.4.0a)
+// [RLVa:KB] - Checked: RLVa-1.4.0
+#include "rlvactions.h"
#include "rlvhandler.h"
// [/RLVa:KB]
#include
@@ -260,14 +261,14 @@ void LLHUDText::setString(const std::string &text_utf8)
// addLine(text_utf8, mColor);
// [RLVa:KB] - Checked: 2010-03-02 (RLVa-1.4.0a) | Modified: RLVa-1.0.0f
// NOTE: setString() is called for debug and map beacons as well
- if (rlv_handler_t::isEnabled())
+ if (RlvActions::isRlvEnabled())
{
std::string text(text_utf8);
if (gRlvHandler.canShowHoverText(mSourceObject))
{
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
+ if (!RlvActions::canShowLocation())
RlvUtil::filterLocation(text);
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT))
RlvUtil::filterNames(text);
}
else
diff --git a/indra/newview/llinspectobject.cpp b/indra/newview/llinspectobject.cpp
index a2d3a15b5b..30275d44a4 100644
--- a/indra/newview/llinspectobject.cpp
+++ b/indra/newview/llinspectobject.cpp
@@ -39,6 +39,7 @@
#include "llviewermediafocus.h"
#include "llviewerobjectlist.h" // to select the requested object
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0c)
+#include "rlvactions.h"
#include "rlvhandler.h"
#include "lltoolpie.h"
// [/RLVa:KB]
@@ -401,7 +402,7 @@ void LLInspectObject::updateSitLabel(LLSelectNode* nodep)
if (rlv_handler_t::isEnabled())
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
- sit_btn->setEnabled( (pick.mObjectID.notNull()) && (gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset)) );
+ sit_btn->setEnabled( (pick.mObjectID.notNull()) && (RlvActions::canSit(pick.getObject(), pick.mObjectOffset)) );
}
// [/RLVa:KB]
}
@@ -501,12 +502,10 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
LLUUID creator_id = nodep->mPermissions->getCreator();
// std::string creator_url =
// LLSLURL("agent", creator_id, "about").getSLURLString();
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
// Only anonymize the creator if they're also the owner or if they're a nearby avie
- bool fRlvHideCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
- ((nodep->mPermissions->getOwner() == creator_id) || (RlvUtil::isNearbyAgent(creator_id)));
- std::string creator_url =
- LLSLURL("agent", creator_id, (!fRlvHideCreator) ? "about" : "rlvanonym").getSLURLString();
+ bool fRlvHideCreator = (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, creator_id)) && ((nodep->mPermissions->getOwner() == creator_id) || (RlvUtil::isNearbyAgent(creator_id)));
+ const std::string creator_url = LLSLURL("agent", creator_id, (!fRlvHideCreator) ? "about" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
args["[CREATOR]"] = creator_url;
@@ -523,8 +522,8 @@ void LLInspectObject::updateCreator(LLSelectNode* nodep)
{
owner_id = nodep->mPermissions->getOwner();
// owner_url = LLSLURL("agent", owner_id, "about").getSLURLString();
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- bool fRlvHideOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ bool fRlvHideOwner = (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, owner_id));
owner_url = LLSLURL("agent", owner_id, (!fRlvHideOwner) ? "about" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
}
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index 61fdac9e67..78d1c3eee6 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -1051,17 +1051,22 @@ void LLInventoryFilter::setFilterWorn(BOOL worn)
//
// FIRE-19340: search inventory by transferable permission
-void LLInventoryFilter::setFilterTransferable(BOOL transferable)
-{
- setModified();
- if (transferable)
- {
- mFilterOps.mFilterTypes |= FILTERTYPE_TRANSFERABLE;
- }
- else
- {
- mFilterOps.mFilterTypes &= ~FILTERTYPE_TRANSFERABLE;
- }
+void LLInventoryFilter::setFilterTransferable(BOOL transferable)
+{
+ BOOL current = (mFilterOps.mFilterTypes & FILTERTYPE_TRANSFERABLE) != 0;
+
+ if (current != transferable)
+ {
+ setModified();
+ if (transferable)
+ {
+ mFilterOps.mFilterTypes |= FILTERTYPE_TRANSFERABLE;
+ }
+ else
+ {
+ mFilterOps.mFilterTypes &= ~FILTERTYPE_TRANSFERABLE;
+ }
+ }
}
//
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index d684e534ea..c9daeca3bc 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -74,8 +74,9 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llworldmapview.h" // shared draw code
-// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
+#include "rlvcommon.h"
// [/RLVa:KB]
#include "llmutelist.h"
#include "lfsimfeaturehandler.h"
@@ -677,7 +678,7 @@ void LLNetMap::draw()
// [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f | FS-Specific
LLWorldMapView::drawAvatar(
pos_map.mV[VX], pos_map.mV[VY],
- ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? color : map_avatar_color.get()),
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, uuid)) ? color : map_avatar_color.get(),
pos_map.mV[VZ], mDotRadius,
unknown_relative_z);
// [/RLVa:KB]
@@ -995,26 +996,17 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
// If the cursor is near an avatar on the minimap, a mini-inspector will be
// shown for the avatar, instead of the normal map tooltip.
// if (handleToolTipAgent(mClosestAgentToCursor))
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (handleToolTipAgent(mClosestAgentToCursor)) )
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ bool fRlvCanShowName = (mClosestAgentToCursor.notNull()) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mClosestAgentToCursor));
+ if ( (fRlvCanShowName) && (handleToolTipAgent(mClosestAgentToCursor)) )
// [/RLVa:KB]
{
return TRUE;
}
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- LLStringUtil::format_map_t args;
-
- LLAvatarName avName;
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
- (mClosestAgentToCursor.notNull()) && (LLAvatarNameCache::get(mClosestAgentToCursor, &avName)) )
- {
- args["[AGENT]"] = RlvStrings::getAnonym(avName) + "\n";
- }
- else
- {
- args["[AGENT]"] = "";
- }
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ LLStringUtil::format_map_t args; LLAvatarName avName;
+ args["[AGENT]"] = ( (!fRlvCanShowName) && (mClosestAgentToCursor.notNull()) && (LLAvatarNameCache::get(mClosestAgentToCursor, &avName)) ) ? RlvStrings::getAnonym(avName) + "\n" : "";
// [/RLVa:KB]
LLRect sticky_rect;
@@ -1029,8 +1021,8 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask )
sticky_rect.mTop = sticky_rect.mBottom + 2 * SLOP;
// region_name = region->getName();
-// [RLVa:KB] - Checked: 2010-10-19 (RLVa-1.2.2b) | Modified: RLVa-1.2.2b
- region_name = ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? region->getName() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION));
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ region_name = (RlvActions::canShowLocation()) ? region->getName() : RlvStrings::getString(RLV_STRING_HIDDEN_REGION);
// [/RLVa:KB]
// Synchronize tooltips throughout instances
//if (!region_name.empty())
@@ -1553,7 +1545,7 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
mPopupMenu->setItemVisible("More Options", mClosestAgentsToCursor.size() == 1);
mPopupMenu->setItemVisible("View Profile", mClosestAgentsToCursor.size() == 1);
- bool can_show_names = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
+ bool can_show_names = !RlvActions::hasBehaviour(RLV_BHVR_SHOWNAMES);
mPopupMenu->setItemEnabled("Add to Set Multiple", can_show_names);
mPopupMenu->setItemEnabled("More Options", can_show_names);
mPopupMenu->setItemEnabled("View Profile", can_show_names);
@@ -1601,8 +1593,8 @@ BOOL LLNetMap::handleRightMouseDown(S32 x, S32 y, MASK mask)
mPopupMenu->setItemVisible("MarkAvatar", mClosestAgentToCursor.notNull());
mPopupMenu->setItemVisible("Start Tracking", mClosestAgentToCursor.notNull());
mPopupMenu->setItemVisible("Profile Separator", (mClosestAgentsToCursor.size() >= 1 || mClosestAgentToCursor.notNull()));
- mPopupMenu->setItemEnabled("Place Profile", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC));
- mPopupMenu->setItemEnabled("World Map", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
+ mPopupMenu->setItemEnabled("Place Profile", RlvActions::canShowLocation());
+ mPopupMenu->setItemEnabled("World Map", !RlvActions::hasBehaviour(RLV_BHVR_SHOWWORLDMAP));
// [/SL:KB]
mPopupMenu->buildDrawLabels();
@@ -1960,7 +1952,7 @@ bool LLNetMap::canMap()
bool LLNetMap::canShare()
{
- return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
+ return (!RlvActions::hasBehaviour(RLV_BHVR_SHOWINV));
}
bool LLNetMap::canOfferTeleport()
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp
index 9d2810cb37..1058c3836c 100644
--- a/indra/newview/llnotificationalerthandler.cpp
+++ b/indra/newview/llnotificationalerthandler.cpp
@@ -97,7 +97,7 @@ bool LLAlertHandler::processNotification(const LLNotificationPtr& notification)
// - LLHandlerUtil::logToIMP2P() below will still be called with to_file_only == false
// - LLHandlerUtil::logToIM() will eventually be called as a result and without an open IM session it will log the
// same message as it would for an open session whereas to_file_only == true would take a different code path
- if ( (RlvActions::hasOpenP2PSession(from_id)) || (RlvActions::canStartIM(from_id)) )
+ if (RlvActions::canStartIM(from_id))
{
// [/RLVa:KB]
// firstly create session...
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 8caefb111c..80dada39cb 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -119,7 +119,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification)
// [RLVa:KB] - Checked: 2013-05-09 (RLVa-1.4.9)
// Don't spawn an IM session for non-chat related events
- if ( (RlvActions::hasOpenP2PSession(from_id)) || (RlvActions::canStartIM(from_id)) )
+ if (RlvActions::canStartIM(from_id))
{
// [/RLVa:KB]
LLHandlerUtil::spawnIMSession(name, from_id);
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 94f74674e7..02e689be3f 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -50,6 +50,7 @@
#include "llwearableitemslist.h"
#include "llviewercontrol.h" // for gSavedSettings
+#include "llresmgr.h"
#include "lltextbox.h"
static bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y);
@@ -496,7 +497,13 @@ void LLOutfitsList::refreshList(const LLUUID& category_id)
//
// FIRE-12939: Add outfit count to outfits list
- getChild("OutfitcountText")->setTextArg("COUNT", llformat("%d", cat_array.size()));
+ {
+ std::string count_string;
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(count_string, (S32)cat_array.size());
+ getChild("OutfitcountText")->setTextArg("COUNT", count_string);
+ }
+ //
// Handle added tabs.
for (uuid_vec_t::const_iterator iter = vadded.begin();
@@ -1235,7 +1242,11 @@ bool is_tab_header_clicked(LLAccordionCtrlTab* tab, S32 y)
// Show avatar complexity in appearance floater
void LLOutfitsList::updateAvatarComplexity(U32 complexity)
{
- mAvatarComplexityLabel->setTextArg("[WEIGHT]", llformat("%d", complexity));
+ std::string complexity_string;
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+ mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);
}
//
// EOF
diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp
index 254b959259..3a921a7e35 100644
--- a/indra/newview/llpanelexperiencelisteditor.cpp
+++ b/indra/newview/llpanelexperiencelisteditor.cpp
@@ -95,8 +95,8 @@ void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids )
{
mExperienceIds.clear();
// [SL:KB] - Because GCC likes to be special
-// ...and Clang doesn't (argh!)
-#if LL_GNUC
+// ...and Clang does too
+#if LL_GNUC || LL_CLANG
std::transform(experience_ids.beginArray(), experience_ids.endArray(), std::inserter(mExperienceIds, mExperienceIds.end()), [](const LLSD& sd) { return sd.asUUID(); });
#else
mExperienceIds.insert(experience_ids.beginArray(), experience_ids.endArray());
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 2337268cbd..48403afd8a 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1199,8 +1199,11 @@ void LLPanelGroupMembersSubTab::confirmEjectMembers()
if (selection_count == 1)
{
LLSD args;
- std::string fullname;
- gCacheName->getFullName(mMembersList->getValue(), fullname);
+ // FIRE-19529: Group eject dialog doesn't show avatar name
+ //std::string fullname;
+ //gCacheName->getFullName(mMembersList->getValue(), fullname);
+ std::string fullname = LLSLURL("agent", mMembersList->getValue().asUUID(), "completename").getSLURLString();
+ //
args["AVATAR_NAME"] = fullname;
LLSD payload;
LLNotificationsUtil::add("EjectGroupMemberWarning",
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index a3aae4aa5a..2febe44317 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -130,6 +130,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
//mCommitCallbackRegistrar.add("Inventory.NewWindow", boost::bind(&LLPanelMainInventory::newWindow, this));
mCommitCallbackRegistrar.add("Inventory.ShowFilters", boost::bind(&LLPanelMainInventory::toggleFindOptions, this));
mCommitCallbackRegistrar.add("Inventory.ResetFilters", boost::bind(&LLPanelMainInventory::resetFilters, this));
+ //mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); // Sort By menu handlers
mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this));
// Filter Links Menu
@@ -192,8 +193,6 @@ BOOL LLPanelMainInventory::postBuild()
mExpandBtn->setClickedCallback(boost::bind(&LLPanelMainInventory::onExpandButtonClicked, this));
// Inventory Collapse and Expand Buttons
- mItemcountText=getChild("ItemcountText");
-
mFilterTabs = getChild("inventory filter tabs");
mFilterTabs->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterSelected, this));
@@ -560,36 +559,16 @@ void LLPanelMainInventory::onClearSearch()
{
BOOL initially_active = FALSE;
LLFloater *finder = getFinder();
-// FIRE-5160: Don't reset inventory filter when clearing search term
-// if (mActivePanel)
-// {
-// initially_active = mActivePanel->getFilter().isNotDefault();
-// mActivePanel->setFilterSubString(LLStringUtil::null);
-// //
-// //mActivePanel->setFilterTypes(0xffffffffffffffffULL);
-// if (mActivePanel->getName() == "Recent Items" || mActivePanel->getName() == "Worn Items")
-// {
-// mActivePanel->getFilter().resetDefault();
-// }
-// else
-// {
-// mActivePanel->setFilterTypes(0xffffffffffffffffULL);
-// }
-// //
-//
-// // ## Zi: Filter Links Menu
-// // We don't do this anymore, we have a menu option for it now. -Zi
-//// mActivePanel->setFilterLinks(LLInventoryFilter::FILTERLINK_INCLUDE_LINKS);
-// // make sure the dropdown shows "All Types" once again
-// LLInventoryFilter &filter = mActivePanel->getFilter();
-// updateFilterDropdown(&filter);
-// //
-// }
if (mActivePanel)
{
+ // FIRE-5160: Don't reset inventory filter when clearing search term
+ //initially_active = mActivePanel->getFilter().isNotDefault();
+ //mActivePanel->setFilterSubString(LLStringUtil::null);
+ //mActivePanel->setFilterTypes(0xffffffffffffffffULL);
+ //mActivePanel->setFilterLinks(LLInventoryFilter::FILTERLINK_INCLUDE_LINKS);
mActivePanel->setFilterSubString(LLStringUtil::null);
+ //
}
-//
if (finder)
{
@@ -661,38 +640,47 @@ void LLPanelMainInventory::onFilterEdit(const std::string& search_string )
// Separate search for inventory tabs from Satomi Ahn (FIRE-913 & FIRE-6862)
}
-// ## Zi: Filter dropdown
+// Filter dropdown
void LLPanelMainInventory::onFilterTypeSelected(const std::string& filter_type_name)
{
if (!mActivePanel)
+ {
return;
+ }
// by default enable everything
- U64 filterTypes=~0;
+ U64 filterTypes = ~0;
// get the pointer to the filter subwindow
- LLFloaterInventoryFinder* finder=getFinder();
+ LLFloaterInventoryFinder* finder = getFinder();
// find the filter name in our filter map
- if(mFilterMap.find(filter_type_name)!=mFilterMap.end())
+ if (mFilterMap.find(filter_type_name) != mFilterMap.end())
{
- filterTypes=mFilterMap[filter_type_name];
+ filterTypes = mFilterMap[filter_type_name];
}
// special treatment for "all" filter
- else if(filter_type_name=="filter_type_all")
+ else if (filter_type_name == "filter_type_all")
{
// update subwindow if it's open
if (finder)
+ {
LLFloaterInventoryFinder::selectAllTypes(finder);
+ }
}
// special treatment for "custom" filter
- else if(filter_type_name=="filter_type_custom")
+ else if (filter_type_name == "filter_type_custom")
{
// open the subwindow if needed, otherwise just give it focus
- if(!finder)
+ if (!finder)
+ {
toggleFindOptions();
+ }
else
+ {
finder->setFocus(TRUE);
+ }
+
return;
}
// invalid selection (broken XML?)
@@ -704,45 +692,53 @@ void LLPanelMainInventory::onFilterTypeSelected(const std::string& filter_type_n
mActivePanel->setFilterTypes(filterTypes);
// update subwindow if it's open
- if(finder)
+ if (finder)
+ {
finder->updateElementsFromFilter();
+ }
}
// reflect state of current filter selection in the dropdown list
void LLPanelMainInventory::updateFilterDropdown(const LLInventoryFilter* filter)
{
// if we don't have a filter combobox (missing in the skin and failed to create?) do nothing
- if(!mFilterComboBox)
+ if (!mFilterComboBox)
+ {
return;
+ }
// extract filter bits we need to see
- U64 filterTypes=filter->getFilterObjectTypes() & mFilterMask;
+ U64 filterTypes = filter->getFilterObjectTypes() & mFilterMask;
std::string controlName;
// check if the filter types match our filter mask, meaning "All"
- if(filterTypes==mFilterMask)
- controlName="filter_type_all";
+ if (filterTypes == mFilterMask)
+ {
+ controlName = "filter_type_all";
+ }
else
{
// find the name of the current filter in our filter map, if exists
- for(std::map::iterator i=mFilterMap.begin();i!=mFilterMap.end();i++)
+ for (std::map::iterator it = mFilterMap.begin(); it != mFilterMap.end(); ++it)
{
- if((*i).second==filterTypes)
+ if ((*it).second == filterTypes)
{
- controlName=(*i).first;
+ controlName = (*it).first;
break;
}
}
// no filter type found in the map, must be a custom filter
- if(controlName.empty())
- controlName="filter_type_custom";
+ if (controlName.empty())
+ {
+ controlName = "filter_type_custom";
+ }
}
mFilterComboBox->setValue(controlName);
}
-// ## Zi: Filter dropdown
+// Filter dropdown
//static
BOOL LLPanelMainInventory::incrementalFind(LLFolderViewItem* first_item, const char *find_text, BOOL backward)
@@ -801,7 +797,7 @@ void LLPanelMainInventory::onFilterSelected()
setFilterSubString(mFilterSubString);
}
// Separate search for inventory tabs from Satomi Ahn (FIRE-913 & FIRE-6862)
- LLInventoryFilter &filter = mActivePanel->getFilter();
+ LLInventoryFilter& filter = mActivePanel->getFilter();
LLFloaterInventoryFinder *finder = getFinder();
if (finder)
{
@@ -812,7 +808,7 @@ void LLPanelMainInventory::onFilterSelected()
// If our filter is active we may be the first thing requiring a fetch so we better start it here.
LLInventoryModelBackgroundFetch::instance().start();
}
- updateFilterDropdown(&filter); // ## Zi: Filter dropdown
+ updateFilterDropdown(&filter); // Filter dropdown
setFilterTextFromFilter();
}
@@ -930,7 +926,7 @@ void LLPanelMainInventory::updateItemcountText()
{
text = getString("ItemcountUnknown", string_args);
}
-
+
mCounterCtrl->setValue(text);
}
@@ -948,7 +944,7 @@ void LLPanelMainInventory::onFocusReceived()
void LLPanelMainInventory::setFilterTextFromFilter()
{
- //mFilterText = mActivePanel->getFilter().getFilterText();
+ //mFilterText = mActivePanel->getFilter().getFilterText();
// Filter dropdown
// this method gets called by the filter subwindow (once every frame), so we update our combo box here
LLInventoryFilter &filter = mActivePanel->getFilter();
@@ -1671,7 +1667,7 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata)
return FALSE;
}
-// ## Zi: Filter Links Menu
+// Filter Links Menu
void LLPanelMainInventory::onFilterLinksChecked(const LLSD& userdata)
{
const std::string command_name = userdata.asString();
@@ -1711,9 +1707,9 @@ BOOL LLPanelMainInventory::isFilterLinksChecked(const LLSD& userdata)
return FALSE;
}
-// ## Zi: Filter Links Menu
+// Filter Links Menu
-// ## Zi: Extended Inventory Search
+// Extended Inventory Search
void LLPanelMainInventory::onSearchTargetChecked(const LLSD& userdata)
{
getActivePanel()->setFilterSubStringTarget(userdata.asString());
@@ -1730,31 +1726,31 @@ BOOL LLPanelMainInventory::isSearchTargetChecked(const LLSD& userdata)
const std::string command_name = userdata.asString();
if (command_name == "name")
{
- return (getSearchTarget()==LLInventoryFilter::SUBST_TARGET_NAME);
+ return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_NAME);
}
if (command_name == "creator")
{
- return (getSearchTarget()==LLInventoryFilter::SUBST_TARGET_CREATOR);
+ return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_CREATOR);
}
if (command_name == "description")
{
- return (getSearchTarget()==LLInventoryFilter::SUBST_TARGET_DESCRIPTION);
+ return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_DESCRIPTION);
}
if (command_name == "uuid")
{
- return (getSearchTarget()==LLInventoryFilter::SUBST_TARGET_UUID);
+ return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_UUID);
}
if (command_name == "all")
{
- return (getSearchTarget()==LLInventoryFilter::SUBST_TARGET_ALL);
+ return (getSearchTarget() == LLInventoryFilter::SUBST_TARGET_ALL);
}
return FALSE;
}
-// ## Zi: Extended Inventory Search
+// Extended Inventory Search
bool LLPanelMainInventory::handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept)
{
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index dd9108708a..a4d2e4f66a 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -153,7 +153,6 @@ private:
std::string mFilterSubString;
S32 mItemCount;
std::string mItemCountString;
- LLTextBox* mItemcountText;
// Filter dropdown
LLComboBox* mFilterComboBox;
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index 2e01d84399..5740fcef62 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -772,6 +772,18 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// [/RLVa:KB]
}
items.push_back(std::string("Task Properties"));
+// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
+ items.push_back(std::string("Task Rename"));
+ if ( (!isItemRenameable()) || ((flags & FIRST_SELECTED_ITEM) == 0) )
+ {
+ disabled_items.push_back(std::string("Task Rename"));
+ }
+ items.push_back(std::string("Task Remove"));
+ if (!isItemRemovable())
+ {
+ disabled_items.push_back(std::string("Task Remove"));
+ }
+// [/RLVa:KB]
// if(isItemRenameable())
// {
// items.push_back(std::string("Task Rename"));
@@ -784,18 +796,6 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
// {
// items.push_back(std::string("Task Remove"));
// }
-// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Added: RLVa-1.2.1f
- items.push_back(std::string("Task Rename"));
- items.push_back(std::string("Task Remove"));
- if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
- {
- disabled_items.push_back(std::string("Task Rename"));
- }
- if (!isItemRemovable())
- {
- disabled_items.push_back(std::string("Task Remove"));
- }
-// [/RLVa:KB]
hide_context_entries(menu, items, disabled_items);
}
@@ -1294,6 +1294,7 @@ void LLTaskNotecardBridge::openItem()
{
return;
}
+
// [RLVa:KB] - Checked: 2010-03-27 (RLVa-1.2.0b) | Modified: RLVa-1.2.0b
if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.isLockedAttachment(object->getRootEdit())) )
{
diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp
index 84662bd194..740aabbc5c 100644
--- a/indra/newview/llpaneloutfitedit.cpp
+++ b/indra/newview/llpaneloutfitedit.cpp
@@ -76,6 +76,7 @@
// [RLVa:KB] - Checked: 2010-09-16 (RLVa-1.2.1a)
#include "rlvhandler.h"
// [/RLVa:KB]
+#include "llresmgr.h"
static LLPanelInjector t_outfit_edit("panel_outfit_edit");
@@ -1073,9 +1074,11 @@ void LLPanelOutfitEdit::filterWearablesBySelectedItem(void)
case LLAssetType::AT_BODYPART:
applyListViewFilter(LVIT_BODYPART);
break;
- case LLAssetType::AT_GESTURE:
- applyListViewFilter(LVIT_GESTURES);
- break;
+ // FIRE-19480 / BUG-20032: Selected wearable type in Edit Outfit -> Add more is off by 1
+ //case LLAssetType::AT_GESTURE:
+ // applyListViewFilter(LVIT_GESTURES);
+ // break;
+ //
case LLAssetType::AT_CLOTHING:
default:
applyListViewFilter(LVIT_CLOTHING);
@@ -1437,8 +1440,12 @@ void LLPanelOutfitEdit::saveListSelection()
// Show avatar complexity in appearance floater
void LLPanelOutfitEdit::updateAvatarComplexity(U32 complexity)
{
- mAvatarComplexityLabel->setTextArg("[WEIGHT]", llformat("%d", complexity));
- mAvatarComplexityAddingLabel->setTextArg("[WEIGHT]", llformat("%d", complexity));
+ std::string complexity_string;
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+ mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);
+ mAvatarComplexityAddingLabel->setTextArg("[WEIGHT]", complexity_string);
}
//
diff --git a/indra/newview/llpaneloutfitedit.h b/indra/newview/llpaneloutfitedit.h
index a33f83f21b..719a069817 100644
--- a/indra/newview/llpaneloutfitedit.h
+++ b/indra/newview/llpaneloutfitedit.h
@@ -80,7 +80,7 @@ public:
{
LVIT_ALL = 0,
LVIT_CLOTHING,
- LVIT_GESTURES,
+ //LVIT_GESTURES, // FIRE-19480 / BUG-20032: Selected wearable type in Edit Outfit -> Add more is off by 1
LVIT_BODYPART,
LVIT_ATTACHMENT,
LVIT_SHAPE,
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 353c2f9d4e..21471cb864 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -75,6 +75,10 @@
#include "llagentui.h"
#include "llslurl.h"
#include "llevents.h" // for LLEventPumps
+// [RLVa:KB] - Checked: RLVa-1.2.2
+#include "rlvactions.h"
+// [/RLVa:KB]
+
// Firestorm includes
#include "fscommon.h"
@@ -82,7 +86,6 @@
#include "lggcontactsets.h"
#include "llcombobox.h"
#include "lllayoutstack.h"
-#include "rlvhandler.h"
#include
@@ -693,7 +696,7 @@ BOOL LLPanelPeople::postBuild()
//mNearbyList->setShowIcons("NearbyListShowIcons");
//mNearbyList->setShowCompleteName(!gSavedSettings.getBOOL("NearbyListHideUsernames"));
// Firestorm radar
-// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
+// [RLVa:KB] - Checked: RLVa-1.2.0
// Externalized to FSRadar
//mNearbyList->setRlvCheckShowNames(true);
// [/RLVa:KB]
@@ -1010,7 +1013,7 @@ void LLPanelPeople::updateFacebookList(bool visible)
void LLPanelPeople::updateButtons()
{
std::string cur_tab = getActiveTabName();
-// [RLVa:KB] - Checked: 2013-05-06 (RLVa-1.4.9)
+// [RLVa:KB] - Checked: RLVa-1.4.9
bool nearby_tab_active = (cur_tab == NEARBY_TAB_NAME);
// [/RLVa:KB]
bool friends_tab_active = (cur_tab == FRIENDS_TAB_NAME);
@@ -1060,7 +1063,7 @@ void LLPanelPeople::updateButtons()
//if (cur_panel->hasChild("add_friend_btn", TRUE))
// cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self);
if (!nearby_tab_active && cur_panel->hasChild("add_friend_btn", TRUE))
- cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+ cur_panel->getChildView("add_friend_btn")->setEnabled(item_selected && !is_friend && !is_self && RlvActions::canShowName(RlvActions::SNC_DEFAULT, selected_id));
// RLVa check
if (friends_tab_active)
@@ -1077,6 +1080,16 @@ void LLPanelPeople::updateButtons()
}
}
}
+
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (nearby_tab_active) && (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) )
+ {
+ bool fCanShowNames = true;
+ std::for_each(selected_uuids.begin(), selected_uuids.end(), [&fCanShowNames](const LLUUID& idAgent) { fCanShowNames &= RlvActions::canShowName(RlvActions::SNC_DEFAULT, idAgent); });
+ if (!fCanShowNames)
+ item_selected = multiple_selected = false;
+ }
+// [/RLBa:KB]
}
std::string LLPanelPeople::getActiveTabName() const
@@ -1323,6 +1336,13 @@ void LLPanelPeople::onAvatarListDoubleClicked(LLUICtrl* ctrl)
return;
}
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ if ( (RlvActions::isRlvEnabled()) && (NEARBY_TAB_NAME == getActiveTabName()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, clicked_id)) )
+ {
+ return;
+ }
+// [/RLVa:KB]
+
#if 0 // SJB: Useful for testing, but not currently functional or to spec
LLAvatarActions::showProfile(clicked_id);
#else // spec says open IM window
@@ -1439,6 +1459,15 @@ void LLPanelPeople::onImButtonClicked()
{
uuid_vec_t selected_uuids;
getCurrentItemIDs(selected_uuids);
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ if ( (RlvActions::isRlvEnabled()) && (NEARBY_TAB_NAME == getActiveTabName()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) )
+ {
+ bool fCanShowNames = true;
+ std::for_each(selected_uuids.begin(), selected_uuids.end(), [&fCanShowNames](const LLUUID& idAgent) { fCanShowNames &= RlvActions::canShowName(RlvActions::SNC_DEFAULT, idAgent); });
+ if (!fCanShowNames)
+ return;
+ }
+// [/RLVa:KB]
if ( selected_uuids.size() == 1 )
{
// if selected only one person then start up IM
diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h
index dfec38fdcc..17747f2d1f 100644
--- a/indra/newview/llpanelpeople.h
+++ b/indra/newview/llpanelpeople.h
@@ -69,6 +69,10 @@ public:
bool mTryToConnectToFacebook;
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ LLAvatarList* getNearbyList() { return mNearbyList; }
+// [/RLVa:KB]
+
// internals
class Updater;
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 0fcf685c6a..735cebb599 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -48,7 +48,9 @@
#include "llvoavatarself.h"
#include "roles_constants.h"
#include "llinventorybridge.h" // CHUI merge
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
+// [/RLVa:KB]
namespace LLPanelPeopleMenus
{
@@ -210,7 +212,10 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
for (;id != uuids_end; ++id)
{
- if ( LLAvatarActions::isFriend(*id) )
+// if ( LLAvatarActions::isFriend(*id) )
+// [RLVa:KB] - Checked: 2014-03-31 (RLVa-2.0.1)
+ if ( (LLAvatarActions::isFriend(*id)) || (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, *id)) )
+// [/RLVa:KB]
{
result = false;
break;
@@ -233,7 +238,10 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
for (;id != uuids_end; ++id)
{
- if ( !LLAvatarActions::isFriend(*id) )
+// if ( !LLAvatarActions::isFriend(*id) )
+// [RLVa:KB] - Checked: 2014-03-31 (RLVa-2.0.1)
+ if ( (!LLAvatarActions::isFriend(*id)) || (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, *id)) )
+// [/RLVa:KB]
{
result = false;
break;
@@ -276,7 +284,7 @@ bool PeopleContextMenu::enableContextMenuItem(const LLSD& userdata)
// FIRE-8804: Prevent opening inventory from using share in radar context menu
else if (item == std::string("can_open_inventory"))
{
- return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWINV));
+ return (!RlvActions::hasBehaviour(RLV_BHVR_SHOWINV));
}
//
else if (item == std::string("can_callog"))
@@ -352,14 +360,29 @@ void PeopleContextMenu::requestTeleport()
{
// boost::bind cannot recognize overloaded method LLAvatarActions::teleportRequest(),
// so we have to use a wrapper.
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvCanShowName = (!m_fRlvCheck) || (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mUUIDs.front()));
+ RlvActions::setShowName(RlvActions::SNC_TELEPORTREQUEST, fRlvCanShowName);
LLAvatarActions::teleportRequest(mUUIDs.front());
+ RlvActions::setShowName(RlvActions::SNC_TELEPORTREQUEST, true);
+// [/RLVa:KB]
+// LLAvatarActions::teleportRequest(mUUIDs.front());
}
void PeopleContextMenu::offerTeleport()
{
// boost::bind cannot recognize overloaded method LLAvatarActions::offerTeleport(),
// so we have to use a wrapper.
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvCanShowName = true;
+ if ( (m_fRlvCheck) && (RlvActions::isRlvEnabled()) )
+ std::for_each(mUUIDs.begin(), mUUIDs.end(), [&fRlvCanShowName](const LLUUID& idAgent) { fRlvCanShowName &= RlvActions::canShowName(RlvActions::SNC_DEFAULT, idAgent); });
+
+ RlvActions::setShowName(RlvActions::SNC_TELEPORTOFFER, fRlvCanShowName);
LLAvatarActions::offerTeleport(mUUIDs);
+ RlvActions::setShowName(RlvActions::SNC_TELEPORTOFFER, true);
+// [/RLVa:KB]
+// LLAvatarActions::offerTeleport(mUUIDs);
}
void PeopleContextMenu::eject()
@@ -422,7 +445,29 @@ void NearbyPeopleContextMenu::buildContextMenu(class LLMenuGL& menu, U32 flags)
menuentry_vec_t items;
menuentry_vec_t disabled_items;
- if (flags & ITEM_IN_MULTI_SELECTION)
+// [RLVa:KB] - Checked: RLVa-1.5.0
+ bool fRlvCanShowName = true;
+ if ( (m_fRlvCheck) && (RlvActions::isRlvEnabled()) )
+ std::for_each(mUUIDs.begin(), mUUIDs.end(), [&fRlvCanShowName](const LLUUID& idAgent) { fRlvCanShowName &= RlvActions::canShowName(RlvActions::SNC_DEFAULT, idAgent); });
+
+ if (!fRlvCanShowName)
+ {
+ if (flags & ITEM_IN_MULTI_SELECTION)
+ {
+ items.push_back(std::string("offer_teleport"));
+ }
+ else
+ {
+ items.push_back(std::string("offer_teleport"));
+ items.push_back(std::string("request_teleport"));
+ items.push_back(std::string("separator_invite_to_group"));
+ items.push_back(std::string("zoom_in"));
+ items.push_back(std::string("block_unblock"));
+ }
+ }
+ else if (flags & ITEM_IN_MULTI_SELECTION)
+// [/RLVa:KB]
+// if (flags & ITEM_IN_MULTI_SELECTION)
{
items.push_back(std::string("add_friends"));
items.push_back(std::string("remove_friends"));
diff --git a/indra/newview/llpanelpeoplemenus.h b/indra/newview/llpanelpeoplemenus.h
index a0348c7fe2..c0417f808e 100644
--- a/indra/newview/llpanelpeoplemenus.h
+++ b/indra/newview/llpanelpeoplemenus.h
@@ -38,6 +38,9 @@ namespace LLPanelPeopleMenus
class PeopleContextMenu : public LLListContextMenu
{
public:
+// [RLVa:KB] - Checked: RLVa-1.5.0
+ PeopleContextMenu() : m_fRlvCheck(false) {}
+// [/RLVa:KB]
/*virtual*/ LLContextMenu* createMenu();
protected:
@@ -54,6 +57,10 @@ private:
// Add to contact set
void addToContactSet();
+// [RLVa:KB] - Checked: RLVa-1.5.0
+protected:
+ bool m_fRlvCheck;
+// [/RLVa:KB]
};
/**
@@ -61,6 +68,10 @@ private:
*/
class NearbyPeopleContextMenu : public PeopleContextMenu
{
+// [RLVa:KB] - Checked: RLVa-1.5.0
+public:
+ NearbyPeopleContextMenu() : PeopleContextMenu() { m_fRlvCheck = true; }
+// [/RLVa:KB]
protected:
/*virtual*/ void buildContextMenu(class LLMenuGL& menu, U32 flags);
};
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 5cf920461a..27f926b54a 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -65,7 +65,8 @@
#include "lltrans.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a)
#include "llslurl.h"
-#include "rlvhandler.h"
+#include "rlvactions.h"
+#include "rlvcommon.h"
// [/RLVa:KB]
// For OpenSim export permisson
#include "lfsimfeaturehandler.h"
@@ -462,17 +463,17 @@ void LLPanelPermissions::refresh()
// getChildView("Owner Name")->setEnabled(TRUE);
// [RLVa:KB] - Moved further down to avoid an annoying flicker when the text is set twice in a row
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) )
{
// Only anonymize the creator if all of the selection was created by the same avie who's also the owner or they're a nearby avie
- //if ( (creators_identical) && (mCreatorID != gAgent.getID()) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
- // creator_name = LLSLURL("agent", mCreatorID, "rlvanonym").getSLURLString();
+ if ( (creators_identical) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, mCreatorID)) && ((mCreatorID == mOwnerID) || (RlvUtil::isNearbyAgent(mCreatorID))) )
+ creator_name = LLSLURL("agent", mCreatorID, "rlvanonym").getSLURLString();
// Only anonymize the owner name if all of the selection is owned by the same avie and isn't group owned
- if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (mOwnerID != gAgent.getID()) )
+ if ( (owners_identical) && (!LLSelectMgr::getInstance()->selectIsGroupOwned()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, mOwnerID)) )
owner_name = LLSLURL("agent", mOwnerID, "rlvanonym").getSLURLString();
-
+
// Only anonymize the last owner name if all of the selection was last owned by the same avie
if ( (last_owners_identical) && (mLastOwnerID != gAgent.getID()) )
last_owner_name = LLSLURL("agent", mLastOwnerID, "rlvanonym").getSLURLString();
diff --git a/indra/newview/llpanelwearing.cpp b/indra/newview/llpanelwearing.cpp
index 67fa993360..1b085ad82e 100644
--- a/indra/newview/llpanelwearing.cpp
+++ b/indra/newview/llpanelwearing.cpp
@@ -45,6 +45,7 @@
#include "rlvhandler.h"
// [/RLVa:KB]
#include "lltextbox.h"
+#include "llresmgr.h"
// Context menu and Gear menu helper.
static void edit_outfit()
@@ -367,7 +368,11 @@ void LLPanelWearing::copyToClipboard()
// Show avatar complexity in appearance floater
void LLPanelWearing::updateAvatarComplexity(U32 complexity)
{
- mAvatarComplexityLabel->setTextArg("[WEIGHT]", llformat("%d", complexity));
+ std::string complexity_string;
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+ mAvatarComplexityLabel->setTextArg("[WEIGHT]", complexity_string);
}
//
// EOF
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index c4e5f18c81..1cb8b3efe4 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -321,6 +321,9 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, std::string n
gSavedSettings.setString("PresetGraphicActive", name);
}
+ // Update indirect controls
+ LLAvatarComplexityControls::setIndirectControls();
+
LLFloaterPreference* instance = LLFloaterReg::findTypedInstance("preferences");
if (instance)
{
diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp
index e138a1bbe9..9eaeb51cca 100644
--- a/indra/newview/llpreviewnotecard.cpp
+++ b/indra/newview/llpreviewnotecard.cpp
@@ -467,11 +467,30 @@ void LLPreviewNotecard::finishInventoryUpload(LLUUID itemId, LLUUID newAssetId,
{
nc->refreshFromInventory(newItemId);
}
- // FIRE-9039: Close notecard after choosing "Save" in close confirmation
- nc->checkCloseAfterSave();
+ // FIRE-9039: Close notecard after choosing "Save" in close confirmation
+ nc->checkCloseAfterSave();
}
}
+void LLPreviewNotecard::finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUID taskId)
+{
+
+ LLSD floater_key;
+ floater_key["taskid"] = taskId;
+ floater_key["itemid"] = itemId;
+ LLPreviewNotecard* nc = LLFloaterReg::findTypedInstance("preview_notecard", floater_key);
+ if (nc)
+ {
+ if (nc->hasEmbeddedInventory())
+ {
+ gVFS->removeFile(newAssetId, LLAssetType::AT_NOTECARD);
+ }
+ nc->setAssetId(newAssetId);
+ nc->refreshFromInventory();
+ // FIRE-9039: Close notecard after choosing "Save" in close confirmation
+ nc->checkCloseAfterSave();
+ }
+}
bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
{
@@ -520,7 +539,7 @@ bool LLPreviewNotecard::saveIfNeeded(LLInventoryItem* copyitem)
else if (!mObjectUUID.isNull() && !task_url.empty())
{
uploadInfo = LLResourceUploadInfo::ptr_t(new LLBufferedAssetUploadInfo(mObjectUUID, mItemUUID, LLAssetType::AT_NOTECARD, buffer,
- boost::bind(&LLPreviewNotecard::finishInventoryUpload, _1, _3, LLUUID::null)));
+ boost::bind(&LLPreviewNotecard::finishTaskUpload, _1, _3, mObjectUUID)));
url = task_url;
}
diff --git a/indra/newview/llpreviewnotecard.h b/indra/newview/llpreviewnotecard.h
index f55a7012d7..551fedfe33 100644
--- a/indra/newview/llpreviewnotecard.h
+++ b/indra/newview/llpreviewnotecard.h
@@ -108,6 +108,7 @@ protected:
bool handleConfirmDeleteDialog(const LLSD& notification, const LLSD& response);
static void finishInventoryUpload(LLUUID itemId, LLUUID newAssetId, LLUUID newItemId);
+ static void finishTaskUpload(LLUUID itemId, LLUUID newAssetId, LLUUID taskId);
// FIRE-13969: Search button
void onSearchButtonClicked();
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 2bcdc34212..d6596ba99d 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -141,6 +141,9 @@ LLPreviewTexture::~LLPreviewTexture()
if (mImage.notNull())
{
mImage->setBoostLevel(mImageOldBoostLevel);
+ // Remove NO_DELETE texture state so image gets removed from memory (set by calling setBoostLevel(LLGLTexture::BOOST_PREVIEW))
+ mImage->forceActive();
+ //
mImage = NULL;
}
}
diff --git a/indra/newview/llsearchhistory.cpp b/indra/newview/llsearchhistory.cpp
index 0ea05a03d6..0c643a5b0a 100644
--- a/indra/newview/llsearchhistory.cpp
+++ b/indra/newview/llsearchhistory.cpp
@@ -116,7 +116,7 @@ void LLSearchHistory::addEntry(const std::string& search_query)
mSearchHistory.push_front(item);
}
-bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right)
+bool LLSearchHistory::LLSearchHistoryItem::operator < (const LLSearchHistory::LLSearchHistoryItem& right) const
{
S32 result = LLStringUtil::compareInsensitive(search_query, right.search_query);
diff --git a/indra/newview/llsearchhistory.h b/indra/newview/llsearchhistory.h
index 3309a8fcac..11d03f8173 100644
--- a/indra/newview/llsearchhistory.h
+++ b/indra/newview/llsearchhistory.h
@@ -98,7 +98,7 @@ public:
/**
* Allows std::list sorting
*/
- bool operator < (const LLSearchHistory::LLSearchHistoryItem& right);
+ bool operator < (const LLSearchHistory::LLSearchHistoryItem& right) const;
/**
* Allows std::list sorting
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 8af9a06dfe..5a4334a4ff 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -99,6 +99,7 @@
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvactions.h"
#include "rlvhandler.h"
+#include "rlvhelper.h"
// [/RLVa:KB]
// Aurora Sim
#include "llviewernetwork.h"
@@ -4394,7 +4395,7 @@ void LLSelectMgr::convertTransient()
void LLSelectMgr::deselectAllIfTooFar()
{
-// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
+// [RLVa:KB] - Checked: RLVa-1.3.0
if ( (!mSelectedObjects->isEmpty()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_EDITOBJ))) )
{
struct NotTransientOrFocusedMediaOrEditable : public LLSelectedNodeFunctor
@@ -4402,8 +4403,7 @@ void LLSelectMgr::deselectAllIfTooFar()
bool apply(LLSelectNode* pNode)
{
const LLViewerObject* pObj = pNode->getObject();
- return (!pNode->isTransient()) && (pObj) && (!gRlvHandler.canEdit(pObj)) &&
- (pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID());
+ return (!pNode->isTransient()) && (pObj) && (!RlvActions::canEdit(pObj)) && (pObj->getID() != LLViewerMediaFocus::getInstance()->getFocusedObjectID());
}
} f;
if (mSelectedObjects->getFirstRootNode(&f, TRUE))
@@ -4416,15 +4416,13 @@ void LLSelectMgr::deselectAllIfTooFar()
return;
}
-// [RLVa:KB] - Checked: 2010-05-03 (RLVa-1.2.0g) | Modified: RLVa-1.1.0l
-#ifdef RLV_EXTENSION_CMD_INTERACT
- // [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact=n restricted
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ // [Fall-back code] Don't allow an active selection (except for HUD attachments - see above) when @interact restricted
if (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT))
{
deselectAll();
return;
}
-#endif // RLV_EXTENSION_CMD_INTERACT
// [/RLVa:KB]
// HACK: Don't deselect when we're navigating to rate an object's
@@ -4437,6 +4435,8 @@ void LLSelectMgr::deselectAllIfTooFar()
LLVector3d selectionCenter = getSelectionCenterGlobal();
// if (gSavedSettings.getBOOL("LimitSelectDistance")
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
+ static RlvCachedBehaviourModifier s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST);
+
BOOL fRlvFartouch = gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH) && gFloaterTools->getVisible();
if ( (gSavedSettings.getBOOL("LimitSelectDistance") || (fRlvFartouch) )
// [/RLVa:KB]
@@ -4447,7 +4447,7 @@ void LLSelectMgr::deselectAllIfTooFar()
{
// F32 deselect_dist = gSavedSettings.getF32("MaxSelectDistance");
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
- F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5f;
+ F32 deselect_dist = (!fRlvFartouch) ? gSavedSettings.getF32("MaxSelectDistance") : s_nFartouchDist;
// [/RLVa:KB]
F32 deselect_dist_sq = deselect_dist * deselect_dist;
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 37a8397c82..c43fef98cc 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -46,8 +46,9 @@
#include "llviewerobjectlist.h"
#include "llexperiencecache.h"
#include "lltrans.h"
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
+#include "rlvcommon.h"
// [/RLVa:KB]
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -361,13 +362,16 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// std::string name =
// LLSLURL("agent", creator_id, "completename").getSLURLString();
// getChildView("BtnCreator")->setEnabled(TRUE);
-// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-2.0.1
// If the object creator matches the object owner we need to anonymize the creator field as well
- bool fRlvFilterCreator = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
- ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == creator_id) && (perm.getOwner() != gAgent.getID())) ||
- (RlvUtil::isNearbyAgent(item->getCreatorUUID())) );
- std::string name = LLSLURL("agent", creator_id, (!fRlvFilterCreator) ? "completename" : "rlvanonym").getSLURLString();
- getChildView("BtnCreator")->setEnabled(!fRlvFilterCreator);
+ bool fRlvCanShowCreator = true;
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, creator_id)) &&
+ ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == creator_id) ) || (RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
+ {
+ fRlvCanShowCreator = false;
+ }
+ std::string name = LLSLURL("agent", creator_id, (fRlvCanShowCreator) ? "completename" : "rlvanonym").getSLURLString();
+ getChildView("BtnCreator")->setEnabled(fRlvCanShowCreator);
// [/RLVa:KB]
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
getChildView("LabelCreatorName")->setEnabled(FALSE);
@@ -386,6 +390,9 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
////////////////
if(perm.isOwned())
{
+// [RLVa:KB] - Checked: RVLa-2.0.1
+ bool fRlvCanShowOwner = true;
+// [/RLVa:KB]
std::string name;
if (perm.isGroupOwned())
{
@@ -395,14 +402,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
{
LLUUID owner_id = perm.getOwner();
// name = LLSLURL("agent", owner_id, "completename").getSLURLString();
-// [RLVa:KB] - Checked: 2010-11-01 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- bool fRlvFilterOwner = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (owner_id != gAgent.getID());
- name = LLSLURL("agent", owner_id, (!fRlvFilterOwner) ? "completename" : "rlvanonym").getSLURLString();
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ fRlvCanShowOwner = RlvActions::canShowName(RlvActions::SNC_DEFAULT, owner_id);
+ name = LLSLURL("agent", owner_id, (fRlvCanShowOwner) ? "completename" : "rlvanonym").getSLURLString();
// [/RLVa:KB]
}
// getChildView("BtnOwner")->setEnabled(TRUE);
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Added: RLVa-1.0.0e
- getChildView("BtnOwner")->setEnabled(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ getChildView("BtnOwner")->setEnabled(fRlvCanShowOwner);
// [/RLVa:KB]
getChildView("LabelOwnerTitle")->setEnabled(TRUE);
getChildView("LabelOwnerName")->setEnabled(FALSE);
@@ -760,12 +767,12 @@ void LLSidepanelItemInfo::onClickCreator()
if(!item) return;
if(!item->getCreatorUUID().isNull())
{
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Added: RLVa-1.2.1b
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+// [RLVa:KB] - Checked: RLVa-1.2.1
+ const LLUUID& idCreator = item->getCreatorUUID();
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idCreator)) )
{
const LLPermissions& perm = item->getPermissions();
- if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) && (perm.getOwner() != gAgent.getID())) ||
- (RlvUtil::isNearbyAgent(item->getCreatorUUID())) )
+ if ( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == idCreator) ) || (RlvUtil::isNearbyAgent(idCreator)) )
{
return;
}
@@ -786,8 +793,8 @@ void LLSidepanelItemInfo::onClickOwner()
}
else
{
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (item->getPermissions().getOwner() != gAgent.getID()) )
+// [RLVa:KB] - Checked: RLVa-1.0.0
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, item->getPermissions().getOwner())) )
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(item->getPermissions().getOwner());
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 638dee5066..350f863eb3 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -192,6 +192,10 @@
#include "llvoicechannel.h"
#include "llpathfindingmanager.h"
+// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0a)
+#include "rlvhandler.h"
+// [/RLVa:KB]
+
#include "lllogin.h"
#include "llevents.h"
#include "llstartuplistener.h"
@@ -211,6 +215,7 @@
#include "growlmanager.h"
#endif
+#include "fsavatarrenderpersistence.h"
#include "fscommon.h"
#include "fsdata.h"
#include "fsfloatercontacts.h"
@@ -232,7 +237,6 @@
#include "llprogressview.h"
#include "lltoolbarview.h"
#include "NACLantispam.h"
-#include "rlvhandler.h"
#include "streamtitledisplay.h"
#include "tea.h"
@@ -1371,11 +1375,7 @@ bool idle_startup()
// All accounts have both a home and a last location, and we don't support
// more locations than that. Choose the appropriate one. JC
// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d
-#ifndef RLV_EXTENSION_STARTLOCATION
- if (rlv_handler_t::isEnabled())
-#else
if ( (rlv_handler_t::isEnabled()) && (RlvSettings::getLoginLastLocation()) )
-#endif // RLV_EXTENSION_STARTLOCATION
{
// Force login at the last location
LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
@@ -1922,6 +1922,9 @@ bool idle_startup()
// Otherwise it is only create if isChatMultriTab() == true and LLIMFloaterContainer::getInstance is called
// Moved here from llfloaternearbyvchat.cpp by Zi, to make this work even if LogShowHistory is FALSE
LLFloater *pContacts(FSFloaterContacts::getInstance());
+
+ // Load persisted avatar render settings
+ FSAvatarRenderPersistence::instance().init();
// Do something with pContacts so no overzealous optimizer optimzes our neat little call to FSFloaterContacts::getInstance() away.
if( pContacts )
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index 9b24136b38..7a5668b28d 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -110,7 +110,6 @@
//
#include "fssearchableui.h"
-
//
// Globals
//
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 8910de059c..61e1660f4d 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1166,6 +1166,13 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
LLTextureCtrl::~LLTextureCtrl()
{
closeDependentFloater();
+
+ // Remove NO_DELETE texture state so image gets removed from memory (set by calling setBoostLevel(LLGLTexture::BOOST_PREVIEW))
+ if (mTexturep.notNull())
+ {
+ mTexturep->forceActive();
+ }
+ //
}
void LLTextureCtrl::setShowLoadingPlaceholder(BOOL showLoadingPlaceholder)
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 07d1753777..ad8aadd806 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1865,11 +1865,11 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
}
else
{
-// rez_attachment(item, 0);
// [SL:KB] - Patch: Appearance-DnDWear | Checked: 2010-09-28 (Catznip-2.2)
// Make this behave consistent with dad3dWearItem
rez_attachment(item, 0, !(mask & MASK_CONTROL));
// [/SL:KB]
+// rez_attachment(item, 0);
}
}
return ACCEPT_YES_SINGLE;
diff --git a/indra/newview/lltoolface.cpp b/indra/newview/lltoolface.cpp
index ac2700949a..8405e1ee0a 100644
--- a/indra/newview/lltoolface.cpp
+++ b/indra/newview/lltoolface.cpp
@@ -40,6 +40,7 @@
#include "llviewerwindow.h"
#include "llfloatertools.h"
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
+#include "rlvactions.h"
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -112,7 +113,7 @@ void LLToolFace::pickCallback(const LLPickInfo& pick_info)
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
if ( (rlv_handler_t::isEnabled()) &&
- ( (!gRlvHandler.canEdit(hit_obj)) ||
+ ( (!RlvActions::canEdit(hit_obj)) ||
((gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (!gRlvHandler.canTouch(hit_obj, pick_info.mObjectOffset))) ) )
{
return;
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 0c3a537c41..ab46967160 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -146,7 +146,10 @@ BOOL LLToolGrab::handleMouseDown(S32 x, S32 y, MASK mask)
// call the base class to propogate info to sim
LLTool::handleMouseDown(x, y, mask);
- if (!gAgent.leftButtonBlocked())
+ // FIRE-19357: Hotfixing mouse capture in mouselook issue with minimal impact workaround for now
+ //if (!gAgent.leftButtonBlocked())
+ if ((gAgentCamera.cameraMouselook() && !gAgent.leftButtonGrabbed()) || (!gAgentCamera.cameraMouselook() && !gAgent.leftButtonBlocked()))
+ //
{
// can grab transparent objects (how touch event propagates, scripters rely on this)
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 5c14ecab43..f2f3b640f3 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -74,6 +74,7 @@
#include "llweb.h"
#include "pipeline.h" // setHighlightObject
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c)
+#include "rlvactions.h"
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -477,7 +478,7 @@ ECursorType LLToolPie::cursorFromObject(LLViewerObject* object)
// if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // not already sitting?
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0g
if ( (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) &&
- ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, LLToolPie::getInstance()->getHoverPick().mObjectOffset))) )
+ ((!rlv_handler_t::isEnabled()) || (RlvActions::canSit(object, LLToolPie::getInstance()->getHoverPick().mObjectOffset))) )
// [/RLVa:KB]
{
cursor = UI_CURSOR_TOOLSIT;
@@ -609,6 +610,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
}
// [/RLVa:KB]
LLSelectMgr::getInstance()->setHoverObject(object, mHoverPick.mObjectFace);
+
if (object)
{
parent = object->getRootEdit();
@@ -752,10 +754,24 @@ BOOL LLToolPie::handleMouseUp(S32 x, S32 y, MASK mask)
FALSE /* ignore transparent */,
FALSE /* ignore particles */);
- if (!mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick
- && (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land
- || mPick.mObjectID.notNull())) // or on an object
+// if (!mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick
+// && (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land
+// || mPick.mObjectID.notNull())) // or on an object
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ bool fValidPick = (!mPick.mPosGlobal.isExactlyZero() // valid coordinates for pick
+ && (mPick.mPickType == LLPickInfo::PICK_LAND // we clicked on land
+ || mPick.mObjectID.notNull())); // or on an object
+
+ if ( (fValidPick) && (RlvActions::isRlvEnabled()) && (!RlvActions::canTeleportToLocal(mPick.mPosGlobal)) )
+ {
+ RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_AUTOPILOT);
+ fValidPick = false;
+ }
+
+ if (fValidPick)
+// [/RLVa:KB]
{
+
// handle special cases of steering picks
LLViewerObject* avatar_object = mPick.getObject();
@@ -850,8 +866,20 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask)
}
}
- if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
- (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
+// if ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
+// (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()))
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ bool fValidPick = ((mPick.mPickType == LLPickInfo::PICK_LAND && !mPick.mPosGlobal.isExactlyZero()) ||
+ (mPick.mObjectID.notNull() && !mPick.mPosGlobal.isExactlyZero()));
+
+ if ( (fValidPick) && (RlvActions::isRlvEnabled()) && (!RlvActions::canTeleportToLocal(mPick.mPosGlobal)) )
+ {
+ RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_AUTOPILOT);
+ fValidPick = false;
+ }
+
+ if (fValidPick)
+// [/RLVa:KB]
{
walkToClickedLocation();
return TRUE;
@@ -1148,8 +1176,8 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
if (LLAvatarNameCache::get(hover_object->getID(), &av_name))
{
// final_name = av_name.getCompleteName();
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- final_name = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ final_name = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, hover_object->getID())) ? av_name.getCompleteName() : RlvStrings::getAnonym(av_name);
// [/RLVa:KB]
// Make sure group title gets added to the tool tip. This is done separately to
// the RLVa code to prevent this change from getting lost in future RLVa merges
@@ -1166,9 +1194,9 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
// *HACK: We may select this object, so pretend it was clicked
mPick = mHoverPick;
-// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.2a) | Added: RLVa-1.2.0e
+// [RLVa:KB] - Checked: RLVa-1.2.0
if ( (!rlv_handler_t::isEnabled()) ||
- ( (gRlvHandler.canTouch(hover_object, mHoverPick.mObjectOffset)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) )
+ ( (gRlvHandler.canTouch(hover_object, mHoverPick.mObjectOffset)) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, hover_object->getID())) ) )
{
// [/RLVa:KB]
LLInspector::Params p;
@@ -1488,7 +1516,15 @@ BOOL LLToolPie::handleToolTip(S32 local_x, S32 local_y, MASK mask)
// [/RLVa:KB]
LLViewerObject* hover_object = mHoverPick.getObject();
-
+
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ // NOTE: handleTooltipObject() will block HUD tooltips anyway but technically interact should only interfere with world interaction
+ if ( (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) && (hover_object) && (!hover_object->isHUDAttachment()) )
+ {
+ return TRUE;
+ }
+// [/RLVa:KB]
+
// update hover object and hover parcel
LLSelectMgr::getInstance()->setHoverObject(hover_object, mHoverPick.mObjectFace);
diff --git a/indra/newview/lltoolplacer.cpp b/indra/newview/lltoolplacer.cpp
index 44cad88644..0bc5749d0a 100644
--- a/indra/newview/lltoolplacer.cpp
+++ b/indra/newview/lltoolplacer.cpp
@@ -45,6 +45,7 @@
#include "llui.h"
// [RLVa:KB] - Checked: 2010-03-23 (RLVa-1.2.0a)
#include "rlvhandler.h"
+#include "rlvhelper.h"
// [/RLVa:KB]
//Headers added for functions moved from viewer.cpp
@@ -166,9 +167,11 @@ BOOL LLToolPlacer::raycastForNewObjPos( S32 x, S32 y, LLViewerObject** hit_obj,
// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-0.2.0f
// NOTE: don't use surface_pos_global since for prims it will be the center of the prim while we need center + offset
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && (dist_vec_squared(gAgent.getPositionGlobal(), pick.mPosGlobal) > 1.5f * 1.5f) )
+ if (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH))
{
- return FALSE;
+ static RlvCachedBehaviourModifier s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST);
+ if (dist_vec_squared(gAgent.getPositionGlobal(), pick.mPosGlobal) > s_nFartouchDist * s_nFartouchDist)
+ return FALSE;
}
// [/RLVa:KB]
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index 4f63d50fb3..38e7b3b8a8 100644
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -47,8 +47,9 @@
#include "llviewerwindow.h"
#include "llvoavatarself.h"
#include "llworld.h"
-// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.0
+#include "rlvactions.h"
+#include "rlvhelper.h"
#include "llfloaterreg.h"
// [/RLVa:KB]
@@ -86,22 +87,23 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
}
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
- if ( (object) && (rlv_handler_t::isEnabled()) )
+ if ( (object) && (RlvActions::isRlvEnabled()) )
{
- if (!gRlvHandler.canEdit(object))
+ if (!RlvActions::canEdit(object))
{
if (!temp_select)
return LLSelectMgr::getInstance()->getSelection();
else if (LLToolMgr::instance().inBuildMode())
LLToolMgr::instance().toggleBuildMode(LLSD("toggleonly"));
}
-
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!object->isAttachment()) || (!object->permYouOwner())) &&
- (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > 1.5f * 1.5f) )
+
+ if ( (RlvActions::hasBehaviour(RLV_BHVR_FARTOUCH)) && ((!object->isAttachment()) || (!object->permYouOwner())) )
{
- // NOTE: see behaviour notes for a rather lengthy explanation of why we're doing things this way
- //if (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion() + pick.mObjectOffset) > 1.5f * 1.5f)
- if (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > 1.5f * 1.5f)
+ static RlvCachedBehaviourModifier s_nFartouchDist(RLV_MODIFIER_FARTOUCHDIST);
+ float nFartouchDistSq = s_nFartouchDist * s_nFartouchDist;
+ // NOTE: recheck why we did it this way, might be able to simplify
+ if ( (dist_vec_squared(gAgent.getPositionAgent(), object->getPositionRegion()) > nFartouchDistSq) &&
+ (dist_vec_squared(gAgent.getPositionAgent(), pick.mIntersection) > nFartouchDistSq) )
{
if ( (LLFloaterReg::instanceVisible("build")) && (pick.mKeyMask != MASK_SHIFT) && (pick.mKeyMask != MASK_CONTROL) )
LLSelectMgr::getInstance()->deselectAll();
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index e2a0b684dd..cba6132df8 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -667,7 +667,10 @@ LLSD LLScriptAssetUpload::generatePostBody()
{
body["task_id"] = getTaskId();
body["item_id"] = getItemId();
- body["is_script_running"] = getIsRunning();
+ // OpenSim expects an integer here...
+ //body["is_script_running"] = getIsRunning();
+ body["is_script_running"] = (BOOL)getIsRunning();
+ //
body["target"] = (getTargetType() == MONO) ? "mono" : "lsl2";
body["experience"] = getExerienceId();
}
@@ -829,7 +832,7 @@ void LLViewerAssetUpload::HandleUploadError(LLCore::HttpStatus status, LLSD &res
else
{
reason = "Error in upload request. Please visit "
- "http://secondlife.com/support for help fixing this problem.";
+ "http://www.firestormviewer.org/support for help fixing this problem.";
}
}
diff --git a/indra/newview/llviewercamera.cpp b/indra/newview/llviewercamera.cpp
index ac09961402..4b0a36ddcd 100644
--- a/indra/newview/llviewercamera.cpp
+++ b/indra/newview/llviewercamera.cpp
@@ -41,7 +41,8 @@
#include "llworld.h"
#include "lltoolmgr.h"
#include "llviewerjoystick.h"
-// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e)
+// [RLVa:KB] - RLVa-2.0.0
+#include "rlvactions.h"
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -356,15 +357,17 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
if (limit_select_distance)
{
// ...select distance from control
-// z_far = gSavedSettings.getF32("MaxSelectDistance");
-// [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0e
- z_far = (!gRlvHandler.hasBehaviour(RLV_BHVR_FARTOUCH)) ? gSavedSettings.getF32("MaxSelectDistance") : 1.5;
-// [/RLVa:KB]
+ z_far = gSavedSettings.getF32("MaxSelectDistance");
}
else
{
z_far = gAgentCamera.mDrawDistance;
}
+
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ if (RlvActions::hasBehaviour(RLV_BHVR_FARTOUCH))
+ z_far = RlvActions::getModifierValue(RLV_MODIFIER_FARTOUCHDIST);
+// [/RLVa:KB]
}
else
{
@@ -882,6 +885,12 @@ BOOL LLViewerCamera::areVertsVisible(LLViewerObject* volumep, BOOL all_verts)
void LLViewerCamera::setDefaultFOV(F32 vertical_fov_rads)
{
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ F32 nCamFOVMin, nCamFOVMax;
+ if ( (RlvActions::isRlvEnabled()) && (RlvActions::getCameraFOVLimits(nCamFOVMin, nCamFOVMax)) )
+ vertical_fov_rads = llclamp(vertical_fov_rads, nCamFOVMin, nCamFOVMax);
+// [/RLVa:KB]
+
vertical_fov_rads = llclamp(vertical_fov_rads, getMinView(), getMaxView());
setView(vertical_fov_rads);
mCameraFOVDefault = vertical_fov_rads;
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index fdec6488ac..aceb18c327 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -78,6 +78,9 @@
#include "llslurl.h"
#include "llstartup.h"
#include "llupdaterservice.h"
+// [RLVa:KB] - Checked: 2015-12-27 (RLVa-1.5.0)
+#include "rlvcommon.h"
+// [/RLVa:KB]
// Firestorm inclues
#include "fsfloatercontacts.h"
@@ -799,7 +802,7 @@ static void handleDecimalPrecisionChanged(const LLSD& newvalue)
void handleLegacyTrimOptionChanged(const LLSD& newvalue)
{
LLAvatarName::setTrimResidentSurname(newvalue.asBoolean());
- LLAvatarNameCache::cleanupClass();
+ LLAvatarNameCache::clearCache();
LLVOAvatar::invalidateNameTags();
FSFloaterContacts::getInstance()->onDisplayNameChanged();
FSRadar::getInstance()->updateNames();
@@ -808,7 +811,7 @@ void handleLegacyTrimOptionChanged(const LLSD& newvalue)
void handleUsernameFormatOptionChanged(const LLSD& newvalue)
{
LLAvatarName::setUseLegacyFormat(newvalue.asBoolean());
- LLAvatarNameCache::cleanupClass();
+ LLAvatarNameCache::clearCache();
LLVOAvatar::invalidateNameTags();
FSFloaterContacts::getInstance()->onDisplayNameChanged();
FSRadar::getInstance()->updateNames();
@@ -1050,6 +1053,9 @@ void settings_setup_listeners()
gSavedSettings.getControl("SpellCheck")->getSignal()->connect(boost::bind(&handleSpellCheckChanged));
gSavedSettings.getControl("SpellCheckDictionary")->getSignal()->connect(boost::bind(&handleSpellCheckChanged));
gSavedSettings.getControl("LoginLocation")->getSignal()->connect(boost::bind(&handleLoginLocationChanged));
+// [RLVa:KB] - Checked: 2015-12-27 (RLVa-1.5.0)
+ gSavedSettings.getControl("RestrainedLove")->getSignal()->connect(boost::bind(&RlvSettings::onChangedSettingMain, _2));
+// [/RLVa:KB]
gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ")->getSignal()->connect(boost::bind(&handleAvatarZOffsetChanged, _2)); // Moved Avatar Z offset from RLVa to here
// Is done inside XUI now, using visibility_control
// gSavedSettings.getControl("ShowNavbarFavoritesPanel")->getSignal()->connect(boost::bind(&toggle_show_favorites_panel, _2));
@@ -1092,8 +1098,6 @@ void settings_setup_listeners()
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged));
// [FS communication UI]
- gSavedSettings.getControl(RLV_SETTING_MAIN)->getSignal()->connect(boost::bind(&RlvSettings::onChangedSettingMain, _2));
-
gSavedPerAccountSettings.getControl("GlobalOnlineStatusToggle")->getSignal()->connect(boost::bind(&handleGlobalOnlineStatusChanged, _2));
// FIRE-17393: Control HUD text fading by options
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index cafbf4f9a4..34a6e843fc 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -558,6 +558,9 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// No teleport in progress
gViewerWindow->setShowProgress(FALSE,FALSE);
gTeleportDisplay = FALSE;
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ LLViewerParcelMgr::getInstance()->onTeleportDone();
+// [/SL:KB]
break;
}
}
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index dc2d128ad2..fa30a9f294 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -200,7 +200,6 @@
#include "NACLfloaterexploresounds.h"
#include "particleeditor.h"
#include "quickprefs.h"
-
// handle secondlife:///app/openfloater/{NAME} URLs
class LLFloaterOpenHandler : public LLCommandHandler
{
@@ -385,6 +384,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("region_restarting", "floater_region_restarting.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
// [RLVa:KB] - Checked: 2010-03-11 (RLVa-1.2.0e) | Added: RLVa-1.2.0a
LLFloaterReg::add("rlv_behaviours", "floater_rlv_behaviours.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
+ LLFloaterReg::add("rlv_console", "floater_rlv_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("rlv_locks", "floater_rlv_locks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
LLFloaterReg::add("rlv_strings", "floater_rlv_strings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build);
// [/RLVa:KB]
diff --git a/indra/newview/llviewerjointattachment.cpp b/indra/newview/llviewerjointattachment.cpp
index b07ee917d3..22f1123be6 100644
--- a/indra/newview/llviewerjointattachment.cpp
+++ b/indra/newview/llviewerjointattachment.cpp
@@ -173,6 +173,12 @@ BOOL LLViewerJointAttachment::addObject(LLViewerObject* object)
if (isObjectAttached(object))
{
LL_INFOS() << "(same object re-attached)" << LL_ENDL;
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ if ( (object->permYouOwner()) && (gAgentAvatarp) )
+ {
+ gAgentAvatarp->removePendingDetach(object->getID());
+ }
+// [/SL:KB]
removeObject(object);
// Pass through anyway to let setupDrawable()
// re-connect object to the joint correctly
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index be5c7945d7..b591378c78 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -122,6 +122,10 @@ void agent_push_down( EKeystate s )
static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode)
{
+// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
+ if ( (gAgent.mDoubleTapRunMode == mode) && (gAgent.getTempRun()) )
+ gAgent.clearTempRun();
+// [/RLVa:KB]
// if (gAgent.mDoubleTapRunMode == mode &&
// gAgent.getRunning() &&
// !gAgent.getAlwaysRun())
@@ -130,10 +134,6 @@ static void agent_check_temporary_run(LLAgent::EDoubleTapRunMode mode)
// gAgent.clearRunning();
// gAgent.sendWalkRun(gAgent.getRunning());
// }
-// [RLVa:KB] - Checked: 2011-05-11 (RLVa-1.3.0i) | Added: RLVa-1.3.0i
- if ( (gAgent.mDoubleTapRunMode == mode) && (gAgent.getTempRun()) )
- gAgent.clearTempRun();
-// [/RLVa:KB]
}
static void agent_handle_doubletap_run(EKeystate s, LLAgent::EDoubleTapRunMode mode)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 0b8a8db7b5..1180e5257d 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -134,13 +134,13 @@
#include "llpathfindingmanager.h"
#include "llstartup.h"
#include "boost/unordered_map.hpp"
-
-// Firestorm includes
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvactions.h"
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
+
+// Firestorm includes
#include "fsdata.h"
#include "fslslbridge.h"
#include "fscommon.h"
@@ -1363,13 +1363,22 @@ class LLAdvancedToggleWireframe : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
-// [RLVa:KB] - Checked: 2013-05-11 (RLVa-1.4.9)
+// [RLVa:KB] - Checked: RLVa-2.0.0
bool fRlvBlockWireframe = gRlvAttachmentLocks.hasLockedHUD();
if ( (!gUseWireframe) && (fRlvBlockWireframe) )
- {
RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_WIREFRAME);
- }
- gUseWireframe = (!gUseWireframe) && (!fRlvBlockWireframe);
+ set_use_wireframe( (!gUseWireframe) && (!fRlvBlockWireframe) );
+ return true;
+ }
+};
+
+// Called from rlvhandler.cpp
+void set_use_wireframe(BOOL useWireframe)
+ {
+ if (gUseWireframe == useWireframe)
+ return;
+
+ gUseWireframe = useWireframe;
// [/RLVa:KB]
// gUseWireframe = !(gUseWireframe);
@@ -1390,9 +1399,9 @@ class LLAdvancedToggleWireframe : public view_listener_t
LLViewerShaderMgr::instance()->setShaders();
}
- return true;
+// return true;
}
-};
+//};
class LLAdvancedCheckWireframe : public view_listener_t
{
@@ -3573,15 +3582,15 @@ bool enable_object_mute()
lastname && !LLStringUtil::compareStrings(lastname->getString(), "Linden");
bool is_self = avatar->isSelf();
// return !is_linden && !is_self;
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
-// return !is_linden && !is_self && !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
+// [RLVa:KB] - Checked: RLVa-1.2.1
+// return !is_linden && !is_self && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID()));
// [/RLVa:KB]
// Make enable/disable of block/unblock menu items work for avatars
if(is_linden || is_self)
return false;
- if(gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID()))
return false;
LLNameValue *firstname = avatar->getNVPair("FirstName");
@@ -3741,14 +3750,14 @@ class LLObjectMute : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(object);
if (avatar)
{
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.0.0e
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ id = avatar->getID();
+// [RLVa:KB] - Checked: RLVa-1.0.0
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, id))
return true;
// [/RLVa:KB]
avatar->mNeedsImpostorUpdate = TRUE;
- id = avatar->getID();
LLNameValue *firstname = avatar->getNVPair("FirstName");
LLNameValue *lastname = avatar->getNVPair("LastName");
@@ -3916,8 +3925,8 @@ void handle_avatar_freeze(const LLSD& avatar_id)
// {
// LLSD args;
// args["AVATAR_NAME"] = fullname;
-// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e
-// args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
+// [RLVa:KB] - Checked: RLVa-1.0.0
+// args["AVATAR_NAME"] = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) ? fullname : RlvStrings::getAnonym(fullname);
// [/RLVa:KB]
// LLNotificationsUtil::add("FreezeAvatarFullname",
// args,
@@ -4064,8 +4073,8 @@ void handle_avatar_eject(const LLSD& avatar_id)
// {
// LLSD args;
// args["AVATAR_NAME"] = fullname;
-// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e
-// args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
+// [RLVa:KB] - Checked: RLVa-1.0.0
+// args["AVATAR_NAME"] = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) ? fullname : RlvStrings::getAnonym(fullname);
// [/RLVa:KB]
// LLNotificationsUtil::add("EjectAvatarFullname",
// args,
@@ -4087,8 +4096,8 @@ void handle_avatar_eject(const LLSD& avatar_id)
// {
// LLSD args;
// args["AVATAR_NAME"] = fullname;
-// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.0.0e
-// args["AVATAR_NAME"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ? fullname : RlvStrings::getAnonym(fullname);
+// [RLVa:KB] - Checked: RLVa-1.0.0
+// args["AVATAR_NAME"] = (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) ? fullname : RlvStrings::getAnonym(fullname);
// [/RLVa:KB]
// LLNotificationsUtil::add("EjectAvatarFullnameNoBan",
// args,
@@ -4878,8 +4887,8 @@ class LLAvatarEnableAddFriend : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
// bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID());
-// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
- bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID()));
// [/RLVa:KB]
return new_value;
}
@@ -4957,7 +4966,7 @@ bool is_object_sittable()
if (rlv_handler_t::isEnabled())
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
- if ( (pick.mObjectID.notNull()) && (!gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset)) )
+ if ( (pick.mObjectID.notNull()) && (!RlvActions::canSit(pick.getObject(), pick.mObjectOffset)) )
return false;
}
// [/RLVa:KB]
@@ -4996,7 +5005,7 @@ void handle_object_sit_or_stand()
// if (object && object->getPCode() == LL_PCODE_VOLUME)
// [RLVa:KB] - Checked: 2010-03-06 (RLVa-1.2.0c) | Modified: RLVa-1.2.0c
if ( (object && object->getPCode() == LL_PCODE_VOLUME) &&
- ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canSit(object, pick.mObjectOffset))) )
+ ((!rlv_handler_t::isEnabled()) || (RlvActions::canSit(object, pick.mObjectOffset))) )
// [/RLVa:KB]
{
// [RLVa:KB] - Checked: 2010-08-29 (RLVa-1.2.1c) | Added: RLVa-1.2.1c
@@ -7280,8 +7289,8 @@ class LLAvatarInviteToGroup : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
-// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
- if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (avatar) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) )
// [/RLVa:KB]
{
LLAvatarActions::inviteToGroup(avatar->getID());
@@ -7296,8 +7305,8 @@ class LLAvatarAddFriend : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar && !LLAvatarActions::isFriend(avatar->getID()))
-// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
- if ( (avatar && !LLAvatarActions::isFriend(avatar->getID())) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (avatar && !LLAvatarActions::isFriend(avatar->getID())) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) )
// [/RLVa:KB]
{
request_friendship(avatar->getID());
@@ -7340,8 +7349,8 @@ class LLAvatarAddContact : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
-// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.0f) | Modified: RLVa-1.2.0f
- if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (avatar) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) )
// [/RLVa:KB]
{
create_inventory_callingcard(avatar->getID());
@@ -7407,8 +7416,8 @@ bool enable_pay_avatar()
LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
LLVOAvatar* avatar = find_avatar_from_object(obj);
// return (avatar != NULL);
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
- return (avatar != NULL) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
+// [RLVa:KB] - Checked: RLVa-1.2.1
+ return (avatar != NULL) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID()));
// [/RLVa:KB]
}
@@ -7464,7 +7473,7 @@ bool enable_object_sit(LLUICtrl* ctrl)
{
const LLPickInfo& pick = LLToolPie::getInstance()->getPick();
if (pick.mObjectID.notNull())
- sitting_on_sel = !gRlvHandler.canSit(pick.getObject(), pick.mObjectOffset);
+ sitting_on_sel = !RlvActions::canSit(pick.getObject(), pick.mObjectOffset);
}
// [/RLVa:KB]
@@ -7799,8 +7808,8 @@ class LLShowAgentProfile : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(agent_id);
// if (avatar)
-// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d
- if ( (avatar) && ((!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gAgent.getID() == agent_id)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (avatar) && ((RlvActions::canShowName(RlvActions::SNC_DEFAULT, agent_id)) || (gAgent.getID() == agent_id)) )
// [/RLVa:KB]
{
LLAvatarActions::showProfile(avatar->getID());
@@ -8533,8 +8542,8 @@ class LLAvatarSendIM : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
-// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
- if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (avatar) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) )
// [/RLVa:KB]
{
LLAvatarActions::startIM(avatar->getID());
@@ -8549,8 +8558,8 @@ class LLAvatarCall : public view_listener_t
{
LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() );
// if(avatar)
-// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Added: RLVa-1.2.0d
- if ( (avatar) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (avatar) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, avatar->getID())) )
// [/RLVa:KB]
{
LLAvatarActions::startCall(avatar->getID());
@@ -8559,10 +8568,16 @@ class LLAvatarCall : public view_listener_t
}
};
-// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Added: RLVa-1.2.1b
+// [RLVa:KB] - Checked: RLVa-1.2.1
bool enable_avatar_call()
{
- return (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (LLAvatarActions::canCall());
+ if (RlvActions::isRlvEnabled())
+ {
+ const LLVOAvatar* pAvatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
+ if ((!pAvatar) || (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, pAvatar->getID())))
+ return false;
+ }
+ return LLAvatarActions::canCall();
}
// [/RLVa:KB]
@@ -10458,7 +10473,10 @@ class LLWorldPostProcess : public view_listener_t
void handle_flush_name_caches()
{
- LLAvatarNameCache::cleanupClass();
+ // Crash fix
+ //LLAvatarNameCache::cleanupClass();
+ LLAvatarNameCache::clearCache();
+ //
if (gCacheName) gCacheName->clear();
}
@@ -11331,9 +11349,13 @@ void initialize_menus()
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
-// [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Added: RLVa-1.2.0
+// [RLVa:KB] - Checked: RLVa-2.0.0
enable.add("RLV.MainToggleVisible", boost::bind(&rlvMenuMainToggleVisible, _1));
- enable.add("RLV.EnableIfNot", boost::bind(&rlvMenuEnableIfNot, _2));
+ if (RlvActions::isRlvEnabled())
+ {
+ enable.add("RLV.CanShowName", boost::bind(&rlvMenuCanShowName));
+ enable.add("RLV.EnableIfNot", boost::bind(&rlvMenuEnableIfNot, _2));
+ }
// [/RLVa:KB]
// Toggle internal web browser
diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h
index 91067108fe..fb48ffa07a 100644
--- a/indra/newview/llviewermenu.h
+++ b/indra/newview/llviewermenu.h
@@ -39,6 +39,10 @@ class LLObjectSelection;
class LLSelectNode;
class PieMenu; // ## Zi: Pie Menu
+// [RLVa:KB] - Checked: RLVa-2.0.0
+void set_use_wireframe(BOOL useWireframe);
+// [/RLVa:KB]
+
void initialize_edit_menu();
void initialize_spellcheck_menu();
void initialize_volume_controls_callbacks(); // Centralize a some of these volume panel callbacks
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3ceab5fed4..6ca748788d 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -119,6 +119,12 @@
#include "llpanelplaceprofile.h"
#include "llviewerregion.h"
#include "llfloaterregionrestarting.h"
+// [RLVa:KB] - Checked: 2010-03-09 (RLVa-1.2.0a)
+#include "rlvactions.h"
+#include "rlvhandler.h"
+#include "rlvinventory.h"
+#include "rlvui.h"
+// [/RLVa:KB]
#include //
#include
@@ -147,10 +153,6 @@
#include "llgiveinventory.h"
#include "lllandmarkactions.h"
#include "lltexturefetch.h"
-#include "rlvactions.h"
-#include "rlvhandler.h"
-#include "rlvinventory.h"
-#include "rlvui.h"
#include "sound_ids.h"
#include "tea.h" //
#include "NACLantispam.h"
@@ -1624,13 +1626,12 @@ void LLOfferInfo::send_auto_receive_response(void)
{
// add buddy to recent people list
// LLRecentPeople::instance().add(mFromID);
-// [RLVa:KB] - Checked: 2010-04-20 (RLVa-1.2.2a) | Added: RLVa-1.2.0f
- // RELEASE-RLVa: [RLVa-1.2.2] Make sure this stays in sync with the condition in inventory_offer_handler()
- if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (!RlvUtil::isNearbyAgent(mFromID)) ||
- (RlvUIEnabler::hasOpenIM(mFromID)) || ((RlvUIEnabler::hasOpenProfile(mFromID))) )
- {
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ // RELEASE-RLVa: [RLVa-2.0.1] Make sure this stays in sync with the condition in inventory_offer_handler()
+ bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mFromID)) || (!RlvUtil::isNearbyAgent(mFromID)) || (RlvUIEnabler::hasOpenIM(mFromID)) || (RlvUIEnabler::hasOpenProfile(mFromID));
+ if (fRlvCanShowName)
LLRecentPeople::instance().add(mFromID);
- }
// [/RLVa:KB]
}
}
@@ -1989,9 +1990,11 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
// [SL:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
std::string name_slurl = LLSLURL("agent", mFromID, "about").getSLURLString();
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- // RELEASE-RLVa: [RLVa-1.2.2] Make sure this stays in sync with the condition in inventory_offer_handler()
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(mFromID)) )
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ // RELEASE-RLVa: [RLVa-2.0.1] Make sure this stays in sync with the condition in inventory_offer_handler()
+ bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, mFromID)) || (!RlvUtil::isNearbyAgent(mFromID)) || (RlvUIEnabler::hasOpenIM(mFromID)) || (RlvUIEnabler::hasOpenProfile(mFromID));
+ if (!fRlvCanShowName)
name_slurl = LLSLURL("agent", mFromID, "rlvanonym").getSLURLString();
// [/RLVa:KB]
@@ -2271,9 +2274,9 @@ void inventory_offer_handler(LLOfferInfo* info)
// Object -> Agent Inventory Offer
if (info->mFromObject && !bAutoAccept)
{
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
// Only filter if the object owner is a nearby agent
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) )
+ if ( (RlvActions::isRlvEnabled()) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, info->mFromID)) && (RlvUtil::isNearbyAgent(info->mFromID)) )
{
payload["rlv_shownames"] = TRUE;
args["NAME_SLURL"] = LLSLURL("agent", info->mFromID, "rlvanonym").getSLURLString();
@@ -2294,10 +2297,11 @@ void inventory_offer_handler(LLOfferInfo* info)
}
else // Agent -> Agent Inventory Offer
{
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-2.0.1
// Only filter if the offer is from a nearby agent and if there's no open IM session (doesn't necessarily have to be focused)
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(info->mFromID)) &&
- (!RlvUIEnabler::hasOpenIM(info->mFromID)) )
+ bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, info->mFromID)) || (!RlvUtil::isNearbyAgent(info->mFromID)) || (RlvUIEnabler::hasOpenIM(info->mFromID)) || (RlvUIEnabler::hasOpenProfile(info->mFromID));
+ if (!fRlvCanShowName)
{
payload["rlv_shownames"] = TRUE;
args["NAME"] = RlvStrings::getAnonym(info->mFromName);
@@ -3510,11 +3514,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_ACCEPTED:
{
// args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
// Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
- bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
- (!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id));
- args["NAME"] = LLSLURL("agent", from_id, (!fRlvFilterName) ? "completename" : "rlvanonym").getSLURLString();;
+ bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, from_id)) || (!RlvUtil::isNearbyAgent(from_id)) || (RlvUIEnabler::hasOpenProfile(from_id)) || (RlvUIEnabler::hasOpenIM(from_id));
+ args["NAME"] = LLSLURL("agent", from_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
// [/RLVa:KB]
LLSD payload;
payload["from_id"] = from_id;
@@ -3527,11 +3531,11 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_INVENTORY_DECLINED:
{
// args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
-// [RLVa:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
// Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
- bool fRlvFilterName = (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (RlvUtil::isNearbyAgent(from_id)) &&
- (!RlvUIEnabler::hasOpenProfile(from_id)) && (!RlvUIEnabler::hasOpenIM(from_id));
- args["NAME"] = LLSLURL("agent", from_id, (!fRlvFilterName) ? "completename" : "rlvanonym").getSLURLString();;
+ bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
+ (RlvActions::canShowName(RlvActions::SNC_DEFAULT, from_id)) || (!RlvUtil::isNearbyAgent(from_id)) || (RlvUIEnabler::hasOpenProfile(from_id)) || (RlvUIEnabler::hasOpenIM(from_id));
+ args["NAME"] = LLSLURL("agent", from_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
// [/RLVa:KB]
LLSD payload;
payload["from_id"] = from_id;
@@ -3606,18 +3610,18 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
LLSD query_string;
query_string["owner"] = from_id;
-// [RLVa:KB] - Checked: 2010-04-22 (RLVa-1.2.0f) | Added: RLVa-1.2.0f
- if (rlv_handler_t::isEnabled())
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if (RlvActions::isRlvEnabled())
{
// NOTE: the chat message itself will be filtered in LLNearbyChatHandler::processChat()
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!from_group) && (RlvUtil::isNearbyAgent(from_id)) )
+ if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) && (!from_group) && (RlvUtil::isNearbyAgent(from_id)) )
{
query_string["rlv_shownames"] = TRUE;
RlvUtil::filterNames(name);
chat.mFromName = name;
}
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
+ if (!RlvActions::canShowLocation())
{
std::string::size_type idxPos = location.find('/');
if ( (std::string::npos != idxPos) && (RlvUtil::isNearbyRegion(location.substr(0, idxPos))) )
@@ -3811,7 +3815,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
case IM_LURE_USER:
case IM_TELEPORT_REQUEST:
{
-// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9)
+// [RLVa:KB] - Checked: RLVa-1.4.9
// If we auto-accept the offer/request then this will override DnD status (but we'll still let the other party know later)
bool fRlvAutoAccept = (rlv_handler_t::isEnabled()) &&
( ((IM_LURE_USER == dialog) && (RlvActions::autoAcceptTeleportOffer(from_id))) ||
@@ -3823,7 +3827,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
return;
}
// else if (is_do_not_disturb)
-// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9)
+// [RLVa:KB] - Checked: RLVa-1.4.9
else if ( (is_do_not_disturb) && (!fRlvAutoAccept) )
// [/RLVa:KB]
{
@@ -3894,7 +3898,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
}
-// [RLVa:KB] - Checked: 2013-11-08 (RLVa-1.4.9)
+// [RLVa:KB] - Checked: RLVa-1.4.9
if (rlv_handler_t::isEnabled())
{
if ( ((IM_LURE_USER == dialog) && (!RlvActions::canAcceptTpOffer(from_id))) ||
@@ -3906,8 +3910,9 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
return;
}
- // Censor lure message if: 1) restricted from receiving IMs from the sender, or 2) teleport offer and @showloc=n restricted
- if ( (!RlvActions::canReceiveIM(from_id)) || ((IM_LURE_USER == dialog) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) )
+ // Censor message if: 1) restricted from receiving IMs from the sender, or 2) teleport offer/request and @showloc=n restricted
+ if ( (!RlvActions::canReceiveIM(from_id)) ||
+ ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (IM_LURE_USER == dialog || IM_TELEPORT_REQUEST == dialog)) )
{
message = RlvStrings::getString(RLV_STRING_HIDDEN);
}
@@ -3973,8 +3978,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
params.substitutions = args;
params.payload = payload;
-// [RLVa:KB] - Checked: 20103-11-08 (RLVa-1.4.9)
- if ( (rlv_handler_t::isEnabled()) && (fRlvAutoAccept) )
+// [RLVa:KB] - Checked: RLVa-1.4.9
+ if (fRlvAutoAccept)
{
if (IM_LURE_USER == dialog)
gRlvHandler.setCanCancelTp(false);
@@ -4622,7 +4627,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// Filtering "rules":
// avatar => filter only their name (unless it's this avie)
// other => filter everything
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT))
{
if (CHAT_SOURCE_AGENT != chat.mSourceType)
{
@@ -4632,19 +4637,19 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
{
chat.mFromName = RlvStrings::getAnonym(chat.mFromName);
chat.mRlvNamesFiltered = TRUE;
- }
+ }
}
// Create an "objectim" URL for objects if we're either @shownames or @showloc restricted
// (we need to do this now because we won't be have enough information to do it later on)
- if ( (CHAT_SOURCE_OBJECT == chat.mSourceType) &&
- ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))) )
+ if ( (CHAT_SOURCE_OBJECT == chat.mSourceType) &&
+ ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT)) || (!RlvActions::canShowLocation()) ) )
{
LLSD sdQuery;
sdQuery["name"] = chat.mFromName;
sdQuery["owner"] = owner_id;
- if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!is_owned_by_me) )
+ if ( (!RlvActions::canShowName(RlvActions::SNC_COUNT, owner_id)) && (!is_owned_by_me) )
sdQuery["rlv_shownames"] = true;
const LLViewerRegion* pRegion = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent);
@@ -5960,6 +5965,14 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
LLViewerObject *objectp = gObjectList.findObject(id);
if (objectp)
{
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ if ( (objectp->isAttachment()) && (gAgentAvatarp) && (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE) && (objectp->permYouOwner()) )
+ {
+ gAgentAvatarp->addPendingDetach(objectp->getRootEdit()->getID());
+ continue;
+ }
+// [/SL:KB]
+
// Display green bubble on kill
if ( gShowObjectUpdates )
{
@@ -7863,14 +7876,14 @@ void process_alert_core(const std::string& message, BOOL modal)
}
std::string new_msg =LLNotifications::instance().getGlobalString(text);
-// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
- if ( (new_msg == text) && (rlv_handler_t::isEnabled()) )
- {
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
- RlvUtil::filterLocation(new_msg);
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
- RlvUtil::filterNames(new_msg);
- }
+// [RLVa:KB] - Checked: RLVa-1.4.5
+ if ( (new_msg == text) && (RlvActions::isRlvEnabled()) )
+ {
+ if (!RlvActions::canShowLocation())
+ RlvUtil::filterLocation(new_msg);
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT))
+ RlvUtil::filterNames(new_msg);
+ }
// [/RLVa:KB]
args["MESSAGE"] = new_msg;
LLNotificationsUtil::add("SystemMessage", args);
@@ -7879,12 +7892,12 @@ void process_alert_core(const std::string& message, BOOL modal)
{
LLSD args;
std::string new_msg =LLNotifications::instance().getGlobalString(message);
-// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
- if ( (new_msg == message) && (rlv_handler_t::isEnabled()) )
+// [RLVa:KB] - Checked: RLVa-1.4.5
+ if ( (new_msg == message) && (RlvActions::isRlvEnabled()) )
{
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
+ if (!RlvActions::canShowLocation())
RlvUtil::filterLocation(new_msg);
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT))
RlvUtil::filterNames(new_msg);
}
// [/RLVa:KB]
@@ -7903,12 +7916,12 @@ void process_alert_core(const std::string& message, BOOL modal)
std::string localized_msg;
bool is_message_localized = LLTrans::findString(localized_msg, new_msg);
-// [RLVa:KB] - Checked: 2012-02-07 (RLVa-1.4.5) | Added: RLVa-1.4.5
- if ( (new_msg == message) && (rlv_handler_t::isEnabled()) )
+// [RLVa:KB] - Checked: RLVa-1.4.5
+ if ( (new_msg == message) && (RlvActions::isRlvEnabled()) )
{
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
+ if (!RlvActions::canShowLocation())
RlvUtil::filterLocation(new_msg);
- if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT))
RlvUtil::filterNames(new_msg);
}
// [/RLVa:KB]
@@ -8943,20 +8956,14 @@ void send_lures(const LLSD& notification, const LLSD& response)
LLAgentUI::buildSLURL(slurl);
text.append("\r\n").append(slurl.getSLURLString());
-// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
- if ( (RlvActions::hasBehaviour(RLV_BHVR_SENDIM)) || (RlvActions::hasBehaviour(RLV_BHVR_SENDIMTO)) )
- {
- // Filter the lure message if one of the recipients of the lure can't be sent an IM to
- for (LLSD::array_const_iterator it = notification["payload"]["ids"].beginArray();
- it != notification["payload"]["ids"].endArray(); ++it)
- {
- if (!RlvActions::canSendIM(it->asUUID()))
- {
- text = RlvStrings::getString(RLV_STRING_HIDDEN);
- break;
- }
- }
- }
+// [RLVa:KB] - Checked: RLVa-2.0.0
+ // Filter the lure message if any of the recipients are IM-blocked
+ const LLSD& sdRecipients = notification["payload"]["ids"];
+ if ( (gRlvHandler.isEnabled()) &&
+ (std::any_of(sdRecipients.beginArray(), sdRecipients.endArray(), [](const LLSD& id) { return !RlvActions::canStartIM(id.asUUID()) || !RlvActions::canSendIM(id.asUUID()); })) )
+ {
+ text = RlvStrings::getString(RLV_STRING_HIDDEN);
+ }
// [/RLVa:KB]
LLMessageSystem* msg = gMessageSystem;
@@ -8978,12 +8985,18 @@ void send_lures(const LLSD& notification, const LLSD& response)
// Record the offer.
{
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvCanShowName = (!notification["payload"].has("rlv_shownames")) ? true : !notification["payload"]["rlv_shownames"].asBoolean();
+// [/RLVa:KB]
// Show complete name for TP lures
//std::string target_name;
//gCacheName->getFullName(target_id, target_name); // for im log filenames
LLSD args;
//args["TO_NAME"] = LLSLURL("agent", target_id, "displayname").getSLURLString();;
- args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();
+// [RLVa:KB] - Checked: 2014-03-31 (Catznip-3.6)
+ args["TO_NAME"] = LLSLURL("agent", target_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
+// [/RLVa:KB]
+// args["TO_NAME"] = LLSLURL("agent", target_id, "completename").getSLURLString();
//
LLSD payload;
@@ -8994,7 +9007,11 @@ void send_lures(const LLSD& notification, const LLSD& response)
LLNotificationsUtil::add("TeleportOfferSent", args, payload);
// Add the recepient to the recent people list.
- LLRecentPeople::instance().add(target_id);
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ if (fRlvCanShowName)
+ LLRecentPeople::instance().add(target_id);
+// [/RLVa:KB]
+// LLRecentPeople::instance().add(target_id);
}
}
gAgent.sendReliableMessage();
@@ -9040,30 +9057,37 @@ void handle_lure(const uuid_vec_t& ids)
LLSD edit_args;
// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a
- edit_args["REGION"] =
- (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN);
+ edit_args["REGION"] = (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? gAgent.getRegion()->getName() : RlvStrings::getString(RLV_STRING_HIDDEN);
// [/RLVa:KB]
// edit_args["REGION"] = gAgent.getRegion()->getName();
LLSD payload;
- for (std::vector::const_iterator it = ids.begin();
- it != ids.end();
- ++it)
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvShouldHideNames = false;
+ for (const LLUUID& idAgent : ids)
{
-// [RLVa:KB] - Checked: 2010-04-07 (RLVa-1.2.0d) | Modified: RLVa-1.0.0a
// Only allow offering teleports if everyone is a @tplure exception or able to map this avie under @showloc=n
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
- const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(*it);
- if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, *it, RLV_CHECK_PERMISSIVE)) &&
+ const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(idAgent);
+ if ( (!gRlvHandler.isException(RLV_BHVR_TPLURE, idAgent, RLV_CHECK_PERMISSIVE)) &&
((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) )
{
+ RlvUtil::notifyBlocked(RLV_STRING_BLOCKED_TELEPORT_OFFER);
return;
}
}
-// [/RLVa:KB]
- payload["ids"].append(*it);
+ fRlvShouldHideNames |= !RlvActions::canShowName(RlvActions::SNC_TELEPORTOFFER, idAgent);
+ payload["ids"].append(idAgent);
}
+ payload["rlv_shownames"] = fRlvShouldHideNames;
+// [/RLVa:KB]
+// for (std::vector::const_iterator it = ids.begin();
+// it != ids.end();
+// ++it)
+// {
+// payload["ids"].append(*it);
+// }
if (gAgent.isGodlike())
{
LLNotificationsUtil::add("OfferTeleportFromGod", edit_args, payload, handle_lure_callback);
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index fadcbdb4b2..e91822fa33 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -103,6 +103,7 @@
#include "llfloaterperms.h"
#include "llvocache.h"
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
+#include "rlvactions.h"
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
@@ -5890,7 +5891,7 @@ BOOL LLViewerObject::permTransfer() const
BOOL LLViewerObject::allowOpen() const
{
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
- return !flagInventoryEmpty() && (permYouOwner() || permModify()) && ((!rlv_handler_t::isEnabled()) || (gRlvHandler.canEdit(this)));
+ return !flagInventoryEmpty() && (permYouOwner() || permModify()) && ((!RlvActions::isRlvEnabled()) || (RlvActions::canEdit(this)));
// [/RLVa:KB]
// return !flagInventoryEmpty() && (permYouOwner() || permModify());
}
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 31663e1c57..590198ce9e 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -766,6 +766,29 @@ void LLViewerObjectList::dirtyAllObjectInventory()
}
}
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+void LLViewerObjectList::setAllObjectDefaultTextures(U32 nChannel, bool fShowDefault)
+{
+ LLPipeline::sRenderTextures = !fShowDefault;
+
+ for (LLViewerObject* pObj : mObjects)
+ {
+ LLDrawable* pDrawable = pObj->mDrawable;
+ if ( (pDrawable) && (!pDrawable->isDead()) )
+ {
+ for (int idxFace = 0, cntFace = pDrawable->getNumFaces(); idxFace < cntFace; idxFace++)
+ {
+ if (LLFace* pFace = pDrawable->getFace(idxFace))
+ pFace->setDefaultTexture(nChannel, fShowDefault);
+ }
+
+ if (LLVOVolume* pVoVolume = pDrawable->getVOVolume())
+ pVoVolume->markForUpdate(true);
+ }
+ }
+}
+// [/SL:KB]
+
void LLViewerObjectList::updateApparentAngles(LLAgent &agent)
{
S32 i;
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index a0a65b91fa..96bbf4a4b1 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -124,6 +124,9 @@ public:
void resetObjectBeacons();
void dirtyAllObjectInventory();
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ void setAllObjectDefaultTextures(U32 nChannel, bool fShowDefault);
+// [/SL:KB]
void removeFromActiveList(LLViewerObject* objectp);
void updateActive(LLViewerObject *objectp);
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 9c2c7d9a70..7462840b99 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1526,10 +1526,16 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance();
// Aurora Sim
LLViewerRegion* msg_region = LLWorld::getInstance()->getRegion( msg->getSender() );
- if(msg_region) {
- parcel_mgr.mParcelsPerEdge = S32( msg_region->getWidth() / PARCEL_GRID_STEP_METERS );
+ if (msg_region)
+ {
+ parcel_mgr.mParcelsPerEdge = S32( msg_region->getWidth() / PARCEL_GRID_STEP_METERS );
}
- else {
+ else
+ {
+ if (!gAgent.getRegion())
+ {
+ return;
+ }
parcel_mgr.mParcelsPerEdge = S32( gAgent.getRegion()->getWidth() / PARCEL_GRID_STEP_METERS );
}
// Aurora Sim
@@ -2581,6 +2587,13 @@ boost::signals2::connection LLViewerParcelMgr::setTeleportFailedCallback(telepor
return mTeleportFailedSignal.connect(cb);
}
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+boost::signals2::connection LLViewerParcelMgr::setTeleportDoneCallback(teleport_done_callback_t cb)
+{
+ return mTeleportDoneSignal.connect(cb);
+}
+// [/SL:KB]
+
/* Ok, we're notified that teleport has been finished.
* We should now propagate the notification via mTeleportFinishedSignal
* to all interested parties.
@@ -2609,6 +2622,13 @@ void LLViewerParcelMgr::onTeleportFailed()
mTeleportFailedSignal();
}
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+void LLViewerParcelMgr::onTeleportDone()
+{
+ mTeleportDoneSignal();
+}
+// [/SL:KB]
+
// [SL:KB] - Patch: World-MinimapOverlay | Checked: 2012-06-20 (Catznip-3.3)
boost::signals2::connection LLViewerParcelMgr::setCollisionUpdateCallback(const collision_update_signal_t::slot_type& cb)
{
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index dccb8d1925..9601aaf421 100644
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -81,6 +81,10 @@ public:
typedef boost::signals2::signal teleport_finished_signal_t;
typedef boost::function teleport_failed_callback_t;
typedef boost::signals2::signal teleport_failed_signal_t;
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ typedef boost::function teleport_done_callback_t;
+ typedef boost::signals2::signal teleport_done_signal_t;
+// [/SL:KB]
LLViewerParcelMgr();
~LLViewerParcelMgr();
@@ -298,8 +302,14 @@ public:
boost::signals2::connection setTeleportFinishedCallback(teleport_finished_callback_t cb);
boost::signals2::connection setTeleportFailedCallback(teleport_failed_callback_t cb);
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ boost::signals2::connection setTeleportDoneCallback(teleport_done_callback_t cb);
+// [/SL:KB]
void onTeleportFinished(bool local, const LLVector3d& new_pos);
void onTeleportFailed();
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ void onTeleportDone();
+// [/SL:KB]
static BOOL isParcelOwnedByAgent(const LLParcel* parcelp, U64 group_proxy_power);
static BOOL isParcelModifiableByAgent(const LLParcel* parcelp, U64 group_proxy_power);
@@ -354,6 +364,9 @@ private:
LLVector3d mTeleportInProgressPosition;
teleport_finished_signal_t mTeleportFinishedSignal;
teleport_failed_signal_t mTeleportFailedSignal;
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+ teleport_done_signal_t mTeleportDoneSignal;
+// [/SL:KB]
// Array of pieces of parcel edges to potentially draw
// Has (parcels_per_edge + 1) * (parcels_per_edge + 1) elements so
diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp
index d7b6f021e0..e93c076fe5 100644
--- a/indra/newview/llviewerstats.cpp
+++ b/indra/newview/llviewerstats.cpp
@@ -313,7 +313,12 @@ U32Bytes gTotalWorldData,
U32 gSimPingCount = 0;
U32Bits gObjectData;
F32Milliseconds gAvgSimPing(0.f);
+// Deal with Clang C++11 pedantry
+#if LL_CLANG
+U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY];
+#else
U32Bytes gTotalTextureBytesPerBoostLevel[LLViewerTexture::MAX_GL_IMAGE_CATEGORY] = {U32Bytes(0)};
+#endif
extern U32 gVisCompared;
extern U32 gVisTested;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 88d421ff33..3e6424e7c6 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -85,6 +85,9 @@ LLPointer LLViewerFetchedTexture::sWhiteImagep = NULL;
LLPointer LLViewerFetchedTexture::sDefaultImagep = NULL;
LLPointer LLViewerFetchedTexture::sSmokeImagep = NULL;
LLPointer LLViewerFetchedTexture::sFlatNormalImagep = NULL;
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+LLPointer LLViewerFetchedTexture::sDefaultDiffuseImagep = NULL;
+// [/SL:KB]
LLViewerMediaTexture::media_map_t LLViewerMediaTexture::sMediaMap;
LLTexturePipelineTester* LLViewerTextureManager::sTesterp = NULL;
const std::string sTesterName("TextureTester");
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 8fcd0660d8..04afa120e4 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -561,6 +561,9 @@ public:
static LLPointer sDefaultImagep; // "Default" texture for error cases, the only case of fetched texture which is generated in local.
static LLPointer sSmokeImagep; // Old "Default" translucent texture
static LLPointer sFlatNormalImagep; // Flat normal map denoting no bumpiness on a surface
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ static LLPointer sDefaultDiffuseImagep;
+// [/SL:KB]
};
//
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 730d82e91f..5fa0ddec08 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -4496,9 +4496,8 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
}
}
-// [RLVa:KB] - Checked: 2010-01-02 (RLVa-1.1.0l) | Added: RLVa-1.1.0l
-#ifdef RLV_EXTENSION_CMD_INTERACT
- if ( (rlv_handler_t::isEnabled()) && (found) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)) )
+// [RLVa:KB] - Checked: RLVa-1.2.0
+ if ( (found) && ((gTeleportDisplay) || ((rlv_handler_t::isEnabled()) && (found) && (gRlvHandler.hasBehaviour(RLV_BHVR_INTERACT)))) )
{
// Allow picking if:
// - the drag-and-drop tool is active (allows inventory offers)
@@ -4506,14 +4505,13 @@ LLViewerObject* LLViewerWindow::cursorIntersect(S32 mouse_x, S32 mouse_y, F32 de
// - the pie tool is active *and* we picked our own avie (allows "mouse steering" and the self pie menu)
LLTool* pCurTool = LLToolMgr::getInstance()->getCurrentTool();
if ( (LLToolDragAndDrop::getInstance() != pCurTool) &&
- (!LLToolCamera::getInstance()->hasMouseCapture()) &&
- ((LLToolPie::getInstance() != pCurTool) || (gAgent.getID() != found->getID())) )
+ (!LLToolCamera::getInstance()->hasMouseCapture()) &&
+ ((LLToolPie::getInstance() != pCurTool) || (gAgent.getID() != found->getID())) )
{
found = NULL;
}
-#endif // RLV_EXTENSION_CMD_INTERACT
-// [/RLVa:KB]
}
+// [/RLVa:KB]
}
return found;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 2350a53c78..5a1b8f8238 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1,4 +1,4 @@
-/**
+/**
* @File llvoavatar.cpp
* @brief Implementation of LLVOAvatar class which is a derivation of LLViewerObject
*
@@ -98,7 +98,8 @@
#include "llanimstatelabels.h"
#include "lltrans.h"
#include "llappearancemgr.h"
-// [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c)
+// [RLVa:KB] - Checked: RLVa-2.0.1
+#include "rlvactions.h"
#include "rlvhandler.h"
// [/RLVa:KB]
@@ -111,6 +112,7 @@
#include "llscenemonitor.h"
#include "llsdserialize.h"
+#include "fscommon.h"
#include "fsdata.h"
#include "lfsimfeaturehandler.h" // Opensim
#include "lggcontactsets.h"
@@ -119,6 +121,7 @@
#include "llnetmap.h"
#include "llviewernetwork.h" // [FS:CR] isInSecondlife()
#include "llsidepanelappearance.h"
+#include "fsavatarrenderpersistence.h"
extern F32 SPEED_ADJUST_MAX;
extern F32 SPEED_ADJUST_MAX_SEC;
@@ -704,6 +707,10 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mNameLastname(),
//
mTitle(),
+ // Show Arc in nametag (for Jelly Dolls)
+ mNameArc(0),
+ mNameArcColor(LLColor4::white),
+ //
mNameAway(false),
mNameDoNotDisturb(false),
mNameAutoResponse(false), // Show auto-response in nametag,
@@ -758,6 +765,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mMeshTexturesDirty = FALSE;
mHeadp = NULL;
+ // Load persisted avatar render settings
+ mVisuallyMuteSetting = FSAvatarRenderPersistence::instance().getAvatarRenderSettings(id);
// set up animation variables
mSpeed = 0.f;
@@ -2794,8 +2803,13 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
const F32 time_visible = mTimeVisible.getElapsedTimeF32();
const F32 NAME_SHOW_TIME = F32(renderNameShowTime); // seconds
const F32 FADE_DURATION = F32(renderNameFadeDuration); // seconds
-// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-0.2.0b
- bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvShowAvTag = true, fRlvShowAvName = true;
+ if (RlvActions::isRlvEnabled())
+ {
+ fRlvShowAvTag = RlvActions::canShowName(RlvActions::SNC_NAMETAG, getID());
+ fRlvShowAvName = (fRlvShowAvTag) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, getID()));
+ }
// [/RLVa:KB]
BOOL visible_avatar = isVisible() || mNeedsAnimUpdate;
BOOL visible_chat = useChatBubbles && (mChats.size() || mTyping);
@@ -2803,8 +2817,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
BOOL render_name = visible_chat ||
visible_typing ||
(visible_avatar &&
-// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-1.0.0h
- ( (!fRlvShowNames) || (RlvSettings::getShowNameTags()) ) &&
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ (fRlvShowAvTag) &&
// [/RLVa:KB]
((sRenderName == RENDER_NAME_ALWAYS) ||
(sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME)));
@@ -2842,8 +2856,8 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
new_name = TRUE;
}
-// [RLVa:KB] - Checked: 2010-04-04 (RLVa-1.2.2a) | Added: RLVa-0.2.0b
- if (fRlvShowNames)
+// [RLVa:KB] - Checked: RLVa-0.2.0
+ if (!fRlvShowAvName)
{
if (mRenderGroupTitles)
{
@@ -2928,8 +2942,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
static const F32 chat_range_shout_squared = LFSimFeatureHandler::getInstance()->shoutRange() * LFSimFeatureHandler::getInstance()->shoutRange();
//
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
- bool fRlvShowNames = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool fRlvShowAvName = RlvActions::canShowName(RlvActions::SNC_DEFAULT, getID());
// [/RLVa:KB]
// Show auto-response in nametag
static LLCachedControl fsAutorespondMode(gSavedPerAccountSettings, "FSAutorespondMode");
@@ -2954,8 +2968,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
is_muted = isInMuteList();
}
// bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
- bool is_friend = (!fRlvShowNames) && (LLAvatarTracker::instance().isBuddy(getID()));
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ bool is_friend = (fRlvShowAvName) && (LLAvatarTracker::instance().isBuddy(getID()));
// [/RLVa:KB]
bool is_cloud = getIsCloud();
@@ -3037,6 +3051,27 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
//
+ // Show Arc in nametag (for Jelly Dolls)
+ // ...or everyone, if selected
+ static LLCachedControl show_too_complex_arw_tag(gSavedSettings, "FSTagShowTooComplexARW");
+ static LLCachedControl show_arw_always_tag(gSavedSettings, "FSTagAlwaysShowARW");
+ U32 complexity(0);
+ LLColor4 complexity_color(LLColor4::grey1); // default if we're not limiting the complexity
+
+ if (!isSelf() && (show_arw_always_tag || (show_too_complex_arw_tag && isTooComplex())))
+ {
+ complexity = mVisualComplexity;
+ // This calculation is copied from idleUpdateRenderComplexity()
+ static LLCachedControl max_render_cost(gSavedSettings, "RenderAvatarMaxComplexity", 0);
+ // Show complexity color if we're limiting...
+ if (max_render_cost != 0)
+ {
+ F32 green_level = 1.f - llclamp(((F32)complexity - (F32)max_render_cost) / (F32)max_render_cost, 0.f, 1.f);
+ F32 red_level = llmin((F32)complexity / (F32)max_render_cost, 1.f);
+ complexity_color.set(red_level, green_level, 0.f, 1.f);
+ }
+ }
+
// Rebuild name tag if state change detected
if (!mNameIsSet
|| new_name
@@ -3054,7 +3089,10 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
|| is_cloud != mNameCloud
|| name_tag_color != mNameColor
|| is_typing != mNameIsTyping
- || distance_string != mDistanceString)
+ || distance_string != mDistanceString
+ // Show Arc in nametag (for Jelly Dolls)
+ || complexity != mNameArc
+ || complexity_color != mNameArcColor)
{
//WS: If we got a uuid and if we know if it's id_based or not, ask FSDATA for the other tagdata, before we display it.
@@ -3128,8 +3166,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
// if (sRenderGroupTitles
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- if (sRenderGroupTitles && !fRlvShowNames
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ if (sRenderGroupTitles && fRlvShowAvName
// [/RLVa:KB]
&& title && title->getString() && title->getString()[0] != '\0')
{
@@ -3154,8 +3192,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
clearNameTag();
}
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- if ( (!fRlvShowNames) || (isSelf()) )
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ if ( (fRlvShowAvName) || (isSelf()) )
{
// [/RLVa:KB]
// Might be blank if name not available yet, that's OK
@@ -3192,7 +3230,7 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
addNameTagLine(username, username_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall());
}
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
+// [RLVa:KB] - Checked: RLVa-1.2.2
}
else
{
@@ -3204,8 +3242,8 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
{
const LLFontGL* font = LLFontGL::getFontSansSerif();
std::string full_name = LLCacheName::buildFullName( firstname->getString(), lastname->getString() );
-// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a
- if ( (fRlvShowNames) && (!isSelf()) )
+// [RLVa:KB] - Checked: RLVa-1.2.2
+ if ( (!fRlvShowAvName) && (!isSelf()) )
{
full_name = RlvStrings::getAnonym(full_name);
addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font, true);
@@ -3231,6 +3269,22 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
}
// Show distance in tag
+ // Show Arc in nametag (for Jelly Dolls)
+ // ...or everyone, if selected
+ static const std::string complexity_label = LLTrans::getString("Nametag_Complexity_Label");
+ if (!isSelf() && (show_arw_always_tag || (show_too_complex_arw_tag && isTooComplex())))
+ {
+ std::string complexity_string;
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(complexity_string, complexity);
+
+ LLStringUtil::format_map_t label_args;
+ label_args["COMPLEXITY"] = complexity_string;
+
+ addNameTagLine(format_string(complexity_label, label_args), complexity_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall());
+ }
+ //
+
mNameAway = is_away;
mNameDoNotDisturb = is_do_not_disturb;
mNameAutoResponse = is_autoresponse; // Show auto-response in nametag
@@ -3246,6 +3300,10 @@ void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
mNameFirstname = firstname->getString();
mNameLastname = lastname->getString();
//
+ // Show Arc in nametag (for Jelly Dolls)
+ mNameArc = complexity;
+ mNameArcColor = complexity_color;
+ //
LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR);
new_name = TRUE;
}
@@ -9135,7 +9193,8 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
static const U32 COMPLEXITY_BODY_PART_COST = 200;
// Diagnostic list of all textures on our avatar
- static std::set all_textures;
+ // Disable useless diagnostics
+ //static std::set all_textures;
if (mVisualComplexityStale)
{
@@ -9231,41 +9290,43 @@ void LLVOAvatar::calculateUpdateRenderComplexity()
// Diagnostic output to identify all avatar-related textures.
// Does not affect rendering cost calculation.
// Could be wrapped in a debug option if output becomes problematic.
- if (isSelf())
- {
- // print any attachment textures we didn't already know about.
- for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
- {
- LLUUID image_id = it->first;
- if( ! (image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
- && (all_textures.find(image_id) == all_textures.end()))
- {
- // attachment texture not previously seen.
- LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL;
- all_textures.insert(image_id);
- }
- }
+ // Disable useless diagnostics
+ //if (isSelf())
+ //{
+ // // print any attachment textures we didn't already know about.
+ // for (LLVOVolume::texture_cost_t::iterator it = textures.begin(); it != textures.end(); ++it)
+ // {
+ // LLUUID image_id = it->first;
+ // if( ! (image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
+ // && (all_textures.find(image_id) == all_textures.end()))
+ // {
+ // // attachment texture not previously seen.
+ // LL_INFOS() << "attachment_texture: " << image_id.asString() << LL_ENDL;
+ // all_textures.insert(image_id);
+ // }
+ // }
- // print any avatar textures we didn't already know about
- for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getTextures().begin();
- iter != LLAvatarAppearanceDictionary::getInstance()->getTextures().end();
- ++iter)
- {
- const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second;
- // TODO: MULTI-WEARABLE: handle multiple textures for self
- const LLViewerTexture* te_image = getImage(iter->first,0);
- if (!te_image)
- continue;
- LLUUID image_id = te_image->getID();
- if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
- continue;
- if (all_textures.find(image_id) == all_textures.end())
- {
- LL_INFOS() << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL;
- all_textures.insert(image_id);
- }
- }
- }
+ // // print any avatar textures we didn't already know about
+ // for (LLAvatarAppearanceDictionary::Textures::const_iterator iter = LLAvatarAppearanceDictionary::getInstance()->getTextures().begin();
+ // iter != LLAvatarAppearanceDictionary::getInstance()->getTextures().end();
+ // ++iter)
+ // {
+ // const LLAvatarAppearanceDictionary::TextureEntry *texture_dict = iter->second;
+ // // TODO: MULTI-WEARABLE: handle multiple textures for self
+ // const LLViewerTexture* te_image = getImage(iter->first,0);
+ // if (!te_image)
+ // continue;
+ // LLUUID image_id = te_image->getID();
+ // if( image_id.isNull() || image_id == IMG_DEFAULT || image_id == IMG_DEFAULT_AVATAR)
+ // continue;
+ // if (all_textures.find(image_id) == all_textures.end())
+ // {
+ // LL_INFOS() << "local_texture: " << texture_dict->mName << ": " << image_id << LL_ENDL;
+ // all_textures.insert(image_id);
+ // }
+ // }
+ //}
+ //
if ( cost != mVisualComplexity )
{
@@ -9304,6 +9365,8 @@ void LLVOAvatar::setVisualMuteSettings(VisualMuteSettings set)
{
mVisuallyMuteSetting = set;
mNeedsImpostorUpdate = TRUE;
+ // Load persisted avatar render settings
+ FSAvatarRenderPersistence::instance().setAvatarRenderSettings(getID(), set);
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 564682c64a..247b0d8ba6 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -947,6 +947,10 @@ private:
LLColor4 mNameColor;
BOOL mRenderGroupTitles;
std::string mDistanceString;
+ // Show Arc in nametag (for Jelly Dolls)
+ U32 mNameArc;
+ LLColor4 mNameArcColor;
+ //
//--------------------------------------------------------------------
// Display the name (then optionally fade it out)
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index a57aee677a..2123440e58 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -78,10 +78,15 @@
#include "llstartup.h"
#include "llsdserialize.h"
#include "llcorehttputil.h"
-// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
+// [RLVa:KB] - Checked: RLVa-2.0.2
#include "rlvhandler.h"
+#include "rlvhelper.h"
#include "rlvlocks.h"
// [/RLVa:KB]
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+#include "llviewerparcelmgr.h"
+extern BOOL gTeleportDisplay;
+// [/SL:KB]
// [Legacy Bake]
#ifdef OPENSIM
@@ -1266,12 +1271,25 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
}
else
{
+// [RLVa:KB] - Checked: RLVa-2.0.2
+ bool fRlvCanShowAttachment = true;
+ if (rlv_handler_t::isEnabled())
+ {
+ fRlvCanShowAttachment =
+ (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELF)) &&
+ ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWSELFHEAD)) || (RLV_ATTACHGROUP_HEAD != rlvAttachGroupFromIndex(attachment->getGroup())) );
+ }
+// [/RLVa:KB]
+
switch (camera_mode)
{
case CAMERA_MODE_MOUSELOOK:
if (LLVOAvatar::sVisibleInFirstPerson && attachment->getVisibleInFirstPerson())
{
- attachment->setAttachmentVisibility(TRUE);
+// [RLVa:KB] - Checked: RLVa-2.0.2
+ attachment->setAttachmentVisibility(fRlvCanShowAttachment);
+// [/RLVa:KB]
+// attachment->setAttachmentVisibility(TRUE);
}
else
{
@@ -1279,7 +1297,10 @@ void LLVOAvatarSelf::updateAttachmentVisibility(U32 camera_mode)
}
break;
default:
- attachment->setAttachmentVisibility(TRUE);
+// [RLVa:KB] - Checked: RLVa-2.0.2
+ attachment->setAttachmentVisibility(fRlvCanShowAttachment);
+// [/RLVa:KB]
+// attachment->setAttachmentVisibility(TRUE);
break;
}
}
@@ -3266,6 +3287,60 @@ void LLVOAvatarSelf::dumpWearableInfo(LLAPRFile& outfile)
apr_file_printf( file, "\n\n" );
}
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+void LLVOAvatarSelf::addPendingDetach(const LLUUID& idObject)
+{
+ if (mPendingObjectDetach.end() == std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject))
+ mPendingObjectDetach.push_back(idObject);
+
+ if ((!mPendingObjectDetach.empty()) && (!mTeleportDoneConn.connected()))
+ mTeleportDoneConn = LLViewerParcelMgr::instance().setTeleportDoneCallback(boost::bind(&LLVOAvatarSelf::onTeleportDone, this));
+}
+
+bool LLVOAvatarSelf::isPendingDetach(const LLUUID& idObject) const
+{
+ return mPendingObjectDetach.end() != std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject);
+}
+
+void LLVOAvatarSelf::removePendingDetach(const LLUUID& idObject)
+{
+ auto itPendingDetach = std::find(mPendingObjectDetach.begin(), mPendingObjectDetach.end(), idObject);
+ if (mPendingObjectDetach.end() != itPendingDetach)
+ mPendingObjectDetach.erase(itPendingDetach);
+
+ if (mPendingObjectDetach.empty())
+ mTeleportDoneConn.disconnect();
+}
+
+void LLVOAvatarSelf::onTeleportDone()
+{
+ mTeleportDoneConn.disconnect();
+ doAfterInterval(boost::bind(&LLVOAvatarSelf::checkPendingDetach, this), 30.f);
+}
+
+void LLVOAvatarSelf::checkPendingDetach()
+{
+ if (gTeleportDisplay)
+ return;
+
+ for (const LLUUID& idObj : mPendingObjectDetach)
+ {
+ LLViewerObject* pObject = gObjectList.findObject(idObj);
+ if (pObject)
+ {
+ gObjectList.killObject(pObject);
+ if (gShowObjectUpdates)
+ {
+ LLColor4 color(0.f, 1.f, 0.f, 1.f);
+ gPipeline.addDebugBlip(pObject->getPositionAgent(), color);
+ }
+ LLSelectMgr::getInstance()->removeObjectFromSelections(idObj);
+ }
+ }
+ mPendingObjectDetach.clear();
+}
+// [/SL:KB]
+
// [RLVa:KB] - Checked: 2013-03-03 (RLVa-1.4.8)
F32 LLVOAvatarSelf::getAvatarOffset() /*const*/
{
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index f8c5e203d5..f1af6cb271 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -450,6 +450,19 @@ private:
void appearanceChangeMetricsCoro(std::string url);
bool mInitialMetric;
S32 mMetricSequence;
+
+// [SL:KB] - Patch: Appearance-TeleportAttachKill | Checked: Catznip-4.0
+public:
+ void addPendingDetach(const LLUUID& idObject);
+ bool isPendingDetach(const LLUUID& idObject) const;
+ void removePendingDetach(const LLUUID& idObject);
+ void checkPendingDetach();
+ void onTeleportDone();
+protected:
+ std::list mPendingObjectDetach;
+ boost::signals2::connection mTeleportDoneConn;
+// [/SL:KB]
+
/** Diagnostics
** **
*******************************************************************************/
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 077d8d8ea4..84946ce5a3 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -985,14 +985,17 @@ bool LLVivoxVoiceClient::loginToVivox()
errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000";
args["HOSTID"] = errs.str();
mTerminateDaemon = true;
- if (LLGridManager::getInstance()->isSystemGrid())
- {
- LLNotificationsUtil::add("NoVoiceConnect", args);
- }
- else
- {
- LLNotificationsUtil::add("NoVoiceConnect-GIAB", args);
- }
+ // FIRE-13130 / FIRE-19552: Unknown notification "NoVoiceConnect-GIAB"
+ //if (LLGridManager::getInstance()->isSystemGrid())
+ //{
+ // LLNotificationsUtil::add("NoVoiceConnect", args);
+ //}
+ //else
+ //{
+ // LLNotificationsUtil::add("NoVoiceConnect-GIAB", args);
+ //}
+ LLNotificationsUtil::add("NoVoiceConnect", args);
+ //
mIsLoggingIn = false;
return false;
@@ -2884,14 +2887,17 @@ void LLVivoxVoiceClient::connectorCreateResponse(int statusCode, std::string &st
errs << mVoiceAccountServerURI << "\n:UDP: 3478, 3479, 5060, 5062, 12000-17000";
args["HOSTID"] = errs.str();
mTerminateDaemon = true;
- if (LLGridManager::getInstance()->isSystemGrid())
- {
- LLNotificationsUtil::add("NoVoiceConnect", args);
- }
- else
- {
- LLNotificationsUtil::add("NoVoiceConnect-GIAB", args);
- }
+ // FIRE-13130 / FIRE-19552: Unknown notification "NoVoiceConnect-GIAB"
+ //if (LLGridManager::getInstance()->isSystemGrid())
+ //{
+ // LLNotificationsUtil::add("NoVoiceConnect", args);
+ //}
+ //else
+ //{
+ // LLNotificationsUtil::add("NoVoiceConnect-GIAB", args);
+ //}
+ LLNotificationsUtil::add("NoVoiceConnect", args);
+ //
result["connector"] = LLSD::Boolean(false);
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index b7ce5d2655..2f6aefb2be 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -77,8 +77,8 @@
#include "llvoavatar.h"
#include "llvocache.h"
#include "llmaterialmgr.h"
-// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.0
+#include "rlvactions.h"
#include "rlvlocks.h"
// [/RLVa:KB]
@@ -4554,10 +4554,10 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
// if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
// [RLVa:KB] - Checked: 2010-11-29 (RLVa-1.3.0c) | Modified: RLVa-1.3.0c
const LLViewerObject* pObj = facep->getViewerObject();
- if ( (pObj->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) &&
- ( (!rlv_handler_t::isEnabled()) ||
- ( ((!pObj->isHUDAttachment()) || (!gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))) &&
- (gRlvHandler.canEdit(pObj)) ) ) )
+ if ( (pObj->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects) &&
+ ( (!RlvActions::isRlvEnabled()) ||
+ ( ((!pObj->isHUDAttachment()) || (!gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))) &&
+ (RlvActions::canEdit(pObj)) ) ) )
// [/RVLa:KB]
{
return;
diff --git a/indra/newview/llwlparamset.cpp b/indra/newview/llwlparamset.cpp
index 71aba2ad75..b4753ae182 100644
--- a/indra/newview/llwlparamset.cpp
+++ b/indra/newview/llwlparamset.cpp
@@ -306,11 +306,13 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
// keep cloud positions and coverage the same
/// TODO masking will do this later
- F32 cloudPos1X = (F32) mParamValues["cloud_pos_density1"][0].asReal();
- F32 cloudPos1Y = (F32) mParamValues["cloud_pos_density1"][1].asReal();
- F32 cloudPos2X = (F32) mParamValues["cloud_pos_density2"][0].asReal();
- F32 cloudPos2Y = (F32) mParamValues["cloud_pos_density2"][1].asReal();
- F32 cloudCover = (F32) mParamValues["cloud_shadow"][0].asReal();
+ // FIRE-8633: Do not ignore cloud coverage and position values when doing windlight param set mixing; Fix by Drake Arconis
+ //F32 cloudPos1X = (F32) mParamValues["cloud_pos_density1"][0].asReal();
+ //F32 cloudPos1Y = (F32) mParamValues["cloud_pos_density1"][1].asReal();
+ //F32 cloudPos2X = (F32) mParamValues["cloud_pos_density2"][0].asReal();
+ //F32 cloudPos2Y = (F32) mParamValues["cloud_pos_density2"][1].asReal();
+ //F32 cloudCover = (F32) mParamValues["cloud_shadow"][0].asReal();
+ //
LLSD srcVal;
LLSD destVal;
@@ -399,11 +401,13 @@ void LLWLParamSet::mix(LLWLParamSet& src, LLWLParamSet& dest, F32 weight)
// now setup the sun properly
// reset those cloud positions
- mParamValues["cloud_pos_density1"][0] = cloudPos1X;
- mParamValues["cloud_pos_density1"][1] = cloudPos1Y;
- mParamValues["cloud_pos_density2"][0] = cloudPos2X;
- mParamValues["cloud_pos_density2"][1] = cloudPos2Y;
- mParamValues["cloud_shadow"][0] = cloudCover;
+ // FIRE-8633: Do not ignore cloud coverage and position values when doing windlight param set mixing; Fix by Drake Arconis
+ //mParamValues["cloud_pos_density1"][0] = cloudPos1X;
+ //mParamValues["cloud_pos_density1"][1] = cloudPos1Y;
+ //mParamValues["cloud_pos_density2"][0] = cloudPos2X;
+ //mParamValues["cloud_pos_density2"][1] = cloudPos2Y;
+ //mParamValues["cloud_shadow"][0] = cloudCover;
+ //
}
void LLWLParamSet::updateCloudScrolling(void)
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 72174b14df..641ca5c2af 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1855,6 +1855,35 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positi
}
}
+// [RLVa:KB] - Checked: RLVa-2.0.1
+bool LLWorld::getAvatar(const LLUUID& idAvatar, LLVector3d& posAvatar) const
+{
+ for (const LLCharacter* pCharacter : LLCharacter::sInstances)
+ {
+ const LLVOAvatar* pAvatar = static_cast(pCharacter);
+ if ( (!pAvatar->isDead()) && (!pAvatar->mIsDummy) && (!pAvatar->isOrphaned()) && (idAvatar == pAvatar->getID()) )
+ {
+ posAvatar = pAvatar->getPositionGlobal();
+ return true;
+ }
+ }
+
+ for (const LLViewerRegion* pRegion : LLWorld::getInstance()->getRegionList())
+ {
+ for (S32 idxAgent = 0, cntAgent = pRegion->mMapAvatarIDs.size(); idxAgent < cntAgent; ++idxAgent)
+ {
+ if (idAvatar == pRegion->mMapAvatarIDs[idxAgent])
+ {
+ posAvatar = unpackLocalToGlobalPosition(pRegion->mMapAvatars[idxAgent], pRegion->getOriginGlobal());
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+// [/RLVa:KB]
+
bool LLWorld::isRegionListed(const LLViewerRegion* region) const
{
region_list_t::const_iterator it = find(mRegionList.begin(), mRegionList.end(), region);
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index 08d368a91e..bfa668eae8 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -235,6 +235,9 @@ public:
// Make radar more exact and prevent false region crossing notifications
//const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const;
const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX, std::map* region_assignments = NULL) const;
+// [RLVa:KB] - Checked: RLVa-2.0.1
+ bool getAvatar(const LLUUID& idAvatar, LLVector3d& posAvatar) const;
+// [/RLVa:KB]
// Returns 'true' if the region is in mRegionList,
// 'false' if the region has been removed due to region change
diff --git a/indra/newview/llworldmapmessage.cpp b/indra/newview/llworldmapmessage.cpp
index 8d07330cb1..4779fd7fa3 100644
--- a/indra/newview/llworldmapmessage.cpp
+++ b/indra/newview/llworldmapmessage.cpp
@@ -132,11 +132,6 @@ void LLWorldMapMessage::sendHandleRegionRequest(U64 region_handle,
void LLWorldMapMessage::sendMapBlockRequest(U16 min_x, U16 min_y, U16 max_x, U16 max_y, bool return_nonexistent)
{
-// Aurora Sim
-#ifdef OPENSIM
- if(LLGridManager::getInstance()->isInOpenSim()) return_nonexistent = true;
-#endif //OPENSIM
-// Aurora Sim
//LL_INFOS("World Map") << "LLWorldMap::sendMapBlockRequest()" << ", min = (" << min_x << ", " << min_y << "), max = (" << max_x << ", " << max_y << "), nonexistent = " << return_nonexistent << LL_ENDL;
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_MapBlockRequest);
@@ -216,9 +211,10 @@ void LLWorldMapMessage::processMapBlockReply(LLMessageSystem* msg, void**)
//
// was: llassert(!name.empty())
// which made debug builds impossible to use on OpenSim
- if(name.empty())
+ if (name.empty() && accesscode != 255)
{
LL_WARNS() << "MapBlockReply returned empty region name, not inserting in the world map" << LL_ENDL;
+ continue;
}
//
// Insert that region in the world map, if failure, flag it as a "null_sim"
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8871cbe8e3..87b4ee99e0 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -114,8 +114,8 @@
#include "llpathfindingpathtool.h"
#include "llscenemonitor.h"
#include "llprogressview.h"
-// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
-#include "rlvhandler.h"
+// [RLVa:KB] - Checked: RLVa-2.0.0
+#include "rlvactions.h"
#include "rlvlocks.h"
// [/RLVa:KB]
#include "exopostprocess.h" // Import Vignette from Exodus
@@ -408,6 +408,9 @@ BOOL LLPipeline::sRenderingHUDs;
F32 LLPipeline::sVolumeSAFrame = 0.f; // ZK LBG
bool LLPipeline::sRenderParticles; // flag to hold correct, user selected, status of particles
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+bool LLPipeline::sRenderTextures = true;
+// [/SL:KB]
// EventHost API LLPipeline listener.
static LLPipelineListener sPipelineListener;
@@ -3618,9 +3621,9 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera)
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f
const LLViewerObject* pObj = drawablep->getVObj();
if ( (pObj) && (pObj->isSelected()) &&
- ( (!rlv_handler_t::isEnabled()) ||
+ ( (!RlvActions::isRlvEnabled()) ||
( ((!pObj->isHUDAttachment()) || (!gRlvAttachmentLocks.isLockedAttachment(pObj->getRootEdit()))) &&
- (gRlvHandler.canEdit(pObj)) ) ) )
+ (RlvActions::canEdit(pObj)) ) ) )
// [/RVLa:KB]
{
return;
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 8347864eef..cb8e918dcc 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -591,6 +591,9 @@ public:
static F32 sVolumeSAFrame;
static bool sRenderParticles; // flag to hold correct, user selected, status of particles
+// [SL:KB] - Patch: Render-TextureToggle (Catznip-4.0)
+ static bool sRenderTextures;
+// [/SL:KB]
static LLTrace::EventStatHandle sStatBatchSize;
diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp
index 0a7591fb52..39a640f6c4 100644
--- a/indra/newview/quickprefs.cpp
+++ b/indra/newview/quickprefs.cpp
@@ -53,6 +53,8 @@
#include "lltoolbarview.h"
#include "llviewercontrol.h"
#include "llviewerregion.h"
+#include "llvoavatar.h"
+#include "llvoavatarself.h"
#include "llwaterparammanager.h"
#include "llwlparamset.h"
#include "llwlparammanager.h"
@@ -137,6 +139,10 @@ void FloaterQuickPrefs::onOpen(const LLSD& key)
return;
}
+ // Make sure IndirectMaxComplexity gets set properly
+ LLAvatarComplexityControls::setIndirectMaxArc();
+ LLAvatarComplexityControls::setText(gSavedSettings.getU32("RenderAvatarMaxComplexity"), mMaxComplexityLabel);
+
gSavedSettings.setBOOL("QuickPrefsEditMode", FALSE);
// Scan widgets and reapply control variables because some control types
@@ -192,7 +198,7 @@ void FloaterQuickPrefs::initCallbacks()
gSavedSettings.getControl("RenderShadowGaussian")->getSignal()->connect(boost::bind(&FloaterQuickPrefs::refreshSettings, this));
gSavedSettings.getControl("RenderSSAOEffect")->getSignal()->connect(boost::bind(&FloaterQuickPrefs::refreshSettings, this));
-// FIRE-9630 - Vignette UI controls
+ // Vignette UI controls
getChild("VignetteSpinnerX")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeVignetteSpinnerX, this));
getChild("VignetteSliderX")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeVignetteX, this));
getChild("Reset_VignetteX")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickResetVignetteX, this));
@@ -202,7 +208,6 @@ void FloaterQuickPrefs::initCallbacks()
getChild("VignetteSpinnerZ")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeVignetteSpinnerZ, this));
getChild("VignetteSliderZ")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeVignetteZ, this));
getChild("Reset_VignetteZ")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickResetVignetteZ, this));
-//
getChild("SB_Shd_Clarity")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeRenderShadowSplitExponentSlider, this));
getChild("S_Shd_Clarity")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onChangeRenderShadowSplitExponentSpinner, this));
@@ -228,6 +233,9 @@ void FloaterQuickPrefs::initCallbacks()
mAvatarZOffsetSlider->setSliderEditorCommitCallback(boost::bind(&FloaterQuickPrefs::onAvatarZOffsetFinalCommit, this));
mAvatarZOffsetSlider->setCommitCallback(boost::bind(&FloaterQuickPrefs::onAvatarZOffsetSliderMoved, this));
+ mMaxComplexitySlider->setCommitCallback(boost::bind(&FloaterQuickPrefs::updateMaxComplexity, this));
+ gSavedSettings.getControl("RenderAvatarMaxComplexity")->getCommitSignal()->connect(boost::bind(&FloaterQuickPrefs::updateMaxComplexityLabel, this, _2));
+
syncAvatarZOffsetFromPreferenceSetting();
// Update slider on future pref changes.
if (gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
@@ -380,14 +388,15 @@ BOOL FloaterQuickPrefs::postBuild()
mCtrlShadowDetail = getChild("ShadowDetail");
mCtrlAvatarShadowDetail = getChild("AvatarShadowDetail");
mCtrlReflectionDetail = getChild("Reflections");
-// FIRE-9630 - Vignette UI controls
+
+ // Vignette UI controls
mSpinnerVignetteX = getChild("VignetteSpinnerX");
mSpinnerVignetteY = getChild("VignetteSpinnerY");
mSpinnerVignetteZ = getChild("VignetteSpinnerZ");
mSliderVignetteX = getChild("VignetteSliderX");
mSliderVignetteY = getChild("VignetteSliderY");
mSliderVignetteZ = getChild("VignetteSliderZ");
-//
+
mSliderRenderShadowSplitExponentY = getChild("SB_Shd_Clarity");
mSpinnerRenderShadowSplitExponentY = getChild("S_Shd_Clarity");
@@ -408,6 +417,9 @@ BOOL FloaterQuickPrefs::postBuild()
mAvatarZOffsetSlider = getChild("HoverHeightSlider");
mAvatarZOffsetSlider->setMinValue(MIN_HOVER_Z);
mAvatarZOffsetSlider->setMaxValue(MAX_HOVER_Z);
+
+ mMaxComplexitySlider = getChild("IndirectMaxComplexity");
+ mMaxComplexityLabel = getChild("IndirectMaxComplexityText");
}
mWaterPresetsCombo = getChild("WaterPresetsCombo");
@@ -2151,3 +2163,16 @@ void FloaterQuickPrefs::updateMaxNonImpostors(const LLSD& newvalue)
gSavedSettings.setU32("RenderAvatarMaxNonImpostors", value);
LLVOAvatar::updateImpostorRendering(value); // make it effective immediately
}
+
+void FloaterQuickPrefs::updateMaxComplexity()
+{
+ // Called when the IndirectMaxComplexity control changes
+ LLAvatarComplexityControls::updateMax(mMaxComplexitySlider, mMaxComplexityLabel);
+}
+
+void FloaterQuickPrefs::updateMaxComplexityLabel(const LLSD& newvalue)
+{
+ U32 value = newvalue.asInteger();
+
+ LLAvatarComplexityControls::setText(value, mMaxComplexityLabel);
+}
diff --git a/indra/newview/quickprefs.h b/indra/newview/quickprefs.h
index 9ab8539ded..08b8520845 100644
--- a/indra/newview/quickprefs.h
+++ b/indra/newview/quickprefs.h
@@ -36,7 +36,6 @@
const std::string PHOTOTOOLS_FLOATER = "phototools";
-// Dynamic quick prefs
class LLCheckBoxCtrl;
class LLComboBox;
class LLLayoutPanel;
@@ -47,7 +46,6 @@ class LLSlider;
class LLSliderCtrl;
class LLSpinCtrl;
class LLTextBox;
-//
#define PRESET_NAME_REGION_DEFAULT "__Regiondefault__"
#define PRESET_NAME_SKY_DAY_CYCLE "__Sky_Day_Cycle__"
@@ -134,7 +132,7 @@ private:
LLComboBox* mCtrlAvatarShadowDetail;
LLComboBox* mCtrlReflectionDetail;
- // FIRE-9630 Vignette UI controls
+ // Vignette UI controls
LLSpinCtrl* mSpinnerVignetteX;
LLSpinCtrl* mSpinnerVignetteY;
LLSpinCtrl* mSpinnerVignetteZ;
@@ -155,9 +153,11 @@ private:
LLSliderCtrl* mAvatarZOffsetSlider;
- //
LLButton* mBtnResetDefaults;
+ LLSliderCtrl* mMaxComplexitySlider;
+ LLTextBox* mMaxComplexityLabel;
+
// Vignette UI callbacks
void onChangeVignetteX();
void onChangeVignetteY();
@@ -168,7 +168,6 @@ private:
void onClickResetVignetteX();
void onClickResetVignetteY();
void onClickResetVignetteZ();
- //
void onChangeRenderShadowSplitExponentSlider();
void onChangeRenderShadowSplitExponentSpinner();
@@ -183,11 +182,10 @@ private:
void onChangeRenderSSAOEffectSpinner();
void onClickResetRenderSSAOEffectX();
- // FIRE-9407 - Restore Quickprefs Defaults
+ // Restore Quickprefs Defaults
void onClickRestoreDefaults();
void loadSavedSettingsFromFile(const std::string& settings_path);
void callbackRestoreDefaults(const LLSD& notification, const LLSD& response);
- //
void onAvatarZOffsetSliderMoved();
void onAvatarZOffsetFinalCommit();
@@ -196,10 +194,11 @@ private:
void onSimulatorFeaturesReceived(const LLUUID ®ion_id);
void syncAvatarZOffsetFromPreferenceSetting();
void updateMaxNonImpostors(const LLSD& newvalue);
+ void updateMaxComplexity();
+ void updateMaxComplexityLabel(const LLSD& newvalue);
boost::signals2::connection mRegionChangedSlot;
-// Dynamic quick prefs
public:
virtual void onClose(bool app_quitting);
@@ -309,10 +308,9 @@ protected:
// swaps two controls, used for move up and down
void swapControls(const std::string& control1, const std::string& control2);
-//
bool hasControl( std::string const &aName ) const
{ return mControlsList.end() != mControlsList.find( aName ); }
};
-#endif
+#endif // QUICKPREFS_H
diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp
index b97e060de3..d58781cdb9 100644
--- a/indra/newview/rlvactions.cpp
+++ b/indra/newview/rlvactions.cpp
@@ -1,106 +1,321 @@
-/**
+/**
*
- * Copyright (c) 2009-2013, Kitty Barnett
- *
- * The source code in this file is provided to you under the terms of the
+ * Copyright (c) 2009-2016, Kitty Barnett
+ *
+ * The source code in this file is provided to you under the terms of the
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
- *
+ *
* By copying, modifying or distributing this software, you acknowledge that
- * you have read and understood your obligations described above, and agree to
+ * you have read and understood your obligations described above, and agree to
* abide by those obligations.
- *
+ *
*/
#include "llviewerprecompiledheaders.h"
+#include "llagent.h"
#include "llimview.h"
+#include "llviewercamera.h"
#include "llvoavatarself.h"
+#include "llworld.h"
#include "rlvactions.h"
+#include "rlvhelper.h"
#include "rlvhandler.h"
+// ============================================================================
+// Camera
+//
+
+bool RlvActions::canChangeCameraFOV(const LLUUID& idRlvObject)
+{
+ // NOTE: if an object has exclusive camera control then all other objects are locked out
+ return (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM)) || (gRlvHandler.hasBehaviour(idRlvObject, RLV_BHVR_SETCAM));
+}
+
+bool RlvActions::canChangeCameraPreset(const LLUUID& idRlvObject)
+{
+ // NOTE: if an object has exclusive camera control then all other objects are locked out
+ return
+ ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM)) || (gRlvHandler.hasBehaviour(idRlvObject, RLV_BHVR_SETCAM)) ) &&
+ (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_EYEOFFSET)) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOCUSOFFSET));
+}
+
+bool RlvActions::canChangeToMouselook()
+{
+ // User can switch to mouselook if:
+ // - not specifically prevented from going into mouselook (NOTE: if an object has exclusive camera control only that object can prevent mouselook)
+ // - there is no minimum camera distance defined (or it's higher than > 0m)
+ const RlvBehaviourModifier* pCamDistMinModifier = RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SETCAM_AVDISTMIN);
+ return
+ ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM)) ? !gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_MOUSELOOK) : !gRlvHandler.hasBehaviour(pCamDistMinModifier->getPrimaryObject(), RLV_BHVR_SETCAM_MOUSELOOK) ) &&
+ ( (!pCamDistMinModifier->hasValue()) || (pCamDistMinModifier->getValue() == 0.f) );
+}
+
+bool RlvActions::isCameraDistanceClamped()
+{
+ return
+ (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_AVDISTMIN)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_AVDISTMAX)) ||
+ (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_ORIGINDISTMIN)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_ORIGINDISTMAX));
+}
+
+bool RlvActions::isCameraFOVClamped()
+{
+ return (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOVMIN)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOVMAX));
+}
+
+bool RlvActions::isCameraPresetLocked()
+{
+ return (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_EYEOFFSET)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOCUSOFFSET));
+}
+
+bool RlvActions::getCameraAvatarDistanceLimits(float& nDistMin, float& nDistMax)
+{
+ bool fDistMin = gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_AVDISTMIN), fDistMax = gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_AVDISTMAX);
+ if ( (fDistMin) || (fDistMax) )
+ {
+ static RlvCachedBehaviourModifier sCamDistMin(RLV_MODIFIER_SETCAM_AVDISTMIN);
+ static RlvCachedBehaviourModifier sCamDistMax(RLV_MODIFIER_SETCAM_AVDISTMAX);
+
+ nDistMax = (fDistMax) ? sCamDistMax : F32_MAX;
+ nDistMin = (fDistMin) ? sCamDistMin : 0.0;
+ return true;
+ }
+ return false;
+}
+
+bool RlvActions::getCameraOriginDistanceLimits(float& nDistMin, float& nDistMax)
+{
+ bool fDistMin = gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_ORIGINDISTMIN), fDistMax = gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_ORIGINDISTMAX);
+ if ( (fDistMin) || (fDistMax) )
+ {
+ static RlvCachedBehaviourModifier sCamDistMin(RLV_MODIFIER_SETCAM_ORIGINDISTMIN);
+ static RlvCachedBehaviourModifier sCamDistMax(RLV_MODIFIER_SETCAM_ORIGINDISTMAX);
+
+ nDistMax = (fDistMax) ? sCamDistMax : F32_MAX;
+ nDistMin = (fDistMin) ? sCamDistMin : 0.0;
+ return true;
+ }
+ return false;
+}
+
+bool RlvActions::getCameraFOVLimits(F32& nFOVMin, F32& nFOVMax)
+{
+ bool fClampMin = gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOVMIN), fClampMax = gRlvHandler.hasBehaviour(RLV_BHVR_SETCAM_FOVMAX);
+ if ( (fClampMin) || (fClampMax) )
+ {
+ static RlvCachedBehaviourModifier sCamFovMin(RLV_MODIFIER_SETCAM_FOVMIN);
+ static RlvCachedBehaviourModifier sCamFovMax(RLV_MODIFIER_SETCAM_FOVMAX);
+
+ nFOVMin = (fClampMin) ? sCamFovMin : LLViewerCamera::getInstance()->getMinView();
+ nFOVMax = (fClampMax) ? sCamFovMax : LLViewerCamera::getInstance()->getMaxView();
+ return true;
+ }
+ return false;
+}
+
// ============================================================================
// Communication/Avatar interaction
-//
+//
bool RlvActions::s_BlockNamesContexts[SNC_COUNT] = { 0 };
-// Checked: 2010-11-30 (RLVa-1.3.0)
+// Little helper function to check the IM exclusion range for @recvim, @sendim and @startim (returns: min_dist <= (pos user - pos target) <= max_dist)
+static bool rlvCheckAvatarIMDistance(const LLUUID& idAvatar, ERlvBehaviourModifier eModDistMin, ERlvBehaviourModifier eModDistMax)
+{
+ LLVector3d posAgent;
+ const RlvBehaviourModifier *pBhvrModDistMin = RlvBehaviourDictionary::instance().getModifier(eModDistMin), *pBhvrModDistMax = RlvBehaviourDictionary::instance().getModifier(eModDistMax);
+ if ( ((pBhvrModDistMin->hasValue()) || (pBhvrModDistMax->hasValue())) && (LLWorld::getInstance()->getAvatar(idAvatar, posAgent)) )
+ {
+ float nDist = llabs(dist_vec_squared(gAgent.getPositionGlobal(), posAgent));
+ return (nDist >= pBhvrModDistMin->getValue()) && (nDist <= pBhvrModDistMax->getValue());
+ }
+ return false;
+}
+
bool RlvActions::canReceiveIM(const LLUUID& idSender)
{
// User can receive an IM from "sender" (could be an agent or a group) if:
- // - not generally restricted from receiving IMs (or the sender is an exception)
+ // - not generally restricted from receiving IMs (or the sender is an exception or inside the exclusion range)
// - not specifically restricted from receiving an IM from the sender
- return
- (!rlv_handler_t::isEnabled()) ||
- ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, idSender)) ) &&
+ return
+ (!isRlvEnabled()) ||
+ ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIM)) || (gRlvHandler.isException(RLV_BHVR_RECVIM, idSender)) || (rlvCheckAvatarIMDistance(idSender, RLV_MODIFIER_RECVIMDISTMIN, RLV_MODIFIER_RECVIMDISTMAX)) ) &&
( (!gRlvHandler.hasBehaviour(RLV_BHVR_RECVIMFROM)) || (!gRlvHandler.isException(RLV_BHVR_RECVIMFROM, idSender)) ) );
}
-// Checked: 2010-11-30 (RLVa-1.3.0)
+bool RlvActions::canPlayGestures()
+{
+ return (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDGESTURE));
+}
+
+bool RlvActions::canSendChannel(int nChannel)
+{
+ return
+ ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNEL)) || (gRlvHandler.isException(RLV_BHVR_SENDCHANNEL, nChannel)) ) &&
+ ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDCHANNELEXCEPT)) || (!gRlvHandler.isException(RLV_BHVR_SENDCHANNELEXCEPT, nChannel)) );
+}
+
bool RlvActions::canSendIM(const LLUUID& idRecipient)
{
// User can send an IM to "recipient" (could be an agent or a group) if:
- // - not generally restricted from sending IMs (or the recipient is an exception)
+ // - not generally restricted from sending IMs (or the recipient is an exception or inside the exclusion range)
// - not specifically restricted from sending an IM to the recipient
- return
- (!rlv_handler_t::isEnabled()) ||
- ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.isException(RLV_BHVR_SENDIM, idRecipient)) ) &&
+ return
+ (!isRlvEnabled()) ||
+ ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) || (gRlvHandler.isException(RLV_BHVR_SENDIM, idRecipient)) || (rlvCheckAvatarIMDistance(idRecipient, RLV_MODIFIER_SENDIMDISTMIN, RLV_MODIFIER_SENDIMDISTMAX)) ) &&
( (!gRlvHandler.hasBehaviour(RLV_BHVR_SENDIMTO)) || (!gRlvHandler.isException(RLV_BHVR_SENDIMTO, idRecipient)) ) );
}
-// Checked: 2011-04-12 (RLVa-1.3.0)
bool RlvActions::canStartIM(const LLUUID& idRecipient)
{
// User can start an IM session with "recipient" (could be an agent or a group) if:
- // - not generally restricted from starting IM sessions (or the recipient is an exception)
+ // - not generally restricted from starting IM sessions (or the recipient is an exception or inside the exclusion range)
// - not specifically restricted from starting an IM session with the recipient
- return
- (!rlv_handler_t::isEnabled()) ||
- ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIM)) || (gRlvHandler.isException(RLV_BHVR_STARTIM, idRecipient)) ) &&
- ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) );
+ // - the session already exists
+ return
+ (!isRlvEnabled()) ||
+ ( ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIM)) || (gRlvHandler.isException(RLV_BHVR_STARTIM, idRecipient)) || (rlvCheckAvatarIMDistance(idRecipient, RLV_MODIFIER_STARTIMDISTMIN, RLV_MODIFIER_STARTIMDISTMAX)) ) &&
+ ( (!gRlvHandler.hasBehaviour(RLV_BHVR_STARTIMTO)) || (!gRlvHandler.isException(RLV_BHVR_STARTIMTO, idRecipient)) ) ) ||
+ ( (hasOpenP2PSession(idRecipient)) || (hasOpenGroupSession(idRecipient)) );
+}
+
+bool RlvActions::canShowName(EShowNamesContext eContext, const LLUUID& idAgent)
+{
+ // Handle most common case upfront
+ if (!s_BlockNamesContexts[eContext])
+ return true;
+
+ if (idAgent.notNull())
+ {
+ switch (eContext)
+ {
+ // Show/hide avatar nametag
+ case SNC_NAMETAG:
+ return (gRlvHandler.isException(RLV_BHVR_SHOWNAMETAGS, idAgent)) || (gAgentID == idAgent);
+ // Show/hide avatar name
+ case SNC_DEFAULT:
+ case SNC_TELEPORTOFFER:
+ case SNC_TELEPORTREQUEST:
+ return gRlvHandler.isException(RLV_BHVR_SHOWNAMES, idAgent);
+ default:
+ return false;
+ }
+ }
+ return false;
}
// ============================================================================
// Movement
//
-// Checked: 2010-12-11 (RLVa-1.2.2)
bool RlvActions::canAcceptTpOffer(const LLUUID& idSender)
{
return ((!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, idSender))) && (canStand());
}
-// Checked: 2013-11-08 (RLVa-1.4.9)
bool RlvActions::autoAcceptTeleportOffer(const LLUUID& idSender)
{
return ((idSender.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTP, idSender))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTP));
}
-// Checked: 2013-11-08 (RLVa-1.4.9)
bool RlvActions::canAcceptTpRequest(const LLUUID& idSender)
{
return (!gRlvHandler.hasBehaviour(RLV_BHVR_TPREQUEST)) || (gRlvHandler.isException(RLV_BHVR_TPREQUEST, idSender));
}
-// Checked: 2013-11-08 (RLVa-1.4.9)
bool RlvActions::autoAcceptTeleportRequest(const LLUUID& idRequester)
{
return ((idRequester.notNull()) && (gRlvHandler.isException(RLV_BHVR_ACCEPTTPREQUEST, idRequester))) || (gRlvHandler.hasBehaviour(RLV_BHVR_ACCEPTTPREQUEST));
}
// ============================================================================
-// World interaction
-//
+// Teleporting
+//
+
+bool RlvActions::canTeleportToLocal(const LLVector3d& posGlobal)
+{
+ // User can initiate a local teleport if:
+ // - not restricted from "sit teleporting" (or the destination is within the allowed xy-radius)
+ // - not restricted from teleporting locally (or the destination is within the allowed xy-radius)
+ // - can stand up (or isn't sitting)
+ // NOTE: if we're teleporting due to an active command we should disregard any restrictions from the same object
+ const LLUUID& idRlvObjExcept = gRlvHandler.getCurrentObject();
+ bool fCanStand = RlvActions::canStand(idRlvObjExcept);
+ if ( (fCanStand) && ((gRlvHandler.hasBehaviourExcept(RLV_BHVR_SITTP, gRlvHandler.getCurrentObject())) || (gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOCAL, gRlvHandler.getCurrentObject()))) )
+ {
+ // User can stand up but is either @sittp or @tplocal restricted so we need to distance check
+ const F32 nDistSq = (LLVector2(posGlobal.mdV[0], posGlobal.mdV[1]) - LLVector2(gAgent.getPositionGlobal().mdV[0], gAgent.getPositionGlobal().mdV[1])).lengthSquared();
+ F32 nMaxDist = llmin(RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_TPLOCALDIST)->getValue(), RLV_MODIFIER_TPLOCAL_DEFAULT);
+ if (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP))
+ nMaxDist = llmin(nMaxDist, RlvBehaviourDictionary::instance().getModifier(RLV_MODIFIER_SITTPDIST)->getValue());
+ return (nDistSq < nMaxDist * nMaxDist);
+ }
+ return fCanStand;
+}
+
+bool RlvActions::canTeleportToLocation()
+{
+ // NOTE: if we're teleporting due to an active command we should disregard any restrictions from the same object
+ const LLUUID& idRlvObjExcept = gRlvHandler.getCurrentObject();
+ return (!gRlvHandler.hasBehaviourExcept(RLV_BHVR_TPLOC, idRlvObjExcept)) && (RlvActions::canStand(idRlvObjExcept));
+}
+
+bool RlvActions::isLocalTp(const LLVector3d& posGlobal)
+{
+ const F32 nDistSq = (LLVector2(posGlobal.mdV[0], posGlobal.mdV[1]) - LLVector2(gAgent.getPositionGlobal().mdV[0], gAgent.getPositionGlobal().mdV[1])).lengthSquared();
+ return nDistSq < RLV_MODIFIER_TPLOCAL_DEFAULT * RLV_MODIFIER_TPLOCAL_DEFAULT;
+}
+
+// ============================================================================
+// World interaction
+//
+
+bool RlvActions::canEdit(const LLViewerObject* pObj)
+{
+ // User can edit the specified object if:
+ // - not generally restricted from editing (or the object's root is an exception)
+ // - not specifically restricted from editing this object's root
+ return
+ (pObj) &&
+ ((!hasBehaviour(RLV_BHVR_EDIT)) || (gRlvHandler.isException(RLV_BHVR_EDIT, pObj->getRootEdit()->getID()))) &&
+ ((!hasBehaviour(RLV_BHVR_EDITOBJ)) || (!gRlvHandler.isException(RLV_BHVR_EDITOBJ, pObj->getRootEdit()->getID())));
+}
+
+
+bool RlvActions::canSit(const LLViewerObject* pObj, const LLVector3& posOffset /*= LLVector3::zero*/)
+{
+ // User can sit on the specified object if:
+ // - not prevented from sitting
+ // - not prevented from standing up or not currently sitting
+ // - not standtp restricted or not currently sitting (if the user is sitting and tried to sit elsewhere the tp would just kick in)
+ // - not a regular sit (i.e. due to @sit:=force)
+ // - not @sittp=n or @fartouch=n restricted or if they clicked on a point within the allowed radius
+ static RlvCachedBehaviourModifier s_nFarTouchDist(RLV_MODIFIER_FARTOUCHDIST);
+ static RlvCachedBehaviourModifier s_nSitTpDist(RLV_MODIFIER_SITTPDIST);
+ return
+ ( (pObj) && (LL_PCODE_VOLUME == pObj->getPCode()) ) &&
+ (!hasBehaviour(RLV_BHVR_SIT)) &&
+ ( ((!hasBehaviour(RLV_BHVR_UNSIT)) && (!hasBehaviour(RLV_BHVR_STANDTP))) ||
+ ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())) ) &&
+ ( ( (NULL != gRlvHandler.getCurrentCommand()) && (RLV_BHVR_SIT == gRlvHandler.getCurrentCommand()->getBehaviourType()) ) ||
+ ( ((!hasBehaviour(RLV_BHVR_SITTP)) || (dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) < s_nSitTpDist * s_nSitTpDist)) &&
+ ((!hasBehaviour(RLV_BHVR_FARTOUCH)) || (dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) < s_nFarTouchDist * s_nFarTouchDist)) ) );
+}
-// Checked: 2010-03-07 (RLVa-1.2.0)
bool RlvActions::canStand()
{
// NOTE: return FALSE only if we're @unsit=n restricted and the avie is currently sitting on something and TRUE for everything else
return (!gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting()));
}
+bool RlvActions::canStand(const LLUUID& idRlvObjExcept)
+{
+ // NOTE: must match generic function above
+ return (!gRlvHandler.hasBehaviourExcept(RLV_BHVR_UNSIT, idRlvObjExcept)) || ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting()));
+}
+
// Checked: 2014-02-24 (RLVa-1.4.10)
bool RlvActions::canShowLocation()
{
@@ -109,7 +324,13 @@ bool RlvActions::canShowLocation()
// ============================================================================
// Helper functions
-//
+//
+
+template<>
+const float& RlvActions::getModifierValue(ERlvBehaviourModifier eBhvrMod)
+{
+ return RlvBehaviourDictionary::instance().getModifier(eBhvrMod)->getValue();
+}
// Checked: 2013-05-10 (RLVa-1.4.9)
bool RlvActions::hasBehaviour(ERlvBehaviour eBhvr)
diff --git a/indra/newview/rlvactions.h b/indra/newview/rlvactions.h
index fbc8ab12ba..e11066e25a 100644
--- a/indra/newview/rlvactions.h
+++ b/indra/newview/rlvactions.h
@@ -1,17 +1,17 @@
-/**
+/**
*
- * Copyright (c) 2009-2013, Kitty Barnett
- *
- * The source code in this file is provided to you under the terms of the
+ * Copyright (c) 2009-2016, Kitty Barnett
+ *
+ * The source code in this file is provided to you under the terms of the
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
- *
+ *
* By copying, modifying or distributing this software, you acknowledge that
- * you have read and understood your obligations described above, and agree to
+ * you have read and understood your obligations described above, and agree to
* abide by those obligations.
- *
+ *
*/
#ifndef RLV_ACTIONS_H
@@ -25,6 +25,51 @@
class RlvActions
{
+ // ======
+ // Camera
+ // ======
+public:
+ /*
+ * Returns true if the specified object cannot manipulate the camera FOV
+ */
+ static bool canChangeCameraFOV(const LLUUID& idRlvObject);
+
+ /*
+ * Returns true if the specified object can manipulate the camera offset and/or focus offset values
+ */
+ static bool canChangeCameraPreset(const LLUUID& idRlvObject);
+
+ /*
+ * Returns true if the user can switch to mouselook
+ */
+ static bool canChangeToMouselook();
+
+ /*
+ * Returns true if the camera's distance (from either the avatar of the focus) is currently restricted/clamped
+ */
+ static bool isCameraDistanceClamped();
+
+ /*
+ * Returns true if the camera's FOV is currently restricted/clamped
+ */
+ static bool isCameraFOVClamped();
+
+ /*
+ * Returns true if the camera offset and focus offset are locked (prevents changing the current camera preset)
+ */
+ static bool isCameraPresetLocked();
+
+ /*
+ * Retrieves the current (avatar or focus) camera distance limits
+ */
+ static bool getCameraAvatarDistanceLimits(float& nDistMin, float& nDistMax);
+ static bool getCameraOriginDistanceLimits(float& nDistMin, float& nDistMax);
+
+ /*
+ * Retrieves the current camera FOV limits - returns isCameraFOVClamped()
+ */
+ static bool getCameraFOVLimits(float& nFOVMin, float& nFOVMax);
+
// ================================
// Communication/Avatar interaction
// ================================
@@ -34,24 +79,34 @@ public:
*/
static bool canReceiveIM(const LLUUID& idSender);
+ /*
+ * Returns true if the user is allowed to send/play gestures (whether active ones from the chat bar or using the gesture preview floater)
+ */
+ static bool canPlayGestures();
+
+ /*
+ * Returns true if the user is allowed to chat on the specified channel
+ */
+ static bool canSendChannel(int nChannel);
+
/*
* Returns true if the user is allowed to send IMs to the specified recipient (can be an avatar or a group)
*/
static bool canSendIM(const LLUUID& idRecipient);
/*
- * Returns true if the user is allowed to start a - P2P or group - conversation with the specified UUID.
+ * Returns true if the user is allowed to start a - P2P or group - conversation with the specified UUID (or if the session already exists)
*/
- static bool canStartIM(const LLUUID& idRecipient); // @startim and @startimto
+ static bool canStartIM(const LLUUID& idRecipient);
/*
* Returns true if an avatar's name should be hidden for the requested operation/context
* (This is used to hide an avatar name in one case but not a near-identical case - such as teleporting a friend vs a nearby agent -
* in a way that limits the amount of code that needs to be changed to carry context from one function to another)
*/
- enum EShowNamesContext { SNC_TELEPORTOFFER = 0, SNC_TELEPORTREQUEST, SNC_COUNT };
- static bool canShowName(EShowNamesContext eContext) { return (eContext < SNC_COUNT) ? !s_BlockNamesContexts[eContext] : false; }
- static void setShowName(EShowNamesContext eContext, bool fShowName) { if ( (eContext < SNC_COUNT) && (isRlvEnabled()) ) { s_BlockNamesContexts[eContext] = !fShowName; } }
+ enum EShowNamesContext { SNC_DEFAULT = 0, SNC_NAMETAG, SNC_TELEPORTOFFER, SNC_TELEPORTREQUEST, SNC_COUNT };
+ static bool canShowName(EShowNamesContext eContext, const LLUUID& idAgent = LLUUID::null);
+ static void setShowName(EShowNamesContext eContext, bool fCanShowName) { if ( (eContext < SNC_COUNT) && (isRlvEnabled()) ) { s_BlockNamesContexts[eContext] = !fCanShowName; } }
protected:
// Backwards logic so that we can initialize to 0 and it won't block when we forget to/don't check if RLVa is disabled
@@ -83,14 +138,44 @@ public:
*/
static bool autoAcceptTeleportRequest(const LLUUID& idRequester);
+ // ===========
+ // Teleporting
+ // ===========
+public:
+ /*
+ * Returns true if the user can teleport locally (short distances)
+ */
+ static bool canTeleportToLocal(const LLVector3d& posGlobal);
+
+ /*
+ * Returns true if the user can teleport to a (remote) location
+ */
+ static bool canTeleportToLocation();
+
+ /*
+ * Returns true if the teleport is considered local (e.g. double-click tp)
+ */
+ static bool isLocalTp(const LLVector3d& posGlobal);
+
// =================
// World interaction
// =================
public:
+ /*
+ * Returns true if the user can edit the specified object
+ */
+ static bool canEdit(const LLViewerObject* pObj);
+
+ /*
+ * Returns true if the user can sit up on the specified object
+ */
+ static bool canSit(const LLViewerObject* pObj, const LLVector3& posOffset = LLVector3::zero);
+
/*
* Returns true if the user can stand up (returns true if the user isn't currently sitting)
*/
static bool canStand();
+ static bool canStand(const LLUUID& idRlvObjExcept);
/*
* Returns true if the user can see their in-world location
@@ -102,13 +187,18 @@ public:
// ================
public:
/*
- * Convenience function to check for a behaviour without having to include rlvhandler.h.
+ * Convenience function to get the current/active value of a behaviour modifier
+ */
+ template static const T& getModifierValue(ERlvBehaviourModifier eBhvrMod);
+
+ /*
+ * Convenience function to check for a behaviour without having to include rlvhandler.h.
* Do NOT call this function if speed is important (i.e. per-frame)
*/
static bool hasBehaviour(ERlvBehaviour eBhvr);
/*
- * Returns true if a - P2P or group - IM session is open with the specified UUID.
+ * Returns true if a - P2P or group - IM session is open with the specified UUID
*/
static bool hasOpenP2PSession(const LLUUID& idAgent);
static bool hasOpenGroupSession(const LLUUID& idGroup);
diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp
index 91da4a1963..341a51a805 100644
--- a/indra/newview/rlvcommon.cpp
+++ b/indra/newview/rlvcommon.cpp
@@ -1,5 +1,5 @@
/**
- * @file rlvcommon.cpp
+ *
* Copyright (c) 2009-2011, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
@@ -20,7 +20,9 @@
#include "llavatarnamecache.h"
#include "llinstantmessage.h"
#include "llnotificationsutil.h"
+#include "llregionhandle.h"
#include "llsdserialize.h"
+#include "lltrans.h"
#include "llviewerparcelmgr.h"
#include "llviewermenu.h"
#include "llviewerregion.h"
@@ -35,8 +37,14 @@
#include "llscriptruntimeperms.h"
#include // icontains
#include // regex_replace_all
-#include //
-#include "lltrace.h"
+#include
+
+// ============================================================================
+// Forward declarations
+//
+
+// llviewermenu.cpp
+LLVOAvatar* find_avatar_from_object(LLViewerObject* object);
// ============================================================================
// RlvNotifications
@@ -73,7 +81,6 @@ bool RlvSettings::fCompositeFolders = false;
bool RlvSettings::fCanOOC = true;
bool RlvSettings::fLegacyNaming = true;
bool RlvSettings::fNoSetEnv = false;
-bool RlvSettings::fShowNameTags = false;
// Checked: 2010-02-27 (RLVa-1.2.0a) | Modified: RLVa-1.1.0i
void RlvSettings::initClass()
@@ -81,9 +88,6 @@ void RlvSettings::initClass()
static bool fInitialized = false;
if (!fInitialized)
{
- // Ansariel: Wired up in LLViewerControl because of FIRE-16601
- //gSavedSettings.getControl(RLV_SETTING_MAIN)->getSignal()->connect(boost::bind(&onChangedSettingMain, _2));
-
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
fCompositeFolders = rlvGetSetting(RLV_SETTING_ENABLECOMPOSITES, false);
if (gSavedSettings.controlExists(RLV_SETTING_ENABLECOMPOSITES))
@@ -97,15 +101,9 @@ void RlvSettings::initClass()
fCanOOC = rlvGetSetting(RLV_SETTING_CANOOC, true);
fNoSetEnv = rlvGetSetting(RLV_SETTING_NOSETENV, false);
- fShowNameTags = rlvGetSetting(RLV_SETTING_SHOWNAMETAGS, false);
- if (gSavedSettings.controlExists(RLV_SETTING_SHOWNAMETAGS))
- gSavedSettings.getControl(RLV_SETTING_SHOWNAMETAGS)->getSignal()->connect(boost::bind(&onChangedSettingBOOL, _2, &fShowNameTags));
-
-#ifdef RLV_EXTENSION_STARTLOCATION
// Don't allow toggling RLVaLoginLastLocation from the debug settings floater
if (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION))
gSavedPerAccountSettings.getControl(RLV_SETTING_LOGINLASTLOCATION)->setHiddenFromSettingsEditor(true);
-#endif // RLV_EXTENSION_STARTLOCATION
if (gSavedSettings.controlExists(RLV_SETTING_TOPLEVELMENU))
gSavedSettings.getControl(RLV_SETTING_TOPLEVELMENU)->getSignal()->connect(boost::bind(&onChangedMenuLevel));
@@ -114,21 +112,19 @@ void RlvSettings::initClass()
}
}
-#ifdef RLV_EXTENSION_STARTLOCATION
- // Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d
- void RlvSettings::updateLoginLastLocation()
+// Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-0.2.1d
+void RlvSettings::updateLoginLastLocation()
+{
+ if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) )
{
- if ( (!LLApp::isQuitting()) && (gSavedPerAccountSettings.controlExists(RLV_SETTING_LOGINLASTLOCATION)) )
+ BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand());
+ if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue)
{
- BOOL fValue = (gRlvHandler.hasBehaviour(RLV_BHVR_TPLOC)) || (!RlvActions::canStand());
- if (gSavedPerAccountSettings.getBOOL(RLV_SETTING_LOGINLASTLOCATION) != fValue)
- {
- gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue);
- gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
- }
+ gSavedPerAccountSettings.setBOOL(RLV_SETTING_LOGINLASTLOCATION, fValue);
+ gSavedPerAccountSettings.saveToFile(gSavedSettings.getString("PerAccountSettingsFile"), TRUE);
}
}
-#endif // RLV_EXTENSION_STARTLOCATION
+}
// Checked: 2011-08-16 (RLVa-1.4.0b) | Added: RLVa-1.4.0b
bool RlvSettings::onChangedMenuLevel()
@@ -152,9 +148,9 @@ void RlvSettings::onChangedSettingMain(const LLSD& sdValue)
{
LLNotificationsUtil::add(
"GenericAlert",
- LLSD().with("MESSAGE", llformat(RlvStrings::getString("message_toggle_restart").c_str(),
- (sdValue.asBoolean()) ? RlvStrings::getString("message_toggle_restart_enabled").c_str()
- : RlvStrings::getString("message_toggle_restart_disabled").c_str())));
+ LLSD().with("MESSAGE", llformat(LLTrans::getString("RLVaToggleMessage").c_str(),
+ (sdValue.asBoolean()) ? LLTrans::getString("RLVaToggleEnabled").c_str()
+ : LLTrans::getString("RLVaToggleDisabled").c_str())));
}
}
@@ -175,14 +171,10 @@ void RlvStrings::initClass()
// Load the default string values
std::vector files = gDirUtilp->findSkinnedFilenames(LLDir::XUI, RLV_STRINGS_FILE, LLDir::ALL_SKINS);
m_StringMapPath = (!files.empty()) ? files.front() : LLStringUtil::null;
- // Old compiler compatibility
- //for (auto itFile = files.cbegin(); itFile != files.cend(); ++itFile)
- BOOST_FOREACH(const std::string file, files)
+ for (std::vector::const_iterator itFile = files.begin(); itFile != files.end(); ++itFile)
{
- //loadFromFile(*itFile, false);
- loadFromFile(file, false);
+ loadFromFile(*itFile, false);
}
- //
// Load the custom string overrides
loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, RLV_STRINGS_FILE), true);
@@ -211,7 +203,7 @@ void RlvStrings::loadFromFile(const std::string& strFilePath, bool fUserOverride
const LLSD& sdStrings = sdFileData["strings"];
for (LLSD::map_const_iterator itString = sdStrings.beginMap(); itString != sdStrings.endMap(); ++itString)
{
- if ((!itString->second.has("value")) || ((fUserOverride) && (!hasString(itString->first))))
+ if ( (!itString->second.has("value")) || ((fUserOverride) && (!hasString(itString->first))) )
continue;
std::list& listValues = m_StringMap[itString->first];
@@ -276,7 +268,6 @@ const std::string& RlvStrings::getAnonym(const std::string& strName)
const std::string& RlvStrings::getString(const std::string& strStringName)
{
static const std::string strMissing = "(Missing RLVa string)";
- initClass(); // Ansariel: Make sure RlvStrings gets initialized before accessing it
string_map_t::const_iterator itString = m_StringMap.find(strStringName);
return (itString != m_StringMap.end()) ? itString->second.back() : strMissing;
}
@@ -293,6 +284,8 @@ const char* RlvStrings::getStringFromReturnCode(ERlvCmdRet eRet)
return "duplicate";
case RLV_RET_SUCCESS_DELAYED:
return "delayed";
+ case RLV_RET_SUCCESS_DEPRECATED:
+ return "deprecated";
case RLV_RET_FAILED_SYNTAX:
return "thingy error";
case RLV_RET_FAILED_OPTION:
@@ -307,8 +300,8 @@ const char* RlvStrings::getStringFromReturnCode(ERlvCmdRet eRet)
return "unknown command";
case RLV_RET_FAILED_NOSHAREDROOT:
return "missing #RLV";
- case RLV_RET_DEPRECATED:
- return "deprecated";
+ case RLV_RET_FAILED_DEPRECATED:
+ return "deprecated and disabled";
// The following are identified by the chat verb
case RLV_RET_RETAINED:
case RLV_RET_SUCCESS:
@@ -401,7 +394,7 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
for (int idxAgent = 0, cntAgent = idAgents.size(); idxAgent < cntAgent; idxAgent++)
{
LLAvatarName avName;
- if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
+ if ( (LLAvatarNameCache::get(idAgents[idxAgent], &avName)) && (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, idAgents[idxAgent])) )
{
const std::string& strDisplayName = escape_for_regex(avName.getDisplayName());
bool fFilterDisplay = (strDisplayName.length() > 2);
@@ -436,7 +429,7 @@ void RlvUtil::filterScriptQuestions(S32& nQuestions, LLSD& sdPayload)
{
// Notify the user that we blocked it since they're not allowed to wear any new attachments
sdPayload["rlv_blocked"] = RLV_STRING_BLOCKED_PERMATTACH;
- nQuestions &= ~SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_ATTACH].permbit;
+ nQuestions &= ~SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_ATTACH].permbit;
}
// Check SCRIPT_PERMISSION_TELEPORT
@@ -444,7 +437,7 @@ void RlvUtil::filterScriptQuestions(S32& nQuestions, LLSD& sdPayload)
{
// Notify the user that we blocked it since they're not allowed to teleport
sdPayload["rlv_blocked"] = RLV_STRING_BLOCKED_PERMTELEPORT;
- nQuestions &= ~SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_TELEPORT].permbit;
+ nQuestions &= ~SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_TELEPORT].permbit;
}
sdPayload["questions"] = nQuestions;
@@ -549,6 +542,18 @@ bool RlvUtil::sendChatReply(S32 nChannel, const std::string& strUTF8Text)
return true;
}
+void RlvUtil::teleportCallback(U64 hRegion, const LLVector3& posRegion, const LLVector3& vecLookAt)
+{
+ if (hRegion)
+ {
+ const LLVector3d posGlobal = from_region_handle(hRegion) + (LLVector3d)posRegion;
+ if (vecLookAt.isExactlyZero())
+ gAgent.teleportViaLocation(posGlobal);
+ else
+ gAgent.teleportViaLocationLookAt(posGlobal, vecLookAt);
+ }
+}
+
// ============================================================================
// Generic menu enablers
//
@@ -563,7 +568,7 @@ bool rlvMenuMainToggleVisible(LLUICtrl* pMenuCtrl)
if (gSavedSettings.getBOOL(RLV_SETTING_MAIN) == rlv_handler_t::isEnabled())
pMenuItem->setLabel(strLabel);
else
- pMenuItem->setLabel(strLabel + RlvStrings::getString("message_toggle_restart_pending"));
+ pMenuItem->setLabel(strLabel + " " + LLTrans::getString("RLVaPendingRestart"));
}
return true;
}
@@ -595,13 +600,19 @@ void rlvMenuToggleVisible()
}
}
+bool rlvMenuCanShowName()
+{
+ const LLVOAvatar* pAvatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
+ return (pAvatar) && (RlvActions::canShowName(RlvActions::SNC_DEFAULT, pAvatar->getID()));
+}
+
// Checked: 2010-04-23 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g
bool rlvMenuEnableIfNot(const LLSD& sdParam)
{
bool fEnable = true;
if (rlv_handler_t::isEnabled())
{
- ERlvBehaviour eBhvr = RlvCommand::getBehaviourFromString(sdParam.asString());
+ ERlvBehaviour eBhvr = RlvBehaviourDictionary::instance().getBehaviourFromString(sdParam.asString(), RLV_TYPE_ADDREM);
fEnable = (eBhvr != RLV_BHVR_UNKNOWN) ? !gRlvHandler.hasBehaviour(eBhvr) : true;
}
return fEnable;
@@ -645,7 +656,7 @@ bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode)
bool RlvSelectIsEditable::apply(LLSelectNode* pNode)
{
const LLViewerObject* pObj = pNode->getObject();
- return (pObj) && (!gRlvHandler.canEdit(pObj));
+ return (pObj) && (!RlvActions::canEdit(pObj));
}
// Checked: 2011-05-28 (RLVa-1.4.0a) | Modified: RLVa-1.4.0a
diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h
index 97f92e55ba..c19f273770 100644
--- a/indra/newview/rlvcommon.h
+++ b/indra/newview/rlvcommon.h
@@ -1,5 +1,5 @@
/**
- * @file rlvcommon.h
+ *
* Copyright (c) 2009-2011, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
@@ -57,6 +57,7 @@ class RlvObject;
struct RlvException;
typedef boost::variant RlvExceptionOption;
+typedef boost::variant RlvBehaviourModifierValue;
class RlvGCTimer;
@@ -97,12 +98,9 @@ public:
static bool getHideLockedAttach() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDATTACH, false); }
static bool getHideLockedInventory() { return rlvGetSetting(RLV_SETTING_HIDELOCKEDINVENTORY, false); }
static bool getSharedInvAutoRename() { return rlvGetSetting(RLV_SETTING_SHAREDINVAUTORENAME, true); }
- static bool getShowNameTags() { return fShowNameTags; }
- #ifdef RLV_EXTENSION_STARTLOCATION
static bool getLoginLastLocation() { return rlvGetPerUserSetting(RLV_SETTING_LOGINLASTLOCATION, true); }
static void updateLoginLastLocation();
- #endif // RLV_EXTENSION_STARTLOCATION
static void initClass();
static void onChangedSettingMain(const LLSD& sdValue);
@@ -116,7 +114,6 @@ protected:
static bool fCanOOC;
static bool fLegacyNaming;
static bool fNoSetEnv;
- static bool fShowNameTags;
};
// ============================================================================
@@ -172,10 +169,11 @@ public:
static void notifyFailedAssertion(const std::string& strAssert, const std::string& strFile, int nLine);
static void sendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null);
- static bool isValidReplyChannel(S32 nChannel);
+ static bool isValidReplyChannel(S32 nChannel, bool fLoopback = false);
static bool sendChatReply(S32 nChannel, const std::string& strUTF8Text);
static bool sendChatReply(const std::string& strChannel, const std::string& strUTF8Text);
+ static void teleportCallback(U64 hRegion, const LLVector3& posRegion, const LLVector3& vecLookAt);
protected:
static bool m_fForceTp; // @standtp
};
@@ -184,16 +182,16 @@ protected:
// Extensibility classes
//
-class RlvCommandHandler
+class RlvExtCommandHandler
{
public:
- virtual ~RlvCommandHandler() {}
+ virtual ~RlvExtCommandHandler() {}
virtual bool onAddRemCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; }
virtual bool onClearCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; }
virtual bool onReplyCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; }
virtual bool onForceCommand(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet) { return false; }
};
-typedef bool (RlvCommandHandler::*rlvCommandHandler)(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet);
+typedef bool (RlvExtCommandHandler::*rlvExtCommandHandler)(const RlvCommand& rlvCmd, ERlvCmdRet& cmdRet);
// ============================================================================
// Generic menu enablers
@@ -201,6 +199,7 @@ typedef bool (RlvCommandHandler::*rlvCommandHandler)(const RlvCommand& rlvCmd, E
bool rlvMenuMainToggleVisible(LLUICtrl* pMenuItem);
void rlvMenuToggleVisible();
+bool rlvMenuCanShowName();
bool rlvMenuEnableIfNot(const LLSD& sdParam);
// ============================================================================
@@ -302,9 +301,9 @@ inline bool RlvUtil::isEmote(const std::string& strUTF8Text)
}
// Checked: 2010-03-09 (RLVa-1.2.0b) | Added: RLVa-1.0.2a
-inline bool RlvUtil::isValidReplyChannel(S32 nChannel)
+inline bool RlvUtil::isValidReplyChannel(S32 nChannel, bool fLoopback /*=false*/)
{
- return (nChannel > 0) && (CHAT_CHANNEL_DEBUG != nChannel);
+ return (nChannel > ((!fLoopback) ? 0 : -1)) && (CHAT_CHANNEL_DEBUG != nChannel);
}
// Checked: 2009-08-05 (RLVa-1.0.1e) | Added: RLVa-1.0.0e
diff --git a/indra/newview/rlvdefines.h b/indra/newview/rlvdefines.h
index 2b49e6f763..a571aea4eb 100644
--- a/indra/newview/rlvdefines.h
+++ b/indra/newview/rlvdefines.h
@@ -1,6 +1,6 @@
/**
- * @file rlvdefines.h
- * Copyright (c) 2009-2011, Kitty Barnett
+ *
+ * Copyright (c) 2009-2016, Kitty Barnett
*
* The source code in this file is provided to you under the terms of the
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
@@ -17,56 +17,20 @@
#ifndef RLV_DEFINES_H
#define RLV_DEFINES_H
-// ============================================================================
-// Extensions
-//
-
-// Extensions
-#define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx
-#define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders: