Compare commits

...

88 Commits

Author SHA1 Message Date
Router Gray
32dbd40e64 Unhack the string_view workaround in llpreviewgesture, with a slightly less hacky hack in llstring. lol. Thanks Liru for making this as lean as ancient gcc can stand it to be. 2020-04-26 08:44:23 -05:00
Router Gray
a69e04a817 [Lib] Update Fmtlib, and enable it for Linux builds. This is bare bones; only removing the Linux workarounds in Cmake. 2020-04-26 00:05:02 -05:00
Router Gray
159de683e8 Correct a logical OR in llrender, and add guards against mCount dropping below zero. (Alchemy and LL sync) 2020-04-26 00:04:48 -05:00
Liru Færs
a9dbaf5e0a Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer 2020-04-23 23:23:38 -04:00
Shyotl
3c3d8c2400 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-04-23 14:57:55 -05:00
Shyotl
b4080f8e2d Demote this to llassert. 2020-04-23 14:57:30 -05:00
Shyotl
5de94d6610 Address several remaining 1.8.9.8373 crashes reported on 2020-04-23 14:56:47 -05:00
Shyotl
829045c262 Haphazard unsigned to signed casts causing problems? Shocker. 2020-04-23 14:51:06 -05:00
Liru Færs
b02d70fba0 Merge stuff from future branch and a logic bug fix by Router 2020-04-23 11:43:22 -04:00
Liru Færs
64ed6e99f0 Fix [NAME] appearing in certain i18n notifications instead of slurls
Thanks for catching this, Nai
2020-04-19 20:12:23 -04:00
Liru Færs
33d3bb2870 [Chat Logs] When migrating file to new name, respect possible new name file
If a new name file exists, copy its contents into our currently tracked
file, because we update our tracked file, the new file can only contain
more recent text (unless a name change back and forth and back happened
since last run, but then the out of order text isn't entirely our fault)

So we copy the new file's text to the bottom of our old file and then
remove the new file, so we can rename our old tracked file to the updated
name.

If we cannot perform the copy, or the delete, we bypass the migration,
leaving our old tracked file as a remnant and begin to track the new name
file because that is more proper than clinging to the old one, and thus
no history is lost to failure.
2020-04-19 20:04:25 -04:00
Liru Færs
4df2193a4c [Chat Logs] Always read from name cache on start to try to update ID Map 2020-04-19 16:40:17 -04:00
Liru Færs
343be08467 [Chat Logs] Break out migrateFile from makeLogFileName for use elsewhere 2020-04-19 15:50:50 -04:00
Liru Færs
788b83bff3 Woops, thanks for catching this, Shyotl! 2020-04-18 19:15:49 -04:00
Liru Færs
c201ac90ba Track log names in a json map AND Fix processing local log load as system
Update old style callbacks for chatFromLogFile functions to lambdas
Keep track of people's log's name using their IDs, but don't rename.
Fallback on ID if name is empty (if the grid is a meanie)
Also track group names this way, sometimes those change.
Prefer std::array, since we're in the area.
2020-04-18 00:17:05 -04:00
Shyotl
af3c66ad08 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-04-16 02:23:32 -05:00
Shyotl
9bffc4bb82 Attempt to squash spatial partition crash. 2020-04-16 00:52:55 -05:00
Shyotl
132db6225e Make Debug configuration compile once more. 2020-04-16 00:49:42 -05:00
Shyotl
257086cbfc Revert texture fetching behavior back closer to v3. 2020-04-16 00:36:56 -05:00
Liru Færs
7755f1ec52 Merge branch 'master' of https://github.com/RouterGray/SingularityViewer 2020-04-11 10:28:04 -04:00
Router Gray
c5f1ac808b Fix postcard sends, use cap for user info, stop using 'from' email as per upstream. Mark final and overrides. Thanks Nadira Fairport for reporting & Liru for help. 2020-04-11 09:22:26 -05:00
Liru Færs
1a8660909d Copy Folder ID and Open Folder In New Window for ANY folder 2020-04-10 17:40:06 -04:00
Shyotl
e6826a4c7c Fix 'is typing...' notifications never going away. 2020-04-10 16:28:37 -05:00
Router Gray
801bb8a075 Compile fix, make types agree in terniary in octree. Thanks Liru. 2020-04-10 13:21:57 -05:00
Shyotl
b2c965e22d Do not apply internal windlight parameter scaling on the sliders themselves. 2020-04-09 14:20:55 -05:00
Shyotl
be3cbc642b Update current region debug string upon cap seed request. Carry over seed cap if dead region is replaced with new. 2020-04-09 02:12:36 -05:00
Shyotl
24331d3c90 Prefer LLPointer over potential for dangling LLSpatialGroup pointers. 2020-04-09 01:56:32 -05:00
Shyotl
8a16e6c99f Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-04-08 18:18:19 -05:00
Shyotl
f36e8fbeca Better crashdump context. 2020-04-08 18:11:09 -05:00
Liru Færs
718ef09adf Fix removing/exporting picks when unable to add more
Wooops, wrote that wrong, must've been tired or something
2020-04-08 09:21:21 -04:00
Liru Færs
6443849ea9 Do not lookup strings in the toolbar per frame, ack! 2020-04-08 08:33:41 -04:00
Liru Færs
cbb7e473ba Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2020-04-08 06:59:48 -04:00
Liru Færs
118957362f Fix mismatched tag 2020-04-08 05:11:11 -04:00
Shyotl
ed7f73769f Potentially fix crash in LLSurface 2020-04-07 23:30:12 -05:00
Liru Færs
ae15dcb318 Merge 41224c57317b6c1b44528aa1dc1f13732cdffe6d from viewer-lion... sorta
Fixes broken default perms message sometimes popping up for certain avs
2020-04-07 16:55:58 -04:00
Liru Færs
c4af22481c Update mesh export code, cause why not. 2020-04-07 15:30:13 -04:00
Liru Færs
ae17f76bb4 Remove now unused LLIMInfo 2020-04-07 10:49:48 -04:00
Liru Færs
7e62d17fda Don't try to use region if it's null for permissions defaults 2020-04-07 05:56:06 -04:00
Liru Færs
f9185e8bc8 Fix mutelist popping up, I think
LLMuteList::add should return false if nothing new was added
2020-04-07 05:55:24 -04:00
Liru Færs
1361f9b57d Simplify selection of mute 2020-04-07 04:29:45 -04:00
Liru Færs
b86eae026b Sync to fix using gMessageSystem when it may not have the right message 2020-04-07 04:29:20 -04:00
Liru Færs
79d938a4f4 Sync LLMuteList code with upstream 2020-04-07 02:51:08 -04:00
Liru Færs
23068a70a2 Select Mute when muting object via Object profile 2020-04-06 07:53:42 -04:00
Shyotl
0aa5e0bb88 Close 'default permissions' window on client disconnect. Nonfunctional after that point anyhow. Also applying setting crashes due to null region after dc. 2020-04-05 14:56:35 -05:00
Router Gray
5040275969 [CMake] Releases shouldn't speak Greek. 2020-04-04 06:47:39 -05:00
Liru Færs
1daccf40ee Move the FMOD Powered By text, for Torric and others 2020-04-04 07:28:19 -04:00
Shyotl
4fd302286b Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-04-03 06:02:48 -05:00
Shyotl
18f9f19e61 Textures mid-decode potentially processing of other textures until complete. Disabled UDP texture fetch fallback when connected to official grid. 2020-04-03 06:01:58 -05:00
Liru Færs
1de6d4461a Add missing EmergencyTeleportSeconds preference to System->Security
Thanks for the heads up about this missing preferences, and for the
Spanish translation, Damian!
2020-04-03 02:53:41 -04:00
Shyotl
4198f47ab6 Fix header breakage in debug/relwithdebug 2020-04-03 00:33:19 -05:00
Shyotl
d9049ba342 Handle AISAPI throttling and status 410 a bit better. 2020-04-02 21:47:07 -05:00
Shyotl
f75ac3e4c2 Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-04-02 20:09:53 -05:00
Liru Færs
06698deaca A couple more sim->region changes 2020-04-02 21:08:23 -04:00
Shyotl
445eb29bd3 Bring aisapi handling closer to LL (code 499 retry, match timeout values, etc) 2020-04-02 20:07:55 -05:00
Shyotl
cc034f6841 Fix inventory scrolling issue when navigating via keyboard. 2020-04-02 20:03:08 -05:00
Liru Færs
3c368651f1 Update crashpad, thanks Rye! 2020-04-02 20:39:01 -04:00
Damian Zhaoying
321730e384 More translations fixes in Area search and menu list owners. 2020-04-02 03:02:23 -03:00
Damian Zhaoying
c2fd88670f Fix some remaining spanish translations. 2020-04-02 02:36:20 -03:00
Liru Færs
7b03103a1f April Fools!
Ha, goteem
2020-04-01 20:52:44 -04:00
Liru Færs
ac3e19c91a Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2020-04-01 20:47:23 -04:00
Liru Færs
4c7d2224e3 Fix reverted xml change, fix formatting 2020-04-01 20:43:00 -04:00
Shyotl
3ab800d99e Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-04-01 19:26:41 -05:00
Shyotl
332cef0f84 Disable debug logging unless RelWithDeb 2020-04-01 19:26:23 -05:00
Damian Zhaoying
9de6d7627b A lot of updates and fixes for spanish language translations. 2020-04-01 20:44:41 -03:00
Liru Færs
98b42e88c1 Fix SV-2282: Incorrect terminology for TP Sound preference UI 2020-04-01 06:56:51 -04:00
Liru Færs
e642e9561a The sim is actually the region 2020-04-01 04:42:34 -04:00
Liru Færs
77f500cb64 Merge branch 'master' of git://github.com/Shyotl/SingularityViewer 2020-04-01 01:59:42 -04:00
Liru Færs
d04a8fc677 Merge branch 'master' of https://github.com/RouterGray/SingularityViewer 2020-04-01 01:59:32 -04:00
Liru Færs
6028ae7b61 Fix group notices: Have a background for the header for certain skins. 2020-04-01 01:56:58 -04:00
Shyotl
347c2cbd8b Fall in line with LL octree code. 2020-03-31 19:07:55 -05:00
Router Gray
919ffb314b [UI] Add missing 'AlreadyInGroup' to strings.xml 2020-03-30 15:24:28 -05:00
Router Gray
c033d69d54 [Linux] More follow-through on earlier manifest tuning, make always really mean always. 2020-03-30 03:06:21 -05:00
Router Gray
356d289972 User request: Add last owner profile button to object inspect. 2020-03-29 19:16:52 -05:00
Router Gray
eeabbce377 [Lib] Update abseil. (Alchemy sync) 2020-03-29 16:39:16 -05:00
Router Gray
0b992fdd46 [Lib] Update nlohmann json and switch it to FetchContent instead of prebuilts. (Alchemy sync) 2020-03-29 16:38:53 -05:00
Router Gray
a7e56d2af9 Fix an accident in a ternary. 2020-03-29 16:31:40 -05:00
Router Gray
b10619e4d8 [Linux] Don't strip binaries, even when building release, unless packaging. Makes quick debugging in the dev checkout easier.
This may need more work if we want to support building an 'install' target, bypassing packaging, but I never hear of anyone doing that.  I'll address it if needed.
2020-03-29 15:24:10 -05:00
Router Gray
74518f299c Merge remote-tracking branch 'github-liru/master' 2020-03-29 15:21:22 -05:00
Liru Færs
407b527a55 [XPTools] Fix linux crash bug, make Cancel button close Experiences floater 2020-03-29 00:43:21 -04:00
Liru Færs
b21cc835b2 Clean up old Experience UI port code 2020-03-28 16:38:14 -04:00
Shyotl
4de8c3a38e Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-03-27 02:56:20 -05:00
Shyotl
72d8b8f78c Potentially harden against region teardown crash. Screw with branching to delve more information from callstacks since dynamic annotations don't seem to work with sentry.io using crashpad lib... sadface. 2020-03-27 02:55:12 -05:00
Liru Færs
45f4f601bf nopaque 2020-03-27 02:35:06 -04:00
Liru Færs
731283aa0b Friendship accepted notifications as tips with linked names 2020-03-27 00:51:45 -04:00
Liru Færs
89ce328ba5 Fix script dialogs showing UI SLURLs when SinguReplaceLinks is false
All interface SLURLs should be force replaced.
Also fixes text boxes not respecting setting at all
2020-03-26 23:31:52 -04:00
Liru Færs
28e5270d87 All agent SLURLs should use the name system names, not just profile ones. 2020-03-25 23:57:05 -04:00
Shyotl
4a237de72a Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer.git 2020-03-25 22:37:23 -05:00
Shyotl
e91aac1dd9 For science. Let's see if sentry.io accepts these annotations... 2020-03-25 22:35:29 -05:00
153 changed files with 2115 additions and 1290 deletions

View File

@@ -410,11 +410,11 @@
<key>archive</key>
<map>
<key>hash</key>
<string>4614b29cc98021cf1770a8290171602b</string>
<string>a96fda7ad5cee967823f5c94390ba35b</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-ce32d093.7-windows-7.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows/crashpad-c6d76a90.194-windows-194.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@@ -424,18 +424,18 @@
<key>archive</key>
<map>
<key>hash</key>
<string>d801461b7a6a40fffab828aa1e01e3e6</string>
<string>5ff95ca1007ed2dc300b59de17453201</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-ce32d093.7-windows64-7.tar.bz2</string>
<string>https://pkg.alchemyviewer.org/repository/autobuild-external/crashpad/windows64/crashpad-c6d76a90.194-windows64-194.tar.bz2</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
<key>version</key>
<string>ce32d093.7</string>
<string>c6d76a90.194</string>
</map>
<key>curl</key>
<map>
@@ -1933,38 +1933,6 @@
<key>version</key>
<string>7.11.1.297294</string>
</map>
<key>modernjson</key>
<map>
<key>copyright</key>
<string>Copyright (c) 2013-2018 Niels Lohmann</string>
<key>description</key>
<string>JSON for Modern C++</string>
<key>license</key>
<string>MIT</string>
<key>license_file</key>
<string>LICENSES/modernjson.txt</string>
<key>name</key>
<string>modernjson</string>
<key>platforms</key>
<map>
<key>common</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>6f11eca7e2a6ca61f9217e949a64f026</string>
<key>hash_algorithm</key>
<string>md5</string>
<key>url</key>
<string>https://depot.alchemyviewer.org/pub/common/lib/modernjson-3.2.0-common-201809210551.tar.bz2</string>
</map>
<key>name</key>
<string>common</string>
</map>
</map>
<key>version</key>
<string>3.2.0</string>
</map>
<key>nvapi</key>
<map>
<key>copyright</key>

View File

@@ -85,6 +85,7 @@ if (WINDOWS)
/TP
/W3
/c
/Zc:__cplusplus
/Zc:forScope
/Zc:rvalueCast
/Zc:wchar_t

View File

@@ -50,7 +50,6 @@ set(cmake_SOURCE_FILES
GooglePerfTools.cmake
Hunspell.cmake
JPEG.cmake
Json.cmake
LLAddBuildTest.cmake
LLAppearance.cmake
LLAudio.cmake

View File

@@ -50,12 +50,10 @@ if (LINUX)
set(DL_LIBRARY dl)
set(RT_LIBRARY rt)
set(PTHREAD_LIBRARY pthread)
set(FMT_LIBRARY "")
else (LINUX)
set(DL_LIBRARY "")
set(RT_LIBRARY "")
set(PTHREAD_LIBRARY "")
set(FMT_LIBRARY fmt::fmt)
endif (LINUX)
if (WINDOWS)
@@ -77,6 +75,6 @@ else (WINDOWS)
set(WINDOWS_LIBRARIES "")
endif (WINDOWS)
mark_as_advanced(DL_LIBRARY RT_LIBRARY PTHREAD_LIBRARY FMT_LIBRARY WINDOWS_LIBRARIES)
mark_as_advanced(DL_LIBRARY RT_LIBRARY PTHREAD_LIBRARY WINDOWS_LIBRARIES)
endif(NOT DEFINED ${CMAKE_CURRENT_LIST_FILE}_INCLUDED)

View File

@@ -270,6 +270,8 @@ if (NOT VIEWER_CHANNEL_GRK)
set(VIEWER_CHANNEL_GRK "\\u03B1") # "α"
elseif (VIEWER_CHANNEL_TYPE MATCHES "Beta")
set(VIEWER_CHANNEL_GRK "\\u03B2") # "β"
else()
set(VIEWER_CHANNEL_GRK "")
endif ()
endif (NOT VIEWER_CHANNEL_GRK)

View File

@@ -9,16 +9,23 @@ FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.11.0
GIT_SHALLOW TRUE
)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 6.1.2
GIT_TAG 0463665ef136d685fe07a564d93c782456456d3d
)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.7.3
GIT_SHALLOW TRUE
)
FetchContent_Declare(
absl
GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git
GIT_TAG 29235139149790f5afc430c11cec8f1eb1677607
GIT_TAG 0033c9ea91a52ade7c6b725aa2ef3cbe15463421
)
# This is a hack because absl has dumb cmake
@@ -40,9 +47,16 @@ if (BUILD_TESTING)
endif()
#Download the rest of the libraries
if(WINDOWS)
FetchContent_MakeAvailable(fmt)
endif()
# Typically you don't care so much for a third party library's tests to be
# run from your own project's code.
set(JSON_BuildTests OFF CACHE INTERNAL "")
# If you only include this third party in PRIVATE source files, you do not
# need to install it when your main project gets installed.
set(JSON_Install OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(nlohmann_json)
unset(CMAKE_FOLDER)
unset(CMAKE_POSITION_INDEPENDENT_CODE)

View File

@@ -12,7 +12,6 @@ include(Linking)
include(Boost)
include(OpenSSL)
include(LLSharedLibs)
include(Json)
include(Copy3rdPartyLibs)
include(ZLIB)
include(URIPARSER)
@@ -300,6 +299,8 @@ target_link_libraries(
${Boost_SYSTEM_LIBRARY}
${CORESERVICES_LIBRARY}
${URIPARSER_LIBRARY}
nlohmann_json::nlohmann_json
absl::strings
${RT_LIBRARY}
)

View File

@@ -353,8 +353,14 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// NEW Macros for debugging, allow the passing of a string tag
#ifdef SHOW_DEBUG
#define DO_DEBUG_LOG
#else
#define DO_DEBUG_LOG if (false)
#endif
// Pass comma separated list of tags (currently only supports up to 0, 1, or 2)
#define LL_DEBUGS(...) lllog(LLError::LEVEL_DEBUG, false, false, ##__VA_ARGS__)
#define LL_DEBUGS(...) DO_DEBUG_LOG lllog(LLError::LEVEL_DEBUG, false, false, ##__VA_ARGS__)
#define LL_INFOS(...) lllog(LLError::LEVEL_INFO, false, false, ##__VA_ARGS__)
#define LL_WARNS(...) lllog(LLError::LEVEL_WARN, false, false, ##__VA_ARGS__)
#define LL_ERRS(...) lllog(LLError::LEVEL_ERROR, false, false, ##__VA_ARGS__)
@@ -363,12 +369,12 @@ typedef LLError::NoClassInfo _LL_CLASS_TO_LOG;
// Only print the log message once (good for warnings or infos that would otherwise
// spam the log file over and over, such as tighter loops).
#define LL_DEBUGS_ONCE(...) lllog(LLError::LEVEL_DEBUG, true, false, ##__VA_ARGS__)
#define LL_DEBUGS_ONCE(...) DO_DEBUG_LOG lllog(LLError::LEVEL_DEBUG, true, false, ##__VA_ARGS__)
#define LL_INFOS_ONCE(...) lllog(LLError::LEVEL_INFO, true, false, ##__VA_ARGS__)
#define LL_WARNS_ONCE(...) lllog(LLError::LEVEL_WARN, true, false, ##__VA_ARGS__)
// No function name
#define LL_DEBUGS_NF(...) lllog(LLError::LEVEL_DEBUG, false, true, ##__VA_ARGS__)
#define LL_DEBUGS_NF(...) DO_DEBUG_LOG {lllog(LLError::LEVEL_DEBUG, false, true, ##__VA_ARGS__)
#define LL_INFOS_NF(...) lllog(LLError::LEVEL_INFO, false, true, ##__VA_ARGS__)
#define LL_WARNS_NF(...) lllog(LLError::LEVEL_WARN, false, true, ##__VA_ARGS__)
#define LL_ERRS_NF(...) lllog(LLError::LEVEL_ERROR, false, true, ##__VA_ARGS__)

View File

@@ -182,10 +182,10 @@ public:
bool operator! () const { return ! mListener; }
/// explicit accessor
const LLEventListener& getListener() const { return *mListener; }
const ::LLEventListener& getListener() const { return *mListener; }
/// implicit conversion to LLEventListener
operator LLEventListener() const { return *mListener; }
operator ::LLEventListener() const { return *mListener; }
/// allow calling directly
bool operator()(const LLSD& event) const;
@@ -277,7 +277,7 @@ namespace LLEventDetail
/// Any callable capable of connecting an LLEventListener to an
/// LLStandardSignal to produce an LLBoundListener can be mapped to this
/// signature.
typedef boost::function<LLBoundListener(const LLEventListener&)> ConnectFunc;
typedef boost::function<LLBoundListener(const ::LLEventListener&)> ConnectFunc;
/// overload of visit_and_connect() when we have a string identifier available
template <typename LISTENER>
@@ -547,7 +547,7 @@ private:
virtual void reset();
private:
virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
virtual LLBoundListener listen_impl(const std::string& name, const ::LLEventListener&,
const NameList& after,
const NameList& before);
std::string mName;
@@ -845,7 +845,7 @@ namespace LLEventDetail
* Visitor binds a reference to LLEventListener so we can track() any
* shared_ptrs we find in the argument list.
*/
Visitor(LLEventListener& listener):
Visitor(::LLEventListener& listener):
mListener(listener)
{
}
@@ -988,7 +988,7 @@ namespace LLEventDetail
|*==========================================================================*/
/// Bind a reference to the LLEventListener to call its track() method.
LLEventListener& mListener;
::LLEventListener& mListener;
};
/**
@@ -1005,7 +1005,7 @@ namespace LLEventDetail
const ConnectFunc& connect_func)
{
// Capture the listener
LLEventListener listener(raw_listener);
::LLEventListener listener(raw_listener);
// Define our Visitor, binding the listener so we can call
// listener.track() if we discover any shared_ptr<Foo>.
LLEventDetail::Visitor visitor(listener);

View File

@@ -1072,8 +1072,8 @@ S32 LLSDBinaryParser::doParse(std::istream& istr, LLSD& data) const
// the size, and read it.
U32 size_nbo = 0;
read(istr, (char*)&size_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(size_nbo);
if(mCheckLimits && (size > mMaxBytesLeft))
S32 size = (S32)ntohl(size_nbo); // Can return negative size if > 2^31.
if(size < 0 || mCheckLimits && (size > mMaxBytesLeft))
{
parse_count = PARSE_FAILURE;
}
@@ -1113,7 +1113,11 @@ S32 LLSDBinaryParser::parseMap(std::istream& istr, LLSD& map) const
map = LLSD::emptyMap();
U32 value_nbo = 0;
read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(value_nbo);
S32 size = (S32)ntohl(value_nbo); // Can return negative size if > 2^31.
if (size < 0)
{
return PARSE_FAILURE;
}
S32 parse_count = 0;
S32 count = 0;
char c = get(istr);
@@ -1167,7 +1171,11 @@ S32 LLSDBinaryParser::parseArray(std::istream& istr, LLSD& array) const
array = LLSD::emptyArray();
U32 value_nbo = 0;
read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(value_nbo);
S32 size = (S32)ntohl(value_nbo); // Can return negative size if > 2^31.
if (size < 0)
{
return PARSE_FAILURE;
}
// *FIX: This would be a good place to reserve some space in the
// array...
@@ -1208,8 +1216,8 @@ bool LLSDBinaryParser::parseString(
// *FIX: This is memory inefficient.
U32 value_nbo = 0;
read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(value_nbo);
if(mCheckLimits && (size > mMaxBytesLeft)) return false;
S32 size = (S32)ntohl(value_nbo); // Can return negative size if > 2^31.
if(size < 0 || mCheckLimits && (size > mMaxBytesLeft)) return false;
std::vector<char> buf;
if(size)
{

View File

@@ -29,6 +29,16 @@
#include <boost/optional/optional.hpp>
#include <string>
#if __cplusplus < 201606
#include <absl/strings/string_view.h>
namespace std {
typedef absl::string_view string_view;
}
#else
#include <string_view>
#endif
#include <cstdio>
//#include <locale>
#include <iomanip>

View File

@@ -126,9 +126,12 @@ public:
// Returns true if this rotation is orthonormal with det ~= 1
inline bool isOkRotation() const;
} LL_ALIGN_POSTFIX(16);
#if !defined(LL_DEBUG)
static_assert(std::is_trivial<LLMatrix3a>::value, "LLMatrix3a must be a trivial type");
static_assert(std::is_standard_layout<LLMatrix3a>::value, "LLMatrix3a must be a standard layout type");
static_assert(std::is_trivial<LLRotation>::value, "LLRotation must be a trivial type");
static_assert(std::is_standard_layout<LLRotation>::value, "LLRotation must be a standard layout type");
#endif
#endif

View File

@@ -718,6 +718,8 @@ inline std::ostream& operator<<(std::ostream& s, const LLMatrix4a& m)
void matMulBoundBox(const LLMatrix4a &a, const LLVector4a *in_extents, LLVector4a *out_extents);
#if !defined(LL_DEBUG)
static_assert(std::is_trivial<LLMatrix4a>::value, "LLMatrix4a must be a trivial type");
static_assert(std::is_standard_layout<LLMatrix4a>::value, "LLMatrix4a must be a standard layout type");
#endif
#endif

View File

@@ -45,6 +45,7 @@
#endif
extern U32 gOctreeMaxCapacity;
extern float gOctreeMinSize;
extern U32 gOctreeReserveCapacity;
#if LL_DEBUG
#define LL_OCTREE_PARANOIA_CHECK 0
@@ -404,7 +405,7 @@ public:
F32 size = mSize[0];
F32 p_size = size * 2.f;
return (radius <= 0.001f && size <= 0.001f) ||
return (radius <= gOctreeMinSize && size <= gOctreeMinSize) ||
(radius <= p_size && radius > size);
}
@@ -511,7 +512,7 @@ public:
//is it here?
if (isInside(data->getPositionGroup()))
{
if (((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius())) ||
if ((((getElementCount() < gOctreeMaxCapacity || getSize()[0] <= gOctreeMinSize) && contains(data->getBinRadius())) ||
(data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity)))
{ //it belongs here
/*mElementCount++;
@@ -566,8 +567,9 @@ public:
LLVector4a val;
val.setSub(center, getCenter());
val.setAbs(val);
S32 lt = val.lessThan(LLVector4a::getEpsilon()).getGatheredBits() & 0x7;
LLVector4a min_diff(gOctreeMinSize);
S32 lt = val.lessThan(min_diff).getGatheredBits() & 0x7;
if( lt == 0x7 )
{
@@ -616,6 +618,7 @@ public:
}
#endif
llassert(size[0] >= gOctreeMinSize*0.5f);
//make the new kid
child = new LLOctreeNode<T>(center, size, this);
addChild(child);
@@ -623,10 +626,7 @@ public:
child->insert(data);
}
}
// Singu note: now that we allow wider range in octree, discard them here
// if they fall out of range
#if 0
else
else if (parent)
{
//it's not in here, give it to the root
OCT_ERRS << "Octree insertion failed, starting over from root!" << LL_ENDL;
@@ -639,12 +639,15 @@ public:
parent = node->getOctParent();
}
if(node != this)
{
node->insert(data);
}
node->insert(data);
}
else
{
// It's not in here, and we are root.
// LLOctreeRoot::insert() should have expanded
// root by now, something is wrong
OCT_ERRS << "Octree insertion failed! Root expansion failed." << LL_ENDL;
}
#endif
return false;
}
@@ -1050,10 +1053,15 @@ public:
{
LLOctreeNode<T>::insert(data);
}
else
else if (node->isInside(data->getPositionGroup()))
{
node->insert(data);
}
else
{
// calling node->insert(data) will return us to root
OCT_ERRS << "Failed to insert data at child node" << LL_ENDL;
}
}
else if (this->getChildCount() == 0)
{
@@ -1088,6 +1096,8 @@ public:
this->setSize(size2);
this->updateMinMax();
llassert(size[0] >= gOctreeMinSize);
//copy our children to a new branch
LLOctreeNode<T>* newnode = new LLOctreeNode<T>(center, size, this);

View File

@@ -104,7 +104,8 @@ private:
LL_ALIGN_16(LLVector4a mV);
} LL_ALIGN_POSTFIX(16);
#if !defined(LL_DEBUG)
static_assert(std::is_trivial<LLPlane>::value, "LLPlane must be a trivial type");
static_assert(std::is_standard_layout<LLPlane>::value, "LLPlane must be a standard layout type");
#endif
#endif // LL_LLPLANE_H

View File

@@ -105,7 +105,9 @@ protected:
} LL_ALIGN_POSTFIX(16);
#if !defined(LL_DEBUG)
static_assert(std::is_trivial<LLQuaternion2>::value, "LLQuaternion2 must be a trivial type");
static_assert(std::is_standard_layout<LLQuaternion2>::value, "LLQuaternion2 must be a standard layout type");
#endif
#endif

View File

@@ -350,6 +350,8 @@ inline std::ostream& operator<<(std::ostream& s, const LLVector4a& v)
return s;
}
#if !defined(LL_DEBUG)
static_assert(std::is_trivial<LLVector4a>::value, "LLVector4a must be a be a trivial type");
static_assert(std::is_standard_layout<LLVector4a>::value, "LLVector4a must be a standard layout type");
#endif
#endif

View File

@@ -960,4 +960,5 @@ P(webProfileResponders);
P(wholeModelFeeResponder);
P(wholeModelUploadResponder);
P2(XMLRPCResponder, connect_40s);
P(getUpdateInfoResponder);
P(getUpdateInfoResponder);
P2(AISAPIResponder, connect_60s);

View File

@@ -262,6 +262,8 @@ LLCacheName::~LLCacheName()
delete &impl;
}
const ReverseCache& LLCacheName::getReverseMap() const { return impl.mReverseCache; }
LLCacheName::Impl::Impl(LLMessageSystem* msg)
: mMsg(msg), mUpstreamHost(LLHost::invalid)
{

View File

@@ -57,6 +57,8 @@ public:
LLCacheName(LLMessageSystem* msg, const LLHost& upstream_host);
~LLCacheName();
const std::map<std::string, LLUUID>& getReverseMap() const;
// registers the upstream host
// for viewers, this is the currently connected simulator
// for simulators, this is the data server

View File

@@ -58,103 +58,6 @@ const std::string SYSTEM_FROM("Second Life");
const std::string INTERACTIVE_SYSTEM_FROM("F387446C-37C4-45f2-A438-D99CBDBB563B");
const S32 IM_TTL = 1;
/**
* LLIMInfo
*/
LLIMInfo::LLIMInfo() :
mFromGroup(FALSE),
mParentEstateID(0),
mOffline(0),
mViewerThinksToIsOnline(false),
mIMType(IM_NOTHING_SPECIAL),
mTimeStamp(0),
mSource(IM_FROM_SIM),
mTTL(IM_TTL)
{
}
LLIMInfo::LLIMInfo(
const LLUUID& from_id,
BOOL from_group,
const LLUUID& to_id,
EInstantMessage im_type,
const std::string& name,
const std::string& message,
const LLUUID& id,
U32 parent_estate_id,
const LLUUID& region_id,
const LLVector3& position,
LLSD data,
U8 offline,
U32 timestamp,
EIMSource source,
S32 ttl) :
mFromID(from_id),
mFromGroup(from_group),
mToID(to_id),
mParentEstateID(0),
mRegionID(region_id),
mPosition(position),
mOffline(offline),
mViewerThinksToIsOnline(false),
mIMType(im_type),
mID(id),
mTimeStamp(timestamp),
mName(name),
mMessage(message),
mData(data),
mSource(source),
mTTL(ttl)
{
}
LLIMInfo::LLIMInfo(LLMessageSystem* msg, EIMSource source, S32 ttl) :
mViewerThinksToIsOnline(false),
mSource(source),
mTTL(ttl)
{
unpackMessageBlock(msg);
}
LLIMInfo::~LLIMInfo()
{
}
void LLIMInfo::packInstantMessage(LLMessageSystem* msg) const
{
LL_DEBUGS() << "LLIMInfo::packInstantMessage()" << LL_ENDL;
msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
packMessageBlock(msg);
}
void LLIMInfo::packMessageBlock(LLMessageSystem* msg) const
{
// Construct binary bucket
std::vector<U8> bucket;
if (mData.has("binary_bucket"))
{
bucket = mData["binary_bucket"].asBinary();
}
pack_instant_message_block(
msg,
mFromID,
mFromGroup,
LLUUID::null,
mToID,
mName,
mMessage,
mOffline,
mIMType,
mID,
mParentEstateID,
mRegionID,
mPosition,
mTimeStamp,
&bucket[0],
bucket.size());
}
void pack_instant_message(
LLMessageSystem* msg,
const LLUUID& from_id,
@@ -264,124 +167,3 @@ void pack_instant_message_block(
}
msg->addBinaryDataFast(_PREHASH_BinaryBucket, bb, binary_bucket_size);
}
void LLIMInfo::unpackMessageBlock(LLMessageSystem* msg)
{
msg->getUUIDFast(_PREHASH_AgentData, _PREHASH_AgentID, mFromID);
msg->getBOOLFast(_PREHASH_MessageBlock, _PREHASH_FromGroup, mFromGroup);
msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ToAgentID, mToID);
msg->getU32Fast(_PREHASH_MessageBlock, _PREHASH_ParentEstateID, mParentEstateID);
msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_RegionID, mRegionID);
msg->getVector3Fast(_PREHASH_MessageBlock, _PREHASH_Position, mPosition);
msg->getU8Fast(_PREHASH_MessageBlock, _PREHASH_Offline, mOffline);
U8 dialog;
msg->getU8Fast(_PREHASH_MessageBlock, _PREHASH_Dialog, dialog);
mIMType = (EInstantMessage) dialog;
msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ID, mID);
msg->getU32Fast(_PREHASH_MessageBlock, _PREHASH_Timestamp, mTimeStamp);
msg->getStringFast(_PREHASH_MessageBlock, _PREHASH_FromAgentName, mName);
msg->getStringFast(_PREHASH_MessageBlock, _PREHASH_Message, mMessage);
S32 binary_bucket_size = llmin(
MTUBYTES,
msg->getSizeFast(
_PREHASH_MessageBlock,
_PREHASH_BinaryBucket));
if(binary_bucket_size > 0)
{
std::vector<U8> bucket;
bucket.resize(binary_bucket_size);
msg->getBinaryDataFast(
_PREHASH_MessageBlock,
_PREHASH_BinaryBucket,
&bucket[0],
0,
0,
binary_bucket_size);
mData["binary_bucket"] = bucket;
}
else
{
mData.clear();
}
}
LLSD im_info_to_llsd(LLPointer<LLIMInfo> im_info)
{
LLSD param_version;
param_version["version"] = 1;
LLSD param_message;
param_message["from_id"] = im_info->mFromID;
param_message["from_group"] = im_info->mFromGroup;
param_message["to_id"] = im_info->mToID;
param_message["from_name"] = im_info->mName;
param_message["message"] = im_info->mMessage;
param_message["type"] = (S32)im_info->mIMType;
param_message["id"] = im_info->mID;
param_message["timestamp"] = (S32)im_info->mTimeStamp;
param_message["offline"] = (S32)im_info->mOffline;
param_message["parent_estate_id"] = (S32)im_info->mParentEstateID;
param_message["region_id"] = im_info->mRegionID;
param_message["position"] = ll_sd_from_vector3(im_info->mPosition);
param_message["data"] = im_info->mData;
param_message["source"]= im_info->mSource;
param_message["ttl"] = im_info->mTTL;
LLSD param_agent;
param_agent["agent_id"] = im_info->mFromID;
LLSD params;
params["version_params"] = param_version;
params["message_params"] = param_message;
params["agent_params"] = param_agent;
return params;
}
LLPointer<LLIMInfo> llsd_to_im_info(const LLSD& im_info_sd)
{
LLSD param_message = im_info_sd["message_params"];
LLSD param_agent = im_info_sd["agent_params"];
LLPointer<LLIMInfo> im_info = new LLIMInfo(
param_message["from_id"].asUUID(),
param_message["from_group"].asBoolean(),
param_message["to_id"].asUUID(),
(EInstantMessage) param_message["type"].asInteger(),
param_message["from_name"].asString(),
param_message["message"].asString(),
param_message["id"].asUUID(),
(U32) param_message["parent_estate_id"].asInteger(),
param_message["region_id"].asUUID(),
ll_vector3_from_sd(param_message["position"]),
param_message["data"],
(U8) param_message["offline"].asInteger(),
(U32) param_message["timestamp"].asInteger(),
(EIMSource)param_message["source"].asInteger(),
param_message["ttl"].asInteger());
return im_info;
}
LLPointer<LLIMInfo> LLIMInfo::clone()
{
return new LLIMInfo(
mFromID,
mFromGroup,
mToID,
mIMType,
mName,
mMessage,
mID,
mParentEstateID,
mRegionID,
mPosition,
mData,
mOffline,
mTimeStamp,
mSource,
mTTL);
}

View File

@@ -225,62 +225,6 @@ extern const std::string INTERACTIVE_SYSTEM_FROM;
// Number of retry attempts on sending the im.
extern const S32 IM_TTL;
class LLIMInfo : public LLRefCount
{
protected:
LLIMInfo();
~LLIMInfo();
public:
LLIMInfo(LLMessageSystem* msg,
EIMSource source = IM_FROM_SIM,
S32 ttl = IM_TTL);
LLIMInfo(
const LLUUID& from_id,
BOOL from_group,
const LLUUID& to_id,
EInstantMessage im_type,
const std::string& name,
const std::string& message,
const LLUUID& id,
U32 parent_estate_id,
const LLUUID& region_id,
const LLVector3& position,
LLSD data,
U8 offline,
U32 timestamp,
EIMSource source,
S32 ttl = IM_TTL);
void packInstantMessage(LLMessageSystem* msg) const;
void packMessageBlock(LLMessageSystem* msg) const;
void unpackMessageBlock(LLMessageSystem* msg);
LLPointer<LLIMInfo> clone();
public:
LLUUID mFromID;
BOOL mFromGroup;
LLUUID mToID;
U32 mParentEstateID;
LLUUID mRegionID;
LLVector3 mPosition;
U8 mOffline;
bool mViewerThinksToIsOnline;
EInstantMessage mIMType;
LLUUID mID;
U32 mTimeStamp;
std::string mName;
std::string mMessage;
LLSD mData;
EIMSource mSource;
S32 mTTL;
};
LLPointer<LLIMInfo> llsd_to_im_info(const LLSD& im_info_sd);
LLSD im_info_to_llsd(LLPointer<LLIMInfo> im_info);
void pack_instant_message(
LLMessageSystem* msgsystem,
const LLUUID& from_id,

View File

@@ -2146,7 +2146,7 @@ void LLRender::setLineWidth(F32 line_width)
}
if (mNewContext.lineWidth != line_width || mDirty)
{
if (mMode == LLRender::LINES || LLRender::LINE_STRIP)
if (mMode == LLRender::LINES || mMode == LLRender::LINE_STRIP)
{
flush();
}
@@ -2492,7 +2492,8 @@ void LLRender::vertexBatchPreTransformed(LLVector4a* verts, S32 vert_count)
mColorsp[mCount] = mColorsp[mCount-1];
}
mVerticesp[mCount] = mVerticesp[mCount-1];
if (mCount > 0) // ND: Guard against crashes if mCount is zero, yes it can happen
mVerticesp[mCount] = mVerticesp[mCount-1];
mPrimitiveReset = false;
}
@@ -2528,9 +2529,12 @@ void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, S32
mCount++;
mColorsp[mCount] = mColorsp[mCount-1];
}
mVerticesp[mCount] = mVerticesp[mCount-1];
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
if (mCount > 0)
{
mVerticesp[mCount] = mVerticesp[mCount - 1];
mTexcoordsp[mCount] = mTexcoordsp[mCount - 1];
}
mPrimitiveReset = false;
}
@@ -2564,9 +2568,12 @@ void LLRender::vertexBatchPreTransformed(LLVector4a* verts, LLVector2* uvs, LLCo
mColorsp.copyArray(mCount, colors, vert_count);
mCount += vert_count;
mVerticesp[mCount] = mVerticesp[mCount-1];
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
mColorsp[mCount] = mColorsp[mCount-1];
if (mCount > 0)
{
mVerticesp[mCount] = mVerticesp[mCount - 1];
mTexcoordsp[mCount] = mTexcoordsp[mCount - 1];
mColorsp[mCount] = mColorsp[mCount - 1];
}
mPrimitiveReset = false;
}

View File

@@ -1197,6 +1197,10 @@ void LLVertexBuffer::genBuffer(U32 size)
{
mMappedData = sDynamicVBOPool.allocate(mGLBuffer, mSize);
}
if ((sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB) && !mMappedData)
{
LL_ERRS() << "mMappedData allocation failedd" << LL_ENDL;
}
sGLCount++;
}
@@ -1213,6 +1217,10 @@ void LLVertexBuffer::genIndices(U32 size)
{
mMappedIndexData = sDynamicIBOPool.allocate(mGLIndices, mIndicesSize);
}
if ((sDisableVBOMapping || mUsage != GL_DYNAMIC_DRAW_ARB) && !mMappedIndexData)
{
LL_ERRS() << "mMappedIndexData allocation failedd" << LL_ENDL;
}
sGLCount++;
}
@@ -1848,6 +1856,7 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
LL_ERRS() << "Attempted to map a specific range of a buffer that was already mapped." << LL_ENDL;
}
bool was_locked = mIndexLocked;
if (!mIndexLocked)
{
mIndexLocked = true;
@@ -1942,6 +1951,10 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
LL_ERRS() << "glMapBuffer returned NULL (no index data)" << LL_ENDL;
}
else if (was_locked)
{
LL_ERRS() << "mIndexLocked was true but no Index data allocated" << LL_ENDL;
}
else
{
LL_ERRS() << "memory allocation for Index data failed. " << LL_ENDL;

View File

@@ -666,7 +666,7 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa
LLAvatarName av_name;
if (LLAvatarNameCache::get(agent_id, &av_name))
{
std::string label = av_name.getCompleteName();
std::string label = av_name.getNSName();
// handle suffixes like /mute or /offerteleport
label = localize_slapp_label(url, label);

View File

@@ -18,7 +18,6 @@ include(FMODSTUDIO)
include(GeneratePrecompiledHeader)
include(GLOD)
include(Hunspell)
include(Json)
include(LLAddBuildTest)
include(LLAppearance)
include(LLAudio)
@@ -63,7 +62,6 @@ include_directories(
${STATEMACHINE_INCLUDE_DIRS}
${DBUSGLIB_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS}
${JSON_INCLUDE_DIR}
${GLOD_INCLUDE_DIR}
${LLAUDIO_INCLUDE_DIRS}
${LLCHARACTER_INCLUDE_DIRS}
@@ -1710,7 +1708,8 @@ target_link_libraries(${VIEWER_BINARY_NAME}
${LLAPPEARANCE_LIBRARIES}
absl::flat_hash_map
absl::node_hash_map
${FMT_LIBRARY}
nlohmann_json::nlohmann_json
fmt::fmt
)
if (LINUX)

View File

@@ -1 +1 @@
1.8.7
1.8.9

View File

@@ -12628,6 +12628,18 @@ This should be as low as possible, but too low may break functionality</string>
<integer>128</integer>
</map>
<key>OctreeMinimumNodeSize</key>
<map>
<key>Comment</key>
<string>Minimum size of any octree node</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.01</real>
</map>
<key>OctreeReserveNodeCapacity</key>
<map>
<key>Comment</key>

View File

@@ -207,6 +207,7 @@ void LLPrefsAscentSys::refreshValues()
mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps");
mNumScriptDiff = gSavedSettings.getF32("Ascentnumscriptdiff");
mReplaceLinks = gSavedSettings.getBOOL("SinguReplaceLinks");
mEmergencySeconds = gSavedPerAccountSettings.getU32("EmergencyTeleportSeconds");
mLandmark = gSavedPerAccountSettings.getString("EmergencyTeleportLandmark");
mLandmarkBackup = gSavedPerAccountSettings.getString("EmergencyTeleportLandmarkBackup");
@@ -353,6 +354,7 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps);
gSavedSettings.setF32("Ascentnumscriptdiff", mNumScriptDiff);
gSavedSettings.setBOOL("SinguReplaceLinks", mReplaceLinks);
gSavedPerAccountSettings.setU32("EmergencyTeleportSeconds", mEmergencySeconds);
gSavedPerAccountSettings.setString("EmergencyTeleportLandmark", mLandmark);
gSavedPerAccountSettings.setString("EmergencyTeleportLandmarkBackup", mLandmarkBackup);

View File

@@ -118,6 +118,7 @@ private:
bool mDisplayScriptJumps;
bool mReplaceLinks;
F32 mNumScriptDiff;
U32 mEmergencySeconds;
std::string mLandmark;
std::string mLandmarkBackup;

View File

@@ -163,10 +163,11 @@ Wavefront::Wavefront(LLFace* face, LLPolyMesh* mesh, const LLXform* transform, c
if (transform_normals) Transform(normals, transform_normals);
const U32 pcount = mesh ? mesh->getNumFaces() : (vb->getNumIndices()/3); //indices
const U16 offset = face->getIndicesStart(); //indices
const U32 offset = face->getIndicesStart(); //indices
for (U32 i = 0; i < pcount; ++i)
{
triangles.push_back(tri(getIndices[i * 3 + offset] + start, getIndices[i * 3 + 1 + offset] + start, getIndices[i * 3 + 2 + offset] + start));
const auto off = i * 3 + offset;
triangles.push_back(tri(getIndices[off] + start, getIndices[off + 1] + start, getIndices[off + 2] + start));
}
}
@@ -174,9 +175,9 @@ void Wavefront::Transform(vert_t& v, const LLXform* x) //recursive
{
LLMatrix4 m;
x->getLocalMat4(m);
for (vert_t::iterator iterv = v.begin(); iterv != v.end(); ++iterv)
for (auto& i : v)
{
iterv->first = iterv->first * m;
i.first = i.first * m;
}
if (const LLXform* xp = x->getParent()) Transform(v, xp);
@@ -186,9 +187,9 @@ void Wavefront::Transform(vec3_t& v, const LLXform* x) //recursive
{
LLMatrix4 m;
x->getLocalMat4(m);
for (vec3_t::iterator iterv = v.begin(); iterv != v.end(); ++iterv)
for (auto& i : v)
{
*iterv = *iterv * m;
i = i * m;
}
if (const LLXform* xp = x->getParent()) Transform(v, xp);
@@ -252,9 +253,9 @@ namespace
asset_id_matches);
// See if any of the inventory items matching this sculpt id are exportable
for (U32 i = 0; i < items.size(); i++)
for (const auto& item : items)
{
const LLPermissions item_permissions = items[i]->getPermissions();
const LLPermissions item_permissions = item->getPermissions();
if (item_permissions.allowExportBy(gAgentID, LFSimFeatureHandler::instance().exportPolicy()))
{
return true;
@@ -269,9 +270,9 @@ namespace
}
}
class LFSaveSelectedObjects : public view_listener_t
class LFSaveSelectedObjects final : public view_listener_t
{
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) override
{
if (LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection())
{
@@ -288,10 +289,10 @@ namespace
S32 included = 0;
for (LLObjectSelection::iterator iter = selection->begin(); iter != selection->end(); ++iter)
{
total++;
++total;
LLSelectNode* node = *iter;
if (!can_export_node(node)) continue;
included++;
++included;
wfsaver->Add(node->getObject());
}
if (wfsaver->obj_v.empty())
@@ -322,12 +323,12 @@ void WavefrontSaver::Add(const LLVOAvatar* av_vo) //adds attachments, too!
{
offset = -av_vo->getRenderPosition();
avatar_joint_list_t vjv = av_vo->mMeshLOD;
for (avatar_joint_list_t::const_iterator itervj = vjv.begin(); itervj != vjv.end(); ++itervj)
for (const auto& itervj : vjv)
{
const LLViewerJoint* vj = dynamic_cast<LLViewerJoint*>(*itervj);
const auto* vj = dynamic_cast<const LLViewerJoint*>(itervj);
if (!vj || vj->mMeshParts.empty()) continue;
LLViewerJointMesh* vjm = dynamic_cast<LLViewerJointMesh*>(vj->mMeshParts[0]); //highest LOD
auto* vjm = dynamic_cast<LLViewerJointMesh*>(vj->mMeshParts[0]); //highest LOD
if (!vjm) continue;
vjm->updateJointGeometry();
@@ -355,21 +356,19 @@ void WavefrontSaver::Add(const LLVOAvatar* av_vo) //adds attachments, too!
Add(Wavefront(face, pm, NULL, &normfix));
}
for (LLVOAvatar::attachment_map_t::const_iterator iter = av_vo->mAttachmentPoints.begin(); iter != av_vo->mAttachmentPoints.end(); ++iter)
for (const auto& ap : av_vo->mAttachmentPoints)
{
LLViewerJointAttachment* ja = iter->second;
LLViewerJointAttachment* ja = ap.second;
if (!ja) continue;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator itero = ja->mAttachedObjects.begin(); itero != ja->mAttachedObjects.end(); ++itero)
for (const auto& o : ja->mAttachedObjects)
{
LLViewerObject* o = *itero;
if (!o) continue;
std::vector<LLViewerObject*> prims;
o->addThisAndAllChildren(prims);
for (std::vector<LLViewerObject* >::iterator iterc = prims.begin(); iterc != prims.end(); ++iterc)
for (const auto& c : prims)
{
const LLViewerObject* c = *iterc;
if (!c) continue;
if (LLSelectNode* n = LLSelectMgr::getInstance()->getSelection()->findNode(const_cast<LLViewerObject*>(c)))
{
@@ -400,9 +399,9 @@ void WavefrontSaver::Add(const LLVOAvatar* av_vo) //adds attachments, too!
}
namespace
{
class LFSaveSelectedAvatar : public view_listener_t
class LFSaveSelectedAvatar final : public view_listener_t
{
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) override
{
if (const LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()))
{
@@ -446,49 +445,48 @@ bool WavefrontSaver::saveFile(LLFILE* fp)
int num = 0;
int index = 0;
for (std::vector<Wavefront>::iterator w_iter = obj_v.begin(); w_iter != obj_v.end(); ++w_iter)
for (const auto& obj : obj_v)
{
int count = 0;
std::string name = (*w_iter).name;
std::string name = obj.name;
if (name.empty()) name = llformat("%d", num++);
vert_t vertices = (*w_iter).vertices;
vec3_t normals = (*w_iter).normals;
tri_t triangles = (*w_iter).triangles;
auto& vertices = obj.vertices;
auto& normals = obj.normals;
auto& triangles = obj.triangles;
//Write Object
write_or_bust(fp, "o " + name + "\n");
write_or_bust(fp, "o " + name + '\n');
//Write vertices; swap axes if necessary
static const LLCachedControl<bool> swapYZ("OBJExportSwapYZ", false);
const double xm = swapYZ ? -1.0 : 1.0;
const int y = swapYZ ? 2 : 1;
const int z = swapYZ ? 1 : 2;
for (vert_t::iterator v_iter = vertices.begin(); v_iter != vertices.end(); ++v_iter)
for (const auto& vert : vertices)
{
++count;
const LLVector3 v = v_iter->first + offset;
const LLVector3 v = vert.first + offset;
write_or_bust(fp, llformat("v %f %f %f\n",v[0] * xm, v[y], v[z]));
}
for (vec3_t::iterator n_iter = normals.begin(); n_iter != normals.end(); ++n_iter)
for (const auto& n : normals)
{
const LLVector3 n = *n_iter;
write_or_bust(fp, llformat("vn %f %f %f\n",n[0] * xm, n[y], n[z]));
}
for (vert_t::iterator v_iter = vertices.begin(); v_iter != vertices.end(); ++v_iter)
for (const auto& vert : vertices)
{
write_or_bust(fp, llformat("vt %f %f\n", v_iter->second[0], v_iter->second[1]));
write_or_bust(fp, llformat("vt %f %f\n", vert.second[0], vert.second[1]));
}
//Write triangles
for (tri_t::iterator t_iter = triangles.begin(); t_iter != triangles.end(); ++t_iter)
for (const auto& triangle : triangles)
{
const int f1 = t_iter->v0 + index + 1;
const int f2 = t_iter->v1 + index + 1;
const int f3 = t_iter->v2 + index + 1;
const int f1 = triangle.v0 + index + 1;
const int f2 = triangle.v1 + index + 1;
const int f3 = triangle.v2 + index + 1;
write_or_bust(fp, llformat("f %d/%d/%d %d/%d/%d %d/%d/%d\n",
f1,f1,f1,f2,f2,f2,f3,f3,f3));
}

View File

@@ -32,16 +32,18 @@
// library includes
#include "aifilepicker.h"
#include "llavatarnamecache.h"
#include "llnotificationsutil.h"
// newview includes
#include "lfsimfeaturehandler.h"
#include "llface.h"
#include "llvovolume.h"
#include "llviewerinventory.h"
#include "llinventorymodel.h"
#include "llinventoryfunctions.h"
#include "llface.h"
#include "llversioninfo.h"
#include "llviewerinventory.h"
#include "llviewertexturelist.h"
#include "llvovolume.h"
// menu includes
#include "llevent.h"
@@ -74,11 +76,11 @@ typedef LLMemberListener<LLView> view_listener_t;
namespace DAEExportUtil
{
static LLUUID LL_TEXTURE_PLYWOOD = LLUUID("89556747-24cb-43ed-920b-47caed15465f");
static LLUUID LL_TEXTURE_BLANK = LLUUID("5748decc-f629-461c-9a36-a35a221fe21f");
static LLUUID LL_TEXTURE_INVISIBLE = LLUUID("38b86f85-2575-52a9-a531-23108d8da837");
static LLUUID LL_TEXTURE_TRANSPARENT = LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903");
static LLUUID LL_TEXTURE_MEDIA = LLUUID("8b5fec65-8d8d-9dc5-cda8-8fdf2716e361");
const auto LL_TEXTURE_PLYWOOD = LLUUID("89556747-24cb-43ed-920b-47caed15465f");
const auto LL_TEXTURE_BLANK = LLUUID("5748decc-f629-461c-9a36-a35a221fe21f");
const auto LL_TEXTURE_INVISIBLE = LLUUID("38b86f85-2575-52a9-a531-23108d8da837");
const auto LL_TEXTURE_TRANSPARENT = LLUUID("8dcd4a48-2d37-4909-9f78-f7a9eb4ef903");
const auto LL_TEXTURE_MEDIA = LLUUID("8b5fec65-8d8d-9dc5-cda8-8fdf2716e361");
enum image_format_type
{
@@ -105,23 +107,17 @@ namespace DAEExportUtil
// See if any of the inventory items matching this texture id are exportable
ExportPolicy policy = LFSimFeatureHandler::instance().exportPolicy();
for (size_t i = 0; i < items.size(); i++)
for (const auto& item : items)
{
const LLPermissions item_permissions = items[i]->getPermissions();
const LLPermissions item_permissions = item->getPermissions();
if (item_permissions.allowExportBy(gAgentID, policy))
{
if (name != NULL)
{
(*name) = items[i]->getName();
}
if (name) *name = item->getName();
return true;
}
}
if (name != NULL)
{
(*name) = id.getString();
}
if (name) *name = id.getString();
return (policy & ep_full_perm) == ep_full_perm;
}
@@ -206,7 +202,7 @@ public:
}
}
BOOL postBuild()
BOOL postBuild() override
{
mFileName = getChildView("file name editor");
mExportBtn = getChildView("export button");
@@ -306,14 +302,9 @@ public:
S32 getNumExportableTextures()
{
S32 res = 0;
for (DAESaver::string_list_t::const_iterator t = mSaver.mTextureNames.begin(); t != mSaver.mTextureNames.end(); ++t)
for (const auto& name : mSaver.mTextureNames)
{
std::string name = *t;
if (!name.empty())
{
++res;
}
if (!name.empty()) ++res;
}
return res;
@@ -365,7 +356,7 @@ public:
gIdleCallbacks.addFunction(saveTexturesWorker, this);
}
class CacheReadResponder : public LLTextureCache::ReadResponder
class CacheReadResponder final : public LLTextureCache::ReadResponder
{
private:
LLPointer<LLImageFormatted> mFormattedImage;
@@ -413,7 +404,7 @@ public:
mImageLocal = imagelocal;
}
virtual void completed(bool success)
void completed(bool success) override
{
if (success && mFormattedImage.notNull() && mImageSize > 0)
{
@@ -546,10 +537,8 @@ void DAESaver::updateTextureInfo()
{
LLTextureEntry* te = obj->getTE(face_num);
const LLUUID id = te->getID();
if (std::find(mTextures.begin(), mTextures.end(), id) != mTextures.end())
{
continue;
}
if (std::find(mTextures.begin(), mTextures.end(), id) != mTextures.end()) continue;
mTextures.push_back(id);
std::string name;
if (id != DAEExportUtil::LL_TEXTURE_BLANK && DAEExportUtil::canExportTexture(id, &name))
@@ -566,7 +555,6 @@ void DAESaver::updateTextureInfo()
}
}
class v4adapt
{
private:
@@ -579,7 +567,7 @@ public:
}
};
void DAESaver::addSource(daeElement* mesh, const char* src_id, std::string params, const std::vector<F32> &vals)
void DAESaver::addSource(daeElement* mesh, const char* src_id, const std::string& params, const std::vector<F32> &vals)
{
daeElement* source = mesh->add("source");
source->setAttribute("id", src_id);
@@ -588,9 +576,9 @@ void DAESaver::addSource(daeElement* mesh, const char* src_id, std::string param
src_array->setAttribute("id", llformat("%s-%s", src_id, "array").c_str());
src_array->setAttribute("count", llformat("%d", vals.size()).c_str());
for (U32 i = 0; i < vals.size(); i++)
for (const auto& val : vals)
{
((domFloat_array*)src_array)->getValue().append(vals[i]);
static_cast<domFloat_array*>(src_array)->getValue().append(val);
}
domAccessor* acc = daeSafeCast<domAccessor>(source->add("technique_common accessor"));
@@ -598,10 +586,10 @@ void DAESaver::addSource(daeElement* mesh, const char* src_id, std::string param
acc->setCount(vals.size() / params.size());
acc->setStride(params.size());
for (std::string::iterator p_iter = params.begin(); p_iter != params.end(); ++p_iter)
for (const auto& param : params)
{
domElement* pX = acc->add("param");
pX->setAttribute("name", llformat("%c", *p_iter).c_str());
pX->setAttribute("name", (LLStringUtil::null + param).c_str());
pX->setAttribute("type", "float");
}
}
@@ -650,7 +638,7 @@ void DAESaver::addPolygons(daeElement* mesh, const char* geomID, const char* mat
{
for (S32 i = 0; i < face->mNumIndices; i++)
{
U16 index = index_offset + face->mIndices[i];
U32 index = index_offset + face->mIndices[i];
(p->getValue()).append(index);
if (i % 3 == 0)
{
@@ -710,11 +698,21 @@ void DAESaver::transformTexCoord(S32 num_vert, LLVector2* coord, LLVector3* posi
bool DAESaver::saveDAE(std::string filename)
{
// Collada expects file and folder names to be escaped
// Note: cdom::nativePathToUri()
// Same as in LLDAELoader::OpenFile()
const char* allowed =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789"
"%-._~:\"|\\/";
std::string uri_filename = LLURI::escape(filename, allowed);
mAllMaterials.clear();
mTotalNumMaterials = 0;
DAE dae;
// First set the filename to save
daeElement* root = dae.add(filename);
daeElement* root = dae.add(uri_filename);
// Obligatory elements in header
daeElement* asset = root->add("asset");
@@ -734,9 +732,13 @@ bool DAESaver::saveDAE(std::string filename)
up_axis->setCharData("Z_UP");
// File creator
std::string author;
if (!LLAvatarNameCache::getNSName(gAgentID, author))
author = "Unknown";
daeElement* contributor = asset->add("contributor");
contributor->add("author")->setCharData(LLAppViewer::instance()->getSecondLifeTitle() + " User");
contributor->add("authoring_tool")->setCharData(LLAppViewer::instance()->getSecondLifeTitle() + " Collada Export");
contributor->add("author")->setCharData(author);
contributor->add("authoring_tool")->setCharData(LLVersionInfo::getChannelAndVersion() + " Collada Export");
daeElement* images = root->add("library_images");
daeElement* geomLib = root->add("library_geometries");
@@ -825,7 +827,6 @@ bool DAESaver::saveDAE(std::string filename)
}
}
addSource(mesh, llformat("%s-%s", geomID, "positions").c_str(), "XYZ", position_data);
addSource(mesh, llformat("%s-%s", geomID, "normals").c_str(), "XYZ", normal_data);
addSource(mesh, llformat("%s-%s", geomID, "map0").c_str(), "ST", uv_data);
@@ -845,12 +846,11 @@ bool DAESaver::saveDAE(std::string filename)
// Add triangles
if (gSavedSettings.getBOOL("DAEExportConsolidateMaterials"))
{
for (U32 objMaterial = 0; objMaterial < objMaterials.size(); objMaterial++)
for (const auto& objMaterial : objMaterials)
{
int_list_t faces;
getFacesWithMaterial(obj, objMaterials[objMaterial], &faces);
std::string matName = objMaterials[objMaterial].name;
addPolygons(mesh, geomID, (matName + "-material").c_str(), obj, &faces);
getFacesWithMaterial(obj, objMaterial, &faces);
addPolygons(mesh, geomID, (objMaterial.name + "-material").c_str(), obj, &faces);
}
}
else
@@ -888,12 +888,12 @@ bool DAESaver::saveDAE(std::string filename)
// Bind materials
daeElement* tq = nodeGeometry->add("bind_material technique_common");
for (U32 objMaterial = 0; objMaterial < objMaterials.size(); objMaterial++)
for (const auto& objMaterial : objMaterials)
{
std::string matName = objMaterials[objMaterial].name;
daeElement* instanceMaterial = tq->add("instance_material");
instanceMaterial->setAttribute("symbol", (matName + "-material").c_str());
instanceMaterial->setAttribute("target", ("#" + matName + "-material").c_str());
std::string matName = objMaterial.name + "-material";
instanceMaterial->setAttribute("symbol", matName.c_str());
instanceMaterial->setAttribute("target", ('#' + matName).c_str());
}
nodeGeometry->setAttribute("url", llformat("#%s-%s", geomID, "mesh").c_str());
@@ -904,12 +904,12 @@ bool DAESaver::saveDAE(std::string filename)
generateEffects(effects);
// Materials
for (U32 objMaterial = 0; objMaterial < mAllMaterials.size(); objMaterial++)
for (const auto& objMaterial : mAllMaterials)
{
daeElement* mat = materials->add("material");
mat->setAttribute("id", (mAllMaterials[objMaterial].name + "-material").c_str());
mat->setAttribute("id", (objMaterial.name + "-material").c_str());
daeElement* matEffect = mat->add("instance_effect");
matEffect->setAttribute("url", ("#" + mAllMaterials[objMaterial].name + "-fx").c_str());
matEffect->setAttribute("url", ('#' + objMaterial.name + "-fx").c_str());
}
root->add("scene instance_visual_scene")->setAttribute("url", "#Scene");
@@ -930,11 +930,11 @@ DAESaver::MaterialInfo DAESaver::getMaterial(LLTextureEntry* te)
{
if (gSavedSettings.getBOOL("DAEExportConsolidateMaterials"))
{
for (U32 i=0; i < mAllMaterials.size(); i++)
for (const auto& mat : mAllMaterials)
{
if (mAllMaterials[i].matches(te))
if (mat.matches(te))
{
return mAllMaterials[i];
return mat;
}
}
}
@@ -944,7 +944,7 @@ DAESaver::MaterialInfo DAESaver::getMaterial(LLTextureEntry* te)
ret.color = te->getColor();
ret.name = llformat("Material%d", mAllMaterials.size());
mAllMaterials.push_back(ret);
return mAllMaterials[mAllMaterials.size() - 1];
return ret;
}
void DAESaver::getMaterials(LLViewerObject* obj, material_list_t* ret)
@@ -954,10 +954,7 @@ void DAESaver::getMaterials(LLViewerObject* obj, material_list_t* ret)
{
LLTextureEntry* te = obj->getTE(face_num);
if (skipFace(te))
{
continue;
}
if (skipFace(te)) continue;
MaterialInfo mat = getMaterial(te);
@@ -968,7 +965,7 @@ void DAESaver::getMaterials(LLViewerObject* obj, material_list_t* ret)
}
}
void DAESaver::getFacesWithMaterial(LLViewerObject* obj, MaterialInfo& mat, int_list_t* ret)
void DAESaver::getFacesWithMaterial(LLViewerObject* obj, const MaterialInfo& mat, int_list_t* ret)
{
S32 num_faces = obj->getVolume()->getNumVolumeFaces();
for (S32 face_num = 0; face_num < num_faces; ++face_num)
@@ -985,11 +982,11 @@ void DAESaver::generateEffects(daeElement *effects)
// Effects (face color, alpha)
bool export_textures = gSavedSettings.getBOOL("DAEExportTextures");
for (U32 mat = 0; mat < mAllMaterials.size(); mat++)
for (const auto& mat : mAllMaterials)
{
LLColor4 color = mAllMaterials[mat].color;
LLColor4 color = mat.color;
domEffect* effect = (domEffect*)effects->add("effect");
effect->setId((mAllMaterials[mat].name + "-fx").c_str());
effect->setId((mat.name + "-fx").c_str());
daeElement* profile = effect->add("profile_COMMON");
std::string colladaName;
@@ -999,7 +996,7 @@ void DAESaver::generateEffects(daeElement *effects)
U32 i = 0;
for (; i < mTextures.size(); i++)
{
if (mAllMaterials[mat].textureID == mTextures[i])
if (mat.textureID == mTextures[i])
{
textID = mTextures[i];
break;
@@ -1043,19 +1040,18 @@ void DAESaver::generateEffects(daeElement *effects)
void DAESaver::generateImagesSection(daeElement* images)
{
for (U32 i=0; i < mTextureNames.size(); i++)
for (const auto& name : mTextureNames)
{
std::string name = mTextureNames[i];
if (name.empty()) continue;
std::string colladaName = name + "_" + mImageFormat;
std::string colladaName = name + '_' + mImageFormat;
daeElement* image = images->add("image");
image->setAttribute("id", colladaName.c_str());
image->setAttribute("name", colladaName.c_str());
image->add("init_from")->setCharData(LLURI::escape(name + "." + mImageFormat));
image->add("init_from")->setCharData(LLURI::escape(name + '.' + mImageFormat));
}
}
class DAESaveSelectedObjects : public view_listener_t
class DAESaveSelectedObjects final : public view_listener_t
{
bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata)
{

View File

@@ -33,50 +33,29 @@ class LLViewerObject;
class DAESaver
{
public:
class MaterialInfo
struct MaterialInfo
{
public:
LLUUID textureID;
LLColor4 color;
std::string name;
bool matches(LLTextureEntry* te)
bool matches(LLTextureEntry* te) const
{
return (textureID == te->getID()) && (color == te->getColor());
}
bool operator== (const MaterialInfo& rhs)
bool operator== (const MaterialInfo& rhs) const
{
return (textureID == rhs.textureID) && (color == rhs.color) && (name == rhs.name);
}
bool operator!= (const MaterialInfo& rhs)
bool operator!= (const MaterialInfo& rhs) const
{
return !(*this == rhs);
}
MaterialInfo()
{
}
MaterialInfo(const MaterialInfo& rhs)
{
textureID = rhs.textureID;
color = rhs.color;
name = rhs.name;
}
MaterialInfo& operator= (const MaterialInfo& rhs)
{
textureID = rhs.textureID;
color = rhs.color;
name = rhs.name;
return *this;
}
};
typedef std::vector<std::pair<LLViewerObject*,std::string> > obj_info_t;
typedef std::vector<std::pair<LLViewerObject*,std::string>> obj_info_t;
typedef uuid_vec_t id_list_t;
typedef std::vector<std::string> string_list_t;
typedef std::vector<S32> int_list_t;
@@ -97,12 +76,12 @@ public:
private:
void transformTexCoord(S32 num_vert, LLVector2* coord, LLVector3* positions, LLVector3* normals, LLTextureEntry* te, LLVector3 scale);
void addSource(daeElement* mesh, const char* src_id, std::string params, const std::vector<F32> &vals);
void addSource(daeElement* mesh, const char* src_id, const std::string& params, const std::vector<F32> &vals);
void addPolygons(daeElement* mesh, const char* geomID, const char* materialID, LLViewerObject* obj, int_list_t* faces_to_include);
bool skipFace(LLTextureEntry *te);
MaterialInfo getMaterial(LLTextureEntry* te);
void getMaterials(LLViewerObject* obj, material_list_t* ret);
void getFacesWithMaterial(LLViewerObject* obj, MaterialInfo& mat, int_list_t* ret);
void getFacesWithMaterial(LLViewerObject* obj, const MaterialInfo& mat, int_list_t* ret);
void generateEffects(daeElement *effects);
void generateImagesSection(daeElement* images);
};

View File

@@ -40,11 +40,21 @@
/// Classes for AISv3 support.
///----------------------------------------------------------------------------
extern AIHTTPTimeoutPolicy AISAPIResponder_timeout;
class AISCommand final : public LLHTTPClient::ResponderWithCompleted
{
public:
typedef boost::function<void()> command_func_type;
// AISCommand - base class for retry-able HTTP requests using the AISv3 cap.
// Limit max in flight requests to 2. Server was aggressively throttling otherwise.
constexpr static U8 sMaxActiveAISCommands = 4;
static U8 sActiveAISCommands;
static std::queue< boost::intrusive_ptr< AISCommand > > sPendingAISCommands;
virtual AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy(void) const { return AISAPIResponder_timeout; }
AISCommand(AISAPI::COMMAND_TYPE type, const char* name, const LLUUID& targetId, AISAPI::completion_t callback) :
mCommandFunc(NULL),
mRetryPolicy(new LLAdaptiveRetryPolicy(1.0, 32.0, 2.0, 10)),
@@ -53,10 +63,30 @@ public:
mName(name),
mType(type)
{}
virtual ~AISCommand()
{
if (mActive)
{
--sActiveAISCommands;
while (sActiveAISCommands < sMaxActiveAISCommands && !sPendingAISCommands.empty())
{
sPendingAISCommands.front()->dispatch();
sPendingAISCommands.pop();
}
}
}
void run( command_func_type func )
{
(mCommandFunc = func)();
mCommandFunc = func;
if (sActiveAISCommands >= sMaxActiveAISCommands)
{
sPendingAISCommands.push(this);
}
else
{
dispatch();
}
}
char const* getName(void) const override
@@ -64,6 +94,17 @@ public:
return mName;
}
private:
void dispatch()
{
if (LLApp::isQuitting())
{
return;
}
++sActiveAISCommands;
mActive = true;
(mCommandFunc)();
}
void markComplete()
{
// Command func holds a reference to self, need to release it
@@ -72,42 +113,56 @@ public:
mRetryPolicy->onSuccess();
}
void malformedResponse() { mStatus = HTTP_INTERNAL_ERROR_OTHER; mReason = llformat("Malformed response contents (original code: %d)", mStatus); }
bool onFailure()
{
bool retry = mStatus != HTTP_INTERNAL_ERROR_OTHER && mStatus != 410; // We handle these and stop
LL_WARNS("Inventory") << "Inventory error: " << dumpResponse() << LL_ENDL;
if (retry) mRetryPolicy->onFailure(mStatus, getResponseHeaders());
mRetryPolicy->onFailure(mStatus, getResponseHeaders());
F32 seconds_to_wait;
if (retry && mRetryPolicy->shouldRetry(seconds_to_wait))
if (mRetryPolicy->shouldRetry(seconds_to_wait))
{
if (mStatus == 503)
{
// Pad delay a bit more since we're getting throttled.
seconds_to_wait += 10.f + ll_frand(4.f);
}
LL_WARNS("Inventory") << "Retrying in " << seconds_to_wait << "seconds due to inventory error for " << getName() <<": " << dumpResponse() << LL_ENDL;
doAfterInterval(mCommandFunc,seconds_to_wait);
return true;
}
else
{
// Command func holds a reference to self, need to release it
// after a success or final failure.
// *TODO: Notify user? This seems bad.
LL_WARNS("Inventory") << "Abort due to inventory error for " << getName() <<": " << dumpResponse() << LL_ENDL;
mCommandFunc = no_op;
return false;
}
return retry;
}
protected:
void httpCompleted() override
{
AISAPI::InvokeAISCommandCoro(this, getURL(), mTargetId, getContent(), mCompletionFunc, (AISAPI::COMMAND_TYPE)mType);
// Continue through if successful or longer retrying,
if (isGoodStatus(mStatus) || !onFailure())
{
markComplete();
AISAPI::InvokeAISCommandCoro(this, getURL(), mTargetId, getContent(), mCompletionFunc, (AISAPI::COMMAND_TYPE)mType);
}
}
private:
command_func_type mCommandFunc;
LLPointer<LLHTTPRetryPolicy> mRetryPolicy;
AISAPI::completion_t mCompletionFunc;
const LLUUID mTargetId;
const char* mName;
bool mActive = false;
AISAPI::COMMAND_TYPE mType;
};
U8 AISCommand::sActiveAISCommands = 0;
std::queue< boost::intrusive_ptr< AISCommand > > AISCommand::sPendingAISCommands;
//=========================================================================
const std::string AISAPI::INVENTORY_CAP_NAME("InventoryAPIv3");
const std::string AISAPI::LIBRARY_CAP_NAME("LibraryAPIv3");
@@ -312,21 +367,18 @@ void AISAPI::UpdateItem(const LLUUID &itemId, const LLSD &updates, completion_t
boost::intrusive_ptr< AISCommand > responder = new AISCommand(UPDATEITEM, "UpdateItem",itemId, callback);
responder->run(boost::bind(&LLHTTPClient::patch, url, updates, responder/*,*/ DEBUG_CURLIO_PARAM(debug_off), keep_alive, (AIStateMachine*)NULL, 0));
}
void AISAPI::InvokeAISCommandCoro(AISCommand* responder,
void AISAPI::InvokeAISCommandCoro(LLHTTPClient::ResponderWithCompleted* responder,
std::string url,
LLUUID targetId, LLSD result, completion_t callback, COMMAND_TYPE type)
{
LL_DEBUGS("Inventory") << "url: " << url << LL_ENDL;
auto status = responder->getStatus();
auto status = responder->getStatus();
if (!responder->isGoodStatus(status) || !result.isMap())
{
if (!result.isMap())
{
responder->malformedResponse();
}
else if (status == 410) //GONE
{
LL_WARNS("Inventory") << "Inventory error: " << status << ": " << responder->getReason() << LL_ENDL;
if (status == 410) //GONE
{
// Item does not exist or was already deleted from server.
// parent folder is out of sync
@@ -360,11 +412,12 @@ void AISAPI::InvokeAISCommandCoro(AISCommand* responder,
}
}
}
// Keep these statuses accounted for in the responder too
if (responder->onFailure()) // If we're retrying, exit early.
return;
if (!result.isMap())
{
LL_WARNS("Inventory") << "Inventory error: Malformed response contents" << LL_ENDL;
}
LL_WARNS("Inventory") << ll_pretty_print_sd(result) << LL_ENDL;
}
else responder->markComplete();
gInventory.onAISUpdateReceived("AISCommand", result);

View File

@@ -72,7 +72,7 @@ private:
static std::string getInvCap();
static std::string getLibCap();
static void InvokeAISCommandCoro(class AISCommand* responder,
static void InvokeAISCommandCoro(LLHTTPClient::ResponderWithCompleted* responder,
std::string url, LLUUID targetId, LLSD body,
completion_t callback, COMMAND_TYPE type);
};

View File

@@ -221,13 +221,49 @@
#include <client/crashpad_client.h>
#include <client/prune_crash_reports.h>
#include <client/settings.h>
#include <client/annotation.h>
#include <fmt/format.h>
#include "llnotificationsutil.h"
#include "llversioninfo.h"
template <size_t SIZE, crashpad::Annotation::Type T = crashpad::Annotation::Type::kString>
struct crashpad_annotation : public crashpad::Annotation {
std::array<char, SIZE> buffer;
crashpad_annotation(const char* name) : crashpad::Annotation(T, name, buffer.data())
{}
void set(const std::string& src) {
//LL_INFOS() << name() << ": " << src.c_str() << LL_ENDL;
const size_t min_size = llmin(SIZE, src.size());
memcpy(buffer.data(), src.data(), min_size);
buffer.data()[SIZE - 1] = '\0';
SetSize(min_size);
}
};
#define DEFINE_CRASHPAD_ANNOTATION(name, len) \
static crashpad_annotation<len> g_crashpad_annotation_##name##_buffer("sentry[tags]["#name"]");
#define DEFINE_CRASHPAD_ANNOTATION_EXTRA(name, len) \
static crashpad_annotation<len> g_crashpad_annotation_##name##_buffer("sentry[extra]["#name"]");
#define SET_CRASHPAD_ANNOTATION_VALUE(name, value) \
g_crashpad_annotation_##name##_buffer.set(value);
#else
#define SET_CRASHPAD_ANNOTATION_VALUE(name, value)
#define DEFINE_CRASHPAD_ANNOTATION_EXTRA(name, len)
#define DEFINE_CRASHPAD_ANNOTATION(name, len)
#endif
DEFINE_CRASHPAD_ANNOTATION_EXTRA(fatal_message, 512);
DEFINE_CRASHPAD_ANNOTATION(grid_name, 64);
DEFINE_CRASHPAD_ANNOTATION(region_name, 64);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(cpu_string, 128);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(gpu_string, 128);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(gl_version, 128);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(session_duration, 32);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(startup_state, 32);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(memory_sys, 32);
DEFINE_CRASHPAD_ANNOTATION_EXTRA(memory_alloc, 32);
////// Windows-specific includes to the bottom - nasty defines in these pollute the preprocessor
//
@@ -771,8 +807,18 @@ bool LLAppViewer::init()
initCrashReporting();
#endif
writeDebugInfo();
setupErrorHandling();
{
auto fn = boost::bind<bool>([](const LLSD& stateInfo) -> bool {
SET_CRASHPAD_ANNOTATION_VALUE(startup_state, stateInfo["str"].asString());
return false;
}, _1);
LLStartUp::getStateEventPump().listen<::LLEventListener>("LLAppViewer", fn);
}
//
// Start of the application
//
@@ -1039,6 +1085,8 @@ bool LLAppViewer::init()
gGLManager.getGLInfo(gDebugInfo);
gGLManager.printGLInfoString();
writeDebugInfo();
// Load Default bindings
load_default_bindings(gSavedSettings.getBOOL("LiruUseZQSDKeys"));
@@ -1126,6 +1174,8 @@ bool LLAppViewer::init()
// save the graphics card
gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString();
writeDebugInfo();
// Save the current version to the prefs file
gSavedSettings.setString("LastRunVersion",
LLVersionInfo::getChannelAndVersion());
@@ -1143,6 +1193,8 @@ bool LLAppViewer::init()
gGLActive = FALSE;
LLViewerMedia::initClass();
LL_INFOS("InitInfo") << "Viewer media initialized." << LL_ENDL ;
writeDebugInfo();
return true;
}
@@ -1294,6 +1346,12 @@ bool LLAppViewer::mainLoop()
//clear call stack records
LL_CLEAR_CALLSTACKS();
#ifdef USE_CRASHPAD
// Not event based. Update per frame
SET_CRASHPAD_ANNOTATION_VALUE(session_duration, std::to_string(LLFrameTimer::getElapsedSeconds()));
SET_CRASHPAD_ANNOTATION_VALUE(memory_alloc, std::to_string((LLMemory::getCurrentRSS() >> 10)/1000.f));
#endif
//check memory availability information
checkMemory() ;
@@ -2744,6 +2802,16 @@ void LLAppViewer::writeDebugInfo(bool isStatic)
isStatic ? LLSDSerialize::toPrettyXML(gDebugInfo, out_file)
: LLSDSerialize::toPrettyXML(gDebugInfo["Dynamic"], out_file);
#else
SET_CRASHPAD_ANNOTATION_VALUE(fatal_message, gDebugInfo["FatalMessage"].asString());
SET_CRASHPAD_ANNOTATION_VALUE(grid_name, gDebugInfo["GridName"].asString());
SET_CRASHPAD_ANNOTATION_VALUE(region_name, gDebugInfo["CurrentRegion"].asString());
SET_CRASHPAD_ANNOTATION_VALUE(cpu_string, gDebugInfo["CPUInfo"]["CPUString"].asString());
SET_CRASHPAD_ANNOTATION_VALUE(gpu_string, gDebugInfo["GraphicsCard"].asString());
SET_CRASHPAD_ANNOTATION_VALUE(gl_version, gDebugInfo["GLInfo"]["GLVersion"].asString());
SET_CRASHPAD_ANNOTATION_VALUE(session_duration, std::to_string(LLFrameTimer::getElapsedSeconds()));
SET_CRASHPAD_ANNOTATION_VALUE(memory_alloc, std::to_string((LLMemory::getCurrentRSS() >> 10) / 1000.f));
SET_CRASHPAD_ANNOTATION_VALUE(memory_sys, std::to_string(gDebugInfo["RAMInfo"]["Physical"].asInteger() * 0.001f));
#endif
}
@@ -2928,8 +2996,8 @@ void LLAppViewer::handleViewerCrash()
gDebugInfo["ViewerExePath"] = gDirUtilp->getExecutablePathAndName();
gDebugInfo["CurrentPath"] = gDirUtilp->getCurPath();
gDebugInfo["Dynamic"]["SessionLength"] = F32(LLFrameTimer::getElapsedSeconds());
gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
gDebugInfo["Dynamic"]["RAMInfo"]["Allocated"] = (LLSD::Integer) LLMemory::getCurrentRSS() >> 10;
gDebugInfo["StartupState"] = LLStartUp::getStartupStateString();
gDebugInfo["FirstLogin"] = (LLSD::Boolean) gAgent.isFirstLogin();
gDebugInfo["FirstRunThisInstall"] = gSavedSettings.getBOOL("FirstRunThisInstall");
@@ -4791,11 +4859,14 @@ void LLAppViewer::disconnectViewer()
// floater_sound_preview.xml
// floater_animation_preview.xml
// files.
// A more generic mechanism would be nice..
LLFloater* fl = static_cast<LLFloater*>(*it);
if (fl
&& (fl->getName() == "Image Preview"
|| fl->getName() == "Sound Preview"
|| fl->getName() == "Animation Preview"
|| fl->getName() == "perm prefs"
))
{
floaters_to_close.push_back(fl);

View File

@@ -349,7 +349,10 @@ bool LLAttachmentsMgr::getPendingAttachments(uuid_set_t& ids) const
ids.clear();
// Returns the union of the LL maintained list of attachments that are waiting for link creation and our maintained list of attachments that are pending link creation
set_union(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end(), mPendingAttachLinks.begin(), mPendingAttachLinks.end(), std::inserter(ids, ids.begin()));
ids.insert(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end());
ids.insert(mPendingAttachLinks.begin(), mPendingAttachLinks.end());
// Singu Note: "Expression: Sequence not ordered" using std::set_union
//set_union(mRecentlyArrivedAttachments.begin(), mRecentlyArrivedAttachments.end(), mPendingAttachLinks.begin(), mPendingAttachLinks.end(), std::inserter(ids, ids.begin()));
return !ids.empty();
}

View File

@@ -531,17 +531,24 @@ void LLChatBar::sendChat( EChatType type )
// static
void LLChatBar::startChat(const char* line)
{
if (!gChatBar || !gChatBar->getParent())
{
return;
}
gChatBar->getParent()->setVisible(TRUE);
gChatBar->setKeyboardFocus(TRUE);
gSavedSettings.setBOOL("ChatVisible", TRUE);
if (line && gChatBar->mInputEditor)
if (gChatBar->mInputEditor)
{
std::string line_string(line);
gChatBar->mInputEditor->setText(line_string);
if (line)
{
std::string line_string(line);
gChatBar->mInputEditor->setText(line_string);
}
// always move cursor to end so users don't obliterate chat when accidentally hitting WASD
gChatBar->mInputEditor->setCursorToEnd();
}
// always move cursor to end so users don't obliterate chat when accidentally hitting WASD
gChatBar->mInputEditor->setCursorToEnd();
}
@@ -550,7 +557,8 @@ void LLChatBar::startChat(const char* line)
void LLChatBar::stopChat()
{
// In simple UI mode, we never release focus from the chat bar
gChatBar->setKeyboardFocus(FALSE);
if (gChatBar)
gChatBar->setKeyboardFocus(FALSE);
// If we typed a movement key and pressed return during the
// same frame, the keyboard handlers will see the key as having
@@ -562,7 +570,8 @@ void LLChatBar::stopChat()
gAgent.stopTyping();
// hide chat bar so it doesn't grab focus back
gChatBar->getParent()->setVisible(FALSE);
if (gChatBar && gChatBar->getParent())
gChatBar->getParent()->setVisible(FALSE);
gSavedSettings.setBOOL("ChatVisible", FALSE);
}

View File

@@ -515,6 +515,10 @@ void LLCloudLayer::connectNeighbor(LLCloudLayer *cloudp, U32 direction)
return;
}
if (mNeighbors[direction])
{
mNeighbors[direction]->mNeighbors[gDirOpposite[direction]] = NULL;
}
mNeighbors[direction] = cloudp;
if (cloudp)
mNeighbors[direction]->mNeighbors[gDirOpposite[direction]] = this;

View File

@@ -1596,11 +1596,7 @@ void LLSpatialBridge::cleanupReferences()
LLDrawable::cleanupReferences();
if (mDrawable)
{
/*
DON'T DO THIS -- this should happen through octree destruction
mDrawable->setSpatialGroup(NULL);
mDrawable->setGroup(NULL);
if (mDrawable->getVObj())
{
LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
@@ -1608,17 +1604,18 @@ void LLSpatialBridge::cleanupReferences()
iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
LLDrawable* drawable = child->mDrawable;
LLDrawable* drawable = child->mDrawable;
if (drawable)
{
drawable->setSpatialGroup(NULL);
drawable->setGroup(NULL);
}
}
}*/
}
LLPointer<LLDrawable> drawablep = mDrawable;
LLPointer<LLSpatialBridge> bridgep = mDrawable->getSpatialBridge();
mDrawable->setSpatialBridge(nullptr);
mDrawable = nullptr;
drawablep->setSpatialBridge(nullptr);
bridgep = nullptr;
}
}

View File

@@ -79,7 +79,7 @@
//
LLColor4 agent_chat_color(const LLUUID& id, const std::string&, bool local_chat = true);
LLColor4 get_text_color(const LLChat& chat, bool from_im = false);
void show_log_browser(const std::string&, const std::string&);
void show_log_browser(const std::string&, const LLUUID&);
//
// Member Functions
@@ -96,7 +96,7 @@ LLFloaterChat::LLFloaterChat(const LLSD& seed)
LLTextEditor* history_editor_with_mute = getChild<LLTextEditor>("Chat History Editor with mute");
getChild<LLUICtrl>("show mutes")->setCommitCallback(boost::bind(&LLFloaterChat::onClickToggleShowMute, this, _2, getChild<LLTextEditor>("Chat History Editor"), history_editor_with_mute));
getChild<LLUICtrl>("chat_history_open")->setCommitCallback(boost::bind(show_log_browser, "chat", "chat"));
getChild<LLUICtrl>("chat_history_open")->setCommitCallback(boost::bind(show_log_browser, "chat", LLUUID::null));
}
LLFloaterChat::~LLFloaterChat()
@@ -243,7 +243,7 @@ void log_chat_text(const LLChat& chat)
else
histstr = chat.mText;
LLLogChat::saveHistory(std::string("chat"), histstr);
LLLogChat::saveHistory("chat", LLUUID::null, histstr);
}
// static
void LLFloaterChat::addChatHistory(LLChat& chat, bool log_to_file)
@@ -535,28 +535,19 @@ LLColor4 get_text_color(const LLChat& chat, bool from_im)
//static
void LLFloaterChat::loadHistory()
{
LLLogChat::loadHistory("chat", &chatFromLogFile, (void*)LLFloaterChat::getInstance());
LLLogChat::loadHistory("chat", LLUUID::null, boost::bind(&LLFloaterChat::chatFromLogFile, getInstance(), _1, _2));
}
//static
void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata)
void LLFloaterChat::chatFromLogFile(LLLogChat::ELogLineType type, const std::string& line)
{
switch (type)
bool log_line = type == LLLogChat::LOG_LINE;
if (log_line || gSavedPerAccountSettings.getBOOL("LogChat"))
{
case LLLogChat::LOG_EMPTY:
if (gSavedPerAccountSettings.getBOOL("LogChat"))
addChatHistory(static_cast<LLFloaterChat*>(userdata)->getString("IM_logging_string"), false);
break;
case LLLogChat::LOG_END:
if (gSavedPerAccountSettings.getBOOL("LogChat"))
addChatHistory(static_cast<LLFloaterChat*>(userdata)->getString("IM_end_log_string"), false);
break;
case LLLogChat::LOG_LINE:
addChatHistory(line, FALSE);
break;
default:
// nothing
break;
LLStyleSP style(new LLStyle(true, gSavedSettings.getColor4("LogChatColor"), LLStringUtil::null));
const auto text = log_line ? line : getString(type == LLLogChat::LOG_END ? "IM_end_log_string" : "IM_logging_string");
for (const auto& ed_name : { "Chat History Editor", "Chat History Editor with mute" })
getChild<LLTextEditor>(ed_name)->appendText(text, false, true, style, false);
}
}

View File

@@ -73,7 +73,7 @@ public:
static void triggerAlerts(const std::string& text);
void onClickToggleShowMute(bool show_mute, class LLTextEditor* history_editor, LLTextEditor* history_editor_with_mute);
static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);
void chatFromLogFile(LLLogChat::ELogLineType type, const std::string& line);
static void loadHistory();
static void* createSpeakersPanel(void* data);
static void* createChatPanel(void* data);

View File

@@ -58,6 +58,7 @@ LLFloaterInspect::LLFloaterInspect(const LLSD&)
mDirty(FALSE)
{
mCommitCallbackRegistrar.add("Inspect.OwnerProfile", boost::bind(&LLFloaterInspect::onClickOwnerProfile, this));
mCommitCallbackRegistrar.add("Inspect.LastOwnerProfile", boost::bind(&LLFloaterInspect::onClickLastOwnerProfile, this));
mCommitCallbackRegistrar.add("Inspect.CreatorProfile", boost::bind(&LLFloaterInspect::onClickCreatorProfile, this));
mCommitCallbackRegistrar.add("Inspect.SelectObject", boost::bind(&LLFloaterInspect::onSelectObject, this));
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_inspect.xml");
@@ -166,6 +167,36 @@ void LLFloaterInspect::onClickOwnerProfile()
}
}
void LLFloaterInspect::onClickLastOwnerProfile()
{
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)
{
const LLUUID& last_owner_id = node->mPermissions->getLastOwner();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.2a) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
if (last_owner_id == node->mPermissions->getOwner()) return;
// [/RLVa:KB]
LLAvatarActions::showProfile(last_owner_id);
}
}
}
void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)

View File

@@ -60,6 +60,7 @@ public:
virtual void onFocusReceived();
void onClickCreatorProfile();
void onClickOwnerProfile();
void onClickLastOwnerProfile();
void onSelectObject();
LLScrollListCtrl* mObjectList;

View File

@@ -148,7 +148,7 @@ S32 LLFloaterNameDesc::getExpectedUploadCost() const
LLAssetType::EType asset_type = exten == "wav" ? LLAssetType::AT_SOUND
: (exten == "anim" || exten == "bvh") ? LLAssetType::AT_ANIMATION
: exten != "lsl" ? LLAssetType::AT_TEXTURE
: asset_type = LLAssetType::AT_NONE;
: LLAssetType::AT_NONE;
S32 upload_cost = -1;
if (asset_type != LLAssetType::AT_NONE)

View File

@@ -114,7 +114,7 @@ void LLFloaterObjectIMInfo::onClickMute()
// [/RLVa:KB]
LLMuteList::instance().add(LLMute(mOwnerID, mName, mGroupOwned ? LLMute::GROUP : LLMute::AGENT));
LLFloaterMute::showInstance();
LLFloaterMute::showInstance()->selectMute(mOwnerID);
close();
}

View File

@@ -42,6 +42,7 @@
#include "llviewerwindow.h"
#include "lluictrlfactory.h"
#include "llpermissions.h"
#include "llsdserialize.h"
#include "hippogridmanager.h"
extern class AIHTTPTimeoutPolicy floaterPermsResponder_timeout;
@@ -63,6 +64,25 @@ U32 LLFloaterPerms::getEveryonePerms(std::string prefix)
return flags;
}
//static
U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
{
U32 flags = PERM_MOVE;
if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
{
flags |= PERM_COPY;
}
if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") )
{
flags |= PERM_MODIFY;
}
if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") )
{
flags |= PERM_TRANSFER;
}
return flags;
}
//static
U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix)
{
@@ -83,25 +103,6 @@ U32 LLFloaterPerms::getNextOwnerPermsInverted(std::string prefix)
return flags;
}
//static
U32 LLFloaterPerms::getNextOwnerPerms(std::string prefix)
{
U32 flags = PERM_MOVE;
if ( gSavedSettings.getBOOL(prefix+"NextOwnerCopy") )
{
flags |= PERM_COPY;
}
if ( gSavedSettings.getBOOL(prefix+"NextOwnerModify") )
{
flags |= PERM_MODIFY;
}
if ( gSavedSettings.getBOOL(prefix+"NextOwnerTransfer") )
{
flags |= PERM_TRANSFER;
}
return flags;
}
namespace
{
void handle_checkboxes(LLView* view, const std::string& ctrl_name, const LLSD& value, const std::string& type)
@@ -138,6 +139,7 @@ LLFloaterPermsDefault::LLFloaterPermsDefault(const LLSD& seed)
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_perm_prefs.xml");
}
// String equivalents of enum Categories - initialization order must match enum order!
const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] =
{
@@ -224,41 +226,66 @@ void LLFloaterPermsDefault::onClickCancel()
close();
}
class LLFloaterPermsResponder : public LLHTTPClient::ResponderWithResult
struct LLFloaterPermsRequester final : LLSingleton<LLFloaterPermsRequester>
{
friend class LLSingleton<LLFloaterPermsRequester>;
std::string mUrl;
LLSD mReport;
U8 mRetriesCount = 0;
static void init(const std::string url, const LLSD report)
{
auto& inst = instance();
inst.mUrl = url;
inst.mReport = report;
inst.retry();
}
bool retry();
};
class LLFloaterPermsResponder final : public LLHTTPClient::ResponderWithResult
{
public:
LLFloaterPermsResponder() : LLHTTPClient::ResponderWithResult() {}
private:
static std::string sPreviousReason;
void httpFailure(void)
void httpFailure() override
{
// <singu> Prevent 404s from annoying the user all the tme
if (mStatus == HTTP_NOT_FOUND)
LL_INFOS("FloaterPermsResponder") << "Failed to send default permissions to simulator. 404, reason: " << mReason << LL_ENDL;
else
// </singu>
auto* requester = LLFloaterPermsRequester::getIfExists();
if (!requester || requester->retry()) return;
LLFloaterPermsRequester::deleteSingleton();
const std::string& reason = getReason();
// Do not display the same error more than once in a row
if (mReason != sPreviousReason)
if (reason != sPreviousReason)
{
sPreviousReason = mReason;
sPreviousReason = reason;
LLSD args;
args["REASON"] = mReason;
args["REASON"] = reason;
LLNotificationsUtil::add("DefaultObjectPermissions", args);
}
}
void httpSuccess(void)
void httpSuccess() override
{
//const LLSD& content = getContent();
//dump_sequential_xml("perms_responder_result.xml", content);
// Since we have had a successful POST call be sure to display the next error message
// even if it is the same as a previous one.
sPreviousReason = "";
mCapSent = true;
LL_INFOS("FloaterPermsResponder") << "Sent default permissions to simulator" << LL_ENDL;
LL_INFOS("ObjectPermissionsFloater") << "Default permissions successfully sent to simulator" << LL_ENDL;
}
/*virtual*/ AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy() const { return floaterPermsResponder_timeout; }
/*virtual*/ char const* getName() const { return "LLFloaterPermsResponder"; }
AIHTTPTimeoutPolicy const& getHTTPTimeoutPolicy() const override { return floaterPermsResponder_timeout; }
char const* getName() const override { return "LLFloaterPermsResponder"; }
};
bool LLFloaterPermsRequester::retry()
{
if (++mRetriesCount < 5)
{
LLHTTPClient::post(mUrl, mReport, new LLFloaterPermsResponder);
return true;
}
return false;
}
std::string LLFloaterPermsResponder::sPreviousReason;
void LLFloaterPermsDefault::sendInitialPerms()
@@ -266,12 +293,13 @@ void LLFloaterPermsDefault::sendInitialPerms()
if (!mCapSent)
{
updateCap();
mCapSent = true;
}
}
void LLFloaterPermsDefault::updateCap()
{
std::string object_url = gAgent.getRegion()->getCapability("AgentPreferences");
std::string object_url = gAgent.getRegionCapability("AgentPreferences");
if (!object_url.empty())
{
@@ -283,13 +311,24 @@ void LLFloaterPermsDefault::updateCap()
report["default_object_perm_masks"]["NextOwner"] =
(LLSD::Integer)LLFloaterPerms::getNextOwnerPerms(sCategoryNames[CAT_OBJECTS]);
LLHTTPClient::post(object_url, report, new LLFloaterPermsResponder());
{
std::ostringstream sent_perms_log;
LLSDSerialize::toPrettyXML(report, sent_perms_log);
LL_DEBUGS("ObjectPermissionsFloater") << "Sending default permissions to '"
<< object_url << "'\n"
<< sent_perms_log.str() << LL_ENDL;
}
LLFloaterPermsRequester::init(object_url, report);
}
else
{
LL_DEBUGS("ObjectPermissionsFloater") << "AgentPreferences cap not available." << LL_ENDL;
}
}
void LLFloaterPermsDefault::ok()
{
// Changes were already applied to saved settings.
// Changes were already applied automatically to saved settings.
// Refreshing internal values makes it official.
refresh();
@@ -302,11 +341,11 @@ void LLFloaterPermsDefault::cancel()
{
for (U32 iter = CAT_OBJECTS; iter < CAT_LAST; iter++)
{
gSavedSettings.setBOOL(sCategoryNames[iter]+"ShareWithGroup", mShareWithGroup[iter]);
gSavedSettings.setBOOL(sCategoryNames[iter]+"EveryoneCopy", mEveryoneCopy[iter]);
gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerCopy", mNextOwnerCopy[iter]);
gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerModify", mNextOwnerModify[iter]);
gSavedSettings.setBOOL(sCategoryNames[iter]+"NextOwnerTransfer", mNextOwnerTransfer[iter]);
gSavedSettings.setBOOL(sCategoryNames[iter]+"ShareWithGroup", mShareWithGroup[iter]);
gSavedSettings.setBOOL(sCategoryNames[iter]+"EveryoneCopy", mEveryoneCopy[iter]);
gSavedPerAccountSettings.setBOOL(sCategoryNames[iter]+"EveryoneExport", mEveryoneExport[iter]);
}
}

View File

@@ -103,11 +103,7 @@ void LLFloaterPostcard::init()
if(!gAgent.getID().isNull())
{
// we're logged in, so we can get this info.
gMessageSystem->newMessageFast(_PREHASH_UserInfoRequest);
gMessageSystem->nextBlockFast(_PREHASH_AgentData);
gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
gAgent.sendReliableMessage();
gAgent.sendAgentUserInfoRequest();
}
sInstances.insert(this);
@@ -233,7 +229,7 @@ void LLFloaterPostcard::onClose(bool app_quitting)
destroy();
}
class LLSendPostcardResponder : public LLAssetUploadResponder
class LLSendPostcardResponder final : public LLAssetUploadResponder
{
private:
int mSnapshotIndex;
@@ -248,22 +244,22 @@ public:
{
}
// *TODO define custom uploadFailed here so it's not such a generic message
/*virtual*/ void uploadComplete(const LLSD& content)
void uploadComplete(const LLSD& content) override final
{
// we don't care about what the server returns from this post, just clean up the UI
LLFloaterSnapshot::savePostcardDone(true, mSnapshotIndex);
}
/*virtual*/ void uploadFailure(const LLSD& content)
void uploadFailure(const LLSD& content) override final
{
LLAssetUploadResponder::uploadFailure(content);
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
}
/*virtual*/ void httpFailure(void)
void httpFailure(void) override final
{
LLAssetUploadResponder::httpFailure();
LLFloaterSnapshot::savePostcardDone(false, mSnapshotIndex);
}
/*virtual*/ char const* getName(void) const { return "LLSendPostcardResponder"; }
char const* getName(void) const override final { return "LLSendPostcardResponder"; }
};
// static
@@ -273,7 +269,6 @@ void LLFloaterPostcard::onClickSend(void* data)
{
LLFloaterPostcard *self = (LLFloaterPostcard *)data;
std::string from(self->childGetValue("from_form").asString());
std::string to(self->childGetValue("to_form").asString());
boost::regex emailFormat("[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(,[ \t]*[A-Za-z0-9.%+-_]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,})*");
@@ -284,12 +279,6 @@ void LLFloaterPostcard::onClickSend(void* data)
return;
}
if (from.empty() || !boost::regex_match(from, emailFormat))
{
LLNotificationsUtil::add("PromptSelfEmail");
return;
}
std::string subject(self->childGetValue("subject_form").asString());
if(subject.empty() || !self->mHasFirstMsgFocus)
{
@@ -349,10 +338,8 @@ void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data,
// static
void LLFloaterPostcard::updateUserInfo(const std::string& email)
{
for (instance_list_t::iterator iter = sInstances.begin();
iter != sInstances.end(); ++iter)
for (auto& instance : sInstances)
{
LLFloaterPostcard *instance = *iter;
const std::string& text = instance->childGetValue("from_form").asString();
if (text.empty())
{
@@ -416,7 +403,6 @@ void LLFloaterPostcard::sendPostcard()
// the capability already encodes: agent ID, region ID
body["pos-global"] = mPosTakenGlobal.getValue();
body["to"] = childGetValue("to_form").asString();
body["from"] = childGetValue("from_form").asString();
body["name"] = childGetValue("name_form").asString();
body["subject"] = childGetValue("subject_form").asString();
body["msg"] = childGetValue("msg_form").asString();

View File

@@ -46,17 +46,17 @@ class LLLineEditor;
class LLButton;
class LLImageJPEG;
class LLFloaterPostcard
class LLFloaterPostcard final
: public LLFloater
{
public:
LLFloaterPostcard(LLImageJPEG* jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global, int index);
/*virtual*/ ~LLFloaterPostcard();
/*virtual*/ ~LLFloaterPostcard() override;
/*virtual*/ void init();
/*virtual*/ BOOL postBuild();
/*virtual*/ void draw();
/*virtual*/ void onClose(bool app_quitting);
void init();
/*virtual*/ BOOL postBuild() override;
/*virtual*/ void draw() override;
/*virtual*/ void onClose(bool app_quitting) override;
static LLFloaterPostcard* showFromSnapshot(LLImageJPEG *jpeg, LLViewerTexture *img, const LLVector2& img_scale, const LLVector3d& pos_taken_global, int index);

View File

@@ -302,10 +302,10 @@ void LLFloaterWindLight::syncMenu()
// blue horizon
param_mgr->mBlueHorizon = cur_params.getVector(param_mgr->mBlueHorizon.mName, err);
//setColorSwatch("WLBlueHorizon", param_mgr->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r);
childSetValue("WLBlueHorizonG", param_mgr->mBlueHorizon.g);
childSetValue("WLBlueHorizonB", param_mgr->mBlueHorizon.b);
childSetValue("WLBlueHorizonI", param_mgr->mBlueHorizon.i);
childSetValue("WLBlueHorizonR", param_mgr->mBlueHorizon.r / WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueHorizonG", param_mgr->mBlueHorizon.g / WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueHorizonB", param_mgr->mBlueHorizon.b / WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueHorizonI", param_mgr->mBlueHorizon.i / WL_BLUE_HORIZON_DENSITY_SCALE);
// haze density, horizon, mult, and altitude
param_mgr->mHazeDensity = cur_params.getFloat(param_mgr->mHazeDensity.mName, err);
@@ -320,20 +320,20 @@ void LLFloaterWindLight::syncMenu()
// blue density
param_mgr->mBlueDensity = cur_params.getVector(param_mgr->mBlueDensity.mName, err);
//setColorSwatch("WLBlueDensity", param_mgr->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueDensityR", param_mgr->mBlueDensity.r);
childSetValue("WLBlueDensityG", param_mgr->mBlueDensity.g);
childSetValue("WLBlueDensityB", param_mgr->mBlueDensity.b);
childSetValue("WLBlueDensityI", param_mgr->mBlueDensity.i);
childSetValue("WLBlueDensityR", param_mgr->mBlueDensity.r / WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueDensityG", param_mgr->mBlueDensity.g / WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueDensityB", param_mgr->mBlueDensity.b / WL_BLUE_HORIZON_DENSITY_SCALE);
childSetValue("WLBlueDensityI", param_mgr->mBlueDensity.i / WL_BLUE_HORIZON_DENSITY_SCALE);
// Lighting
// sunlight
param_mgr->mSunlight = cur_params.getVector(param_mgr->mSunlight.mName, err);
//setColorSwatch("WLSunlight", param_mgr->mSunlight, WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightR", param_mgr->mSunlight.r);
childSetValue("WLSunlightG", param_mgr->mSunlight.g);
childSetValue("WLSunlightB", param_mgr->mSunlight.b);
childSetValue("WLSunlightI", param_mgr->mSunlight.i);
childSetValue("WLSunlightR", param_mgr->mSunlight.r / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightG", param_mgr->mSunlight.g / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightB", param_mgr->mSunlight.b / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunlightI", param_mgr->mSunlight.i / WL_SUN_AMBIENT_SLIDER_SCALE);
// glow
param_mgr->mGlow = cur_params.getVector(param_mgr->mGlow.mName, err);
@@ -343,10 +343,10 @@ void LLFloaterWindLight::syncMenu()
// ambient
param_mgr->mAmbient = cur_params.getVector(param_mgr->mAmbient.mName, err);
//setColorSwatch("WLAmbient", param_mgr->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientR", param_mgr->mAmbient.r);
childSetValue("WLAmbientG", param_mgr->mAmbient.g);
childSetValue("WLAmbientB", param_mgr->mAmbient.b);
childSetValue("WLAmbientI", param_mgr->mAmbient.i);
childSetValue("WLAmbientR", param_mgr->mAmbient.r / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientG", param_mgr->mAmbient.g / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientB", param_mgr->mAmbient.b / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLAmbientI", param_mgr->mAmbient.i / WL_SUN_AMBIENT_SLIDER_SCALE);
childSetValue("WLSunAngle", param_mgr->mCurParams.getFloat("sun_angle",err) / F_TWO_PI);
childSetValue("WLEastAngle", param_mgr->mCurParams.getFloat("east_angle",err) / F_TWO_PI);
@@ -356,10 +356,10 @@ void LLFloaterWindLight::syncMenu()
// Cloud Color
param_mgr->mCloudColor = cur_params.getVector(param_mgr->mCloudColor.mName, err);
//setColorSwatch("WLCloudColor", param_mgr->mCloudColor, WL_CLOUD_SLIDER_SCALE);
childSetValue("WLCloudColorR", param_mgr->mCloudColor.r);
childSetValue("WLCloudColorG", param_mgr->mCloudColor.g);
childSetValue("WLCloudColorB", param_mgr->mCloudColor.b);
childSetValue("WLCloudColorI", param_mgr->mCloudColor.i);
childSetValue("WLCloudColorR", param_mgr->mCloudColor.r / WL_CLOUD_SLIDER_SCALE);
childSetValue("WLCloudColorG", param_mgr->mCloudColor.g / WL_CLOUD_SLIDER_SCALE);
childSetValue("WLCloudColorB", param_mgr->mCloudColor.b / WL_CLOUD_SLIDER_SCALE);
childSetValue("WLCloudColorI", param_mgr->mCloudColor.i / WL_CLOUD_SLIDER_SCALE);
// Cloud
param_mgr->mCloudMain = cur_params.getVector(param_mgr->mCloudMain.mName, err);
@@ -513,18 +513,7 @@ void LLFloaterWindLight::onColorControlRMoved(LLUICtrl* ctrl, void* userdata)
std::string name = color_ctrl->mSliderName;
name.append("I");
if (color_ctrl->isSunOrAmbientColor)
{
childSetValue(name, color_ctrl->r / WL_SUN_AMBIENT_SLIDER_SCALE);
}
else if (color_ctrl->isBlueHorizonOrDensity)
{
childSetValue(name, color_ctrl->r / WL_BLUE_HORIZON_DENSITY_SCALE);
}
else
{
childSetValue(name, color_ctrl->r);
}
childSetValue(name, sldr_ctrl->getValueF32());
}
color_ctrl->update(LLWLParamManager::getInstance()->mCurParams);

View File

@@ -2010,7 +2010,7 @@ void LLFolderView::scrollToShowSelection()
// However we allow scrolling for folder views with mAutoSelectOverride
// (used in Places SP) as an exception because the selection in them
// is not reset during items filtering. See STORM-133.
if ( (!LLInventoryModelBackgroundFetch::instance().folderFetchActive() || mAutoSelectOverride)
if ( (LLInventoryModelBackgroundFetch::instance().isEverythingFetched() || mAutoSelectOverride)
&& mSelectedItems.size() )
{
mNeedsScroll = TRUE;

View File

@@ -150,8 +150,9 @@ LLGroupNotifyBox::LLGroupNotifyBox(const std::string& subject,
auto links = new LLTextEditor(std::string("group"), LLRect(x, y + 5, RIGHT, bottom), S32_MAX, LLStringUtil::null, nullptr, false, true); // Top adjustment to line up with icon
links->setBorderVisible(FALSE);
links->setReadOnlyFgColor(text_color);
links->setReadOnlyBgColor(LLColor4::transparent);
static const auto header_bg_color = gColors.getColor("GroupNotifyHeaderBGColor");
if (header_bg_color[VALPHA]) links->setReadOnlyFgColor(text_color);
links->setReadOnlyBgColor(header_bg_color);
links->setEnabled(false);
links->setTakesNonScrollClicks(TRUE);
links->setHideScrollbarForShortDocs(TRUE);

View File

@@ -94,7 +94,7 @@ void LLHUDIcon::renderIcon(BOOL for_select)
if (mHidden)
return;
if (mSourceObject.isNull() || mImagep.isNull())
if (mSourceObject.isNull() || mImagep.isNull() || mSourceObject->mDrawable.isNull())
{
markDead();
return;

View File

@@ -375,9 +375,7 @@ LLFloaterIMPanel::LLFloaterIMPanel(
if ( gSavedPerAccountSettings.getBOOL("LogShowHistory") )
{
LLLogChat::loadHistory(mLogLabel,
&chatFromLogFile,
(void *)this);
LLLogChat::loadHistory(mLogLabel, mSessionType == P2P_SESSION ? mOtherParticipantUUID : mSessionUUID, boost::bind(&LLFloaterIMPanel::chatFromLogFile, this, _1, _2));
}
if ( !mSessionInitialized )
@@ -801,7 +799,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
// Now we're adding the actual line of text, so erase the
// "Foo is typing..." text segment, and the optional timestamp
// if it was present. JC
removeTypingIndicator(NULL);
removeTypingIndicator(source);
// Actually add the line
bool prepend_newline = true;
@@ -861,7 +859,7 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, LLColor4 incol
// Floater title contains display name -> bad idea to use that as filename
// mLogLabel, however, is the old legacy name
//LLLogChat::saveHistory(getTitle(),histstr);
LLLogChat::saveHistory(mLogLabel, histstr);
LLLogChat::saveHistory(mLogLabel, mSessionType == P2P_SESSION ? mOtherParticipantUUID : mSessionUUID, histstr);
// [/Ansariel: Display name support]
}
@@ -1179,9 +1177,9 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
}
}
void show_log_browser(const std::string& name, const std::string& id)
void show_log_browser(const std::string& name, const LLUUID& id)
{
const std::string file(LLLogChat::makeLogFileName(name));
const std::string file(LLLogChat::makeLogFileName(name, id));
if (!LLFile::isfile(file))
{
make_ui_sound("UISndBadKeystroke");
@@ -1195,7 +1193,7 @@ void show_log_browser(const std::string& name, const std::string& id)
}
LLFloaterWebContent::Params p;
p.url("file:///" + file);
p.id(id);
p.id(id.asString());
p.show_chrome(false);
p.trusted_content(true);
LLFloaterWebContent::showInstance("log", p); // If we passed id instead of "log", there would be no control over how many log browsers opened at once.
@@ -1206,8 +1204,8 @@ void LLFloaterIMPanel::onClickHistory()
if (mOtherParticipantUUID.notNull())
{
// [Ansariel: Display name support]
//show_log_browser(getTitle(), mOtherParticipantUUID.asString());
show_log_browser(mLogLabel, mOtherParticipantUUID.asString());
//show_log_browser(getTitle(), mSessionType == P2P_SESSION ? mOtherParticipantUUID : mSessionUUID);
show_log_browser(mLogLabel, mSessionType == P2P_SESSION ? mOtherParticipantUUID : mSessionUUID);
// [/Ansariel: Display name support]
}
}
@@ -1458,7 +1456,7 @@ void LLFloaterIMPanel::onSendMsg()
bool other_was_typing = mOtherTyping;
addHistoryLine(utf8_text, gSavedSettings.getColor("UserChatColor"), true, gAgentID, name);
if (other_was_typing) addTypingIndicator(mOtherTypingName);
if (other_was_typing) addTypingIndicator(mOtherParticipantUUID);
}
}
else
@@ -1588,90 +1586,99 @@ void LLFloaterIMPanel::sendTypingState(bool typing)
}
void LLFloaterIMPanel::processIMTyping(const LLIMInfo* im_info, bool typing)
void LLFloaterIMPanel::processIMTyping(const LLUUID& from_id, BOOL typing)
{
if (typing)
{
// other user started typing
std::string name;
if (!LLAvatarNameCache::getNSName(im_info->mFromID, name)) name = im_info->mName;
addTypingIndicator(name);
addTypingIndicator(from_id);
}
else
{
// other user stopped typing
removeTypingIndicator(im_info);
removeTypingIndicator(from_id);
}
}
void LLFloaterIMPanel::addTypingIndicator(const std::string &name)
void LLFloaterIMPanel::addTypingIndicator(const LLUUID& from_id)
{
// we may have lost a "stop-typing" packet, don't add it twice
if (!mOtherTyping)
// Singu TODO: Actually implement this?
/* Operation of "<name> is typing" state machine:
Not Typing state:
User types in P2P IM chat ... Send Start Typing, save Started time,
start Idle Timer (N seconds) go to Typing state
Typing State:
User enters a non-return character: if Now - Started > ME_TYPING_TIMEOUT, send
Start Typing, restart Idle Timer
User enters a return character: stop Idle Timer, send IM and Stop
Typing, go to Not Typing state
Idle Timer expires: send Stop Typing, go to Not Typing state
The recipient has a complementary state machine in which a Start Typing
that is not followed by either an IM or another Start Typing within OTHER_TYPING_TIMEOUT
seconds switches the sender out of typing state.
This has the nice quality of being self-healing for lost start/stop
messages while adding messages only for the (relatively rare) case of a
user who types a very long message (one that takes more than ME_TYPING_TIMEOUT seconds
to type).
Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of the state machine
*/
// We may have lost a "stop-typing" packet, don't add it twice
if (from_id.notNull() && !mOtherTyping)
{
mOtherTyping = true;
// Save im_info so that removeTypingIndicator can be properly called because a timeout has occurred
LLAvatarNameCache::getNSName(from_id, mOtherTypingName);
mTypingLineStartIndex = mHistoryEditor->getWText().length();
LLUIString typing_start = sTypingStartString;
typing_start.setArg("[NAME]", name);
typing_start.setArg("[NAME]", mOtherTypingName);
addHistoryLine(typing_start, gSavedSettings.getColor4("SystemChatColor"), false);
mOtherTypingName = name;
mOtherTyping = true;
// Update speaker
LLIMSpeakerMgr* speaker_mgr = mSpeakers;
if ( speaker_mgr )
{
speaker_mgr->setSpeakerTyping(from_id, TRUE);
}
mOtherTyping = true; // addHistoryLine clears this flag. Set it again.
}
// MBW -- XXX -- merge from release broke this (argument to this function changed from an LLIMInfo to a name)
// Richard will fix.
// mSpeakers->setSpeakerTyping(im_info->mFromID, TRUE);
}
void LLFloaterIMPanel::removeTypingIndicator(const LLIMInfo* im_info)
void LLFloaterIMPanel::removeTypingIndicator(const LLUUID& from_id)
{
if (mOtherTyping)
{
// Must do this first, otherwise addHistoryLine calls us again.
mOtherTyping = false;
S32 chars_to_remove = mHistoryEditor->getWText().length() - mTypingLineStartIndex;
mHistoryEditor->removeTextFromEnd(chars_to_remove);
if (im_info)
if (from_id.notNull())
{
mSpeakers->setSpeakerTyping(im_info->mFromID, FALSE);
mSpeakers->setSpeakerTyping(from_id, FALSE);
}
}
}
//static
void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata)
void LLFloaterIMPanel::chatFromLogFile(LLLogChat::ELogLineType type, const std::string& line)
{
LLFloaterIMPanel* self = (LLFloaterIMPanel*)userdata;
std::string message = line;
switch (type)
bool log_line = type == LLLogChat::LOG_LINE;
if (log_line || gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
{
case LLLogChat::LOG_EMPTY:
// add warning log enabled message
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
{
message = LLFloaterChat::getInstance()->getString("IM_logging_string");
}
break;
case LLLogChat::LOG_END:
// add log end message
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
{
message = LLFloaterChat::getInstance()->getString("IM_end_log_string");
}
break;
case LLLogChat::LOG_LINE:
// just add normal lines from file
break;
default:
// nothing
break;
LLStyleSP style(new LLStyle(true, gSavedSettings.getColor4("LogChatColor"), LLStringUtil::null));
mHistoryEditor->appendText(log_line ? line :
getString(type == LLLogChat::LOG_END ? "IM_end_log_string" : "IM_logging_string"),
false, true, style, false);
}
//self->addHistoryLine(line, LLColor4::grey, FALSE);
LLStyleSP style(new LLStyle(true, gSavedSettings.getColor4("LogChatColor"), LLStringUtil::null));
self->mHistoryEditor->appendText(message, false, true, style, false);
}
void LLFloaterIMPanel::showSessionStartError(

View File

@@ -39,7 +39,6 @@
class LLAvatarName;
class LLIMSpeakerMgr;
class LLIMInfo;
class LLInventoryCategory;
class LLInventoryItem;
class LLLineEditor;
@@ -126,8 +125,8 @@ public:
void sessionInitReplyReceived(const LLUUID& im_session_id);
// Handle other participant in the session typing.
void processIMTyping(const LLIMInfo* im_info, bool typing);
static void chatFromLogFile(LLLogChat::ELogLineType type, std::string line, void* userdata);
void processIMTyping(const LLUUID& from_id, BOOL typing);
void chatFromLogFile(LLLogChat::ELogLineType type, const std::string& line);
//show error statuses to the user
void showSessionStartError(const std::string& error_string);
@@ -177,10 +176,10 @@ private:
void setTyping(bool typing);
// Add the "User is typing..." indicator.
void addTypingIndicator(const std::string &name);
void addTypingIndicator(const LLUUID& from_id);
// Remove the "User is typing..." indicator.
void removeTypingIndicator(const LLIMInfo* im_info);
void removeTypingIndicator(const LLUUID& from_id = LLUUID::null);
void sendTypingState(bool typing);

View File

@@ -560,7 +560,7 @@ void LLIMProcessing::processNewMessage(const LLUUID& from_id,
chat.mFromID = from_id;
chat.mFromName = name;
chat.mSourceType = (from_id.isNull() || (name == SYSTEM_FROM)) ? CHAT_SOURCE_SYSTEM :
(dialog == IM_FROM_TASK && dialog == IM_FROM_TASK_AS_ALERT) ? CHAT_SOURCE_OBJECT : CHAT_SOURCE_AGENT;
(dialog == IM_FROM_TASK || dialog == IM_FROM_TASK_AS_ALERT) ? CHAT_SOURCE_OBJECT : CHAT_SOURCE_AGENT;
bool is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
// object IMs contain sender object id in session_id (STORM-1209)
@@ -641,8 +641,7 @@ void LLIMProcessing::processNewMessage(const LLUUID& from_id,
{
RlvUtil::sendBusyMessage(from_id, RlvStrings::getVersion(), session_id);
// We won't receive a typing stop message, so do that manually (see comment at the end of LLFloaterIMPanel::sendMsg)
LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
gIMMgr->processIMTypingStop(im_info);
gIMMgr->processIMTypingStop(from_id, dialog);
}
// [/RLVa:KB]
else if (offline == IM_ONLINE
@@ -918,16 +917,15 @@ void LLIMProcessing::processNewMessage(const LLUUID& from_id,
autoresponder_finish(show_autoresponded, session_id, from_id, name, itemid, is_muted);
}
}
LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
gIMMgr->processIMTypingStart(im_info);
gIMMgr->processIMTypingStart(from_id, dialog);
script_msg_api(from_id.asString() + ", 4");
}
break;
case IM_TYPING_STOP:
{
LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
gIMMgr->processIMTypingStop(im_info);
gIMMgr->processIMTypingStop(from_id, dialog);
script_msg_api(from_id.asString() + ", 5");
}
break;
@@ -1842,7 +1840,7 @@ void LLIMProcessing::processNewMessage(const LLUUID& from_id,
strings.push_back(from_id.asString());
send_generic_message("requestonlinenotification", strings);
args["NAME"] = name;
args["NAME"] = LLAvatarActions::getSLURL(from_id);
LLSD payload;
payload["from_id"] = from_id;
LLAvatarNameCache::get(from_id, boost::bind(&notification_display_name_callback, _1, _2, "FriendshipAccepted", args, payload));
@@ -1897,6 +1895,11 @@ void LLIMProcessing::requestOfflineMessages()
void LLIMProcessing::requestOfflineMessagesCoro(const LLCoroResponder& responder)
{
if (LLApp::isQuitting() || !gAgent.getRegion())
{
return;
}
auto status = responder.getStatus();
if (!responder.isGoodStatus(status)) // success = httpResults["success"].asBoolean();

View File

@@ -1138,23 +1138,23 @@ void LLIMMgr::noteMutedUsers(LLFloaterIMPanel* floater,
}
}
void LLIMMgr::processIMTypingStart(const LLIMInfo* im_info)
void LLIMMgr::processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type)
{
processIMTypingCore(im_info, TRUE);
processIMTypingCore(from_id, im_type, TRUE);
}
void LLIMMgr::processIMTypingStop(const LLIMInfo* im_info)
void LLIMMgr::processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type)
{
processIMTypingCore(im_info, FALSE);
processIMTypingCore(from_id, im_type, FALSE);
}
void LLIMMgr::processIMTypingCore(const LLIMInfo* im_info, BOOL typing)
void LLIMMgr::processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing)
{
LLUUID session_id = computeSessionID(im_info->mIMType, im_info->mFromID);
LLFloaterIMPanel* floater = findFloaterBySession(session_id);
if (floater)
LLUUID session_id = computeSessionID(im_type, from_id);
LLFloaterIMPanel* im_floater = findFloaterBySession(session_id);
if (im_floater)
{
floater->processIMTyping(im_info, typing);
im_floater->processIMTyping(from_id, typing);
}
}
@@ -1275,10 +1275,10 @@ LLFloaterChatterBox* LLIMMgr::getFloater()
return LLFloaterChatterBox::getInstance(LLSD());
}
class LLViewerChatterBoxSessionStartReply : public LLHTTPNode
class LLViewerChatterBoxSessionStartReply final : public LLHTTPNode
{
public:
virtual void describe(Description& desc) const
void describe(Description& desc) const override
{
desc.shortInfo("Used for receiving a reply to a request to initialize an ChatterBox session");
desc.postAPI();
@@ -1287,18 +1287,15 @@ public:
desc.source(__FILE__, __LINE__);
}
virtual void post(ResponsePtr response,
void post(ResponsePtr response,
const LLSD& context,
const LLSD& input) const
const LLSD& input) const override
{
LLSD body;
LLUUID temp_session_id;
LLUUID session_id;
bool success;
body = input["body"];
success = body["success"].asBoolean();
temp_session_id = body["temp_session_id"].asUUID();
LLSD body = input["body"];
bool success = body["success"].asBoolean();
LLUUID temp_session_id = body["temp_session_id"].asUUID();
if ( success )
{
@@ -1336,10 +1333,10 @@ public:
}
};
class LLViewerChatterBoxSessionEventReply : public LLHTTPNode
class LLViewerChatterBoxSessionEventReply final : public LLHTTPNode
{
public:
virtual void describe(Description& desc) const
void describe(Description& desc) const override
{
desc.shortInfo("Used for receiving a reply to a ChatterBox session event");
desc.postAPI();
@@ -1348,24 +1345,18 @@ public:
desc.source(__FILE__, __LINE__);
}
virtual void post(ResponsePtr response,
void post(ResponsePtr response,
const LLSD& context,
const LLSD& input) const
const LLSD& input) const override
{
LLUUID session_id;
bool success;
LLSD body = input["body"];
success = body["success"].asBoolean();
session_id = body["session_id"].asUUID();
bool success = body["success"].asBoolean();
LLUUID session_id = body["session_id"].asUUID();
if ( !success )
{
//throw an error dialog
LLFloaterIMPanel* floater =
gIMMgr->findFloaterBySession(session_id);
if (floater)
if (auto* floater = gIMMgr->findFloaterBySession(session_id))
{
floater->showSessionEventError(
body["event"].asString(),
@@ -1378,46 +1369,40 @@ public:
class LLViewerForceCloseChatterBoxSession: public LLHTTPNode
{
public:
virtual void post(ResponsePtr response,
void post(ResponsePtr response,
const LLSD& context,
const LLSD& input) const
const LLSD& input) const override
{
LLUUID session_id;
std::string reason;
LLUUID session_id = input["body"]["session_id"].asUUID();
std::string reason = input["body"]["reason"].asString();
session_id = input["body"]["session_id"].asUUID();
reason = input["body"]["reason"].asString();
LLFloaterIMPanel* floater =
gIMMgr ->findFloaterBySession(session_id);
if ( floater )
if (auto* floater = gIMMgr ->findFloaterBySession(session_id))
{
floater->showSessionForceClose(reason);
}
}
};
class LLViewerChatterBoxSessionAgentListUpdates : public LLHTTPNode
class LLViewerChatterBoxSessionAgentListUpdates final : public LLHTTPNode
{
public:
virtual void post(
void post(
ResponsePtr responder,
const LLSD& context,
const LLSD& input) const
const LLSD& input) const override
{
const LLUUID& session_id = input["body"]["session_id"].asUUID();
gIMMgr->processAgentListUpdates(session_id, input["body"]);
}
};
class LLViewerChatterBoxSessionUpdate : public LLHTTPNode
class LLViewerChatterBoxSessionUpdate final : public LLHTTPNode
{
public:
virtual void post(
void post(
ResponsePtr responder,
const LLSD& context,
const LLSD& input) const
const LLSD& input) const override
{
LLUUID session_id = input["body"]["session_id"].asUUID();
LLFloaterIMPanel* im_floater = gIMMgr->findFloaterBySession(session_id);
@@ -1445,14 +1430,14 @@ void leave_group_chat(const LLUUID& from_id, const LLUUID& session_id)
gIMMgr->removeSession(session_id);
}
class LLViewerChatterBoxInvitation : public LLHTTPNode
class LLViewerChatterBoxInvitation final : public LLHTTPNode
{
public:
virtual void post(
void post(
ResponsePtr response,
const LLSD& context,
const LLSD& input) const
const LLSD& input) const override
{
//for backwards compatiblity reasons...we need to still
//check for 'text' or 'voice' invitations...bleh
@@ -1582,10 +1567,9 @@ public:
LLFloaterChat::addChat(chat, TRUE, is_this_agent);
//K now we want to accept the invitation
std::string url = gAgent.getRegion()->getCapability(
"ChatSessionRequest");
std::string url = gAgent.getRegionCapability("ChatSessionRequest");
if ( url != "" )
if (!url.empty())
{
LLSD data;
data["method"] = "accept invitation";

View File

@@ -42,7 +42,7 @@
class LLFloaterChatterBox;
class LLFloaterIMPanel;
class LLIMMgr : public LLSingleton<LLIMMgr>
class LLIMMgr final : public LLSingleton<LLIMMgr>
{
public:
enum EInvitationType
@@ -121,8 +121,8 @@ public:
void updateFloaterSessionID(const LLUUID& old_session_id,
const LLUUID& new_session_id);
void processIMTypingStart(const LLIMInfo* im_info);
void processIMTypingStop(const LLIMInfo* im_info);
void processIMTypingStart(const LLUUID& from_id, const EInstantMessage im_type);
void processIMTypingStop(const LLUUID& from_id, const EInstantMessage im_type);
void clearNewIMNotification();
@@ -209,7 +209,7 @@ private:
void noteOfflineUsers(LLFloaterIMPanel* panel, const uuid_vec_t& ids);
void noteMutedUsers(LLFloaterIMPanel* panel, const uuid_vec_t& ids);
void processIMTypingCore(const LLIMInfo* im_info, BOOL typing);
void processIMTypingCore(const LLUUID& from_id, const EInstantMessage im_type, BOOL typing);
private:
std::set<LLHandle<LLFloater> > mFloaters;

View File

@@ -3889,6 +3889,9 @@ void build_context_menu_folder_options(LLInventoryModel* model, const LLUUID& mU
const LLInventoryCategory* category = model->getCategory(mUUID);
if(!category) return;
items.push_back(std::string("Open Folder In New Window"));
items.push_back(std::string("Copy Folder UUID"));
const LLUUID trash_id = model->findCategoryUUIDForType(LLFolderType::FT_TRASH);
if (trash_id == mUUID) return;
if (model->isObjectDescendentOf(mUUID, trash_id)) return;
@@ -3902,9 +3905,6 @@ void build_context_menu_folder_options(LLInventoryModel* model, const LLUUID& mU
const LLUUID listings_folder = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
if (listings_folder.notNull() && gInventory.isObjectDescendentOf(mUUID, listings_folder)) return;
items.push_back(std::string("Open Folder In New Window"));
items.push_back(std::string("Copy Folder UUID"));
LLFolderType::EType type = category->getPreferredType();
const bool is_system_folder = LLFolderType::lookupIsProtectedType(type);
// calling card related functionality for folders.

View File

@@ -36,35 +36,132 @@
#include "lllogchat.h"
#include "llappviewer.h"
#include "llfloaterchat.h"
#include "llsdserialize.h"
static std::string get_log_dir_file(const std::string& filename)
{
return gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS, filename);
}
//static
std::string LLLogChat::makeLogFileName(std::string filename)
std::string LLLogChat::makeLogFileNameInternal(std::string filename)
{
if (gSavedPerAccountSettings.getBOOL("LogFileNamewithDate"))
static const LLCachedControl<bool> with_date(gSavedPerAccountSettings, "LogFileNamewithDate");
if (with_date)
{
time_t now;
time(&now);
char dbuffer[100]; /* Flawfinder: ignore */
if (filename == "chat")
{
static const LLCachedControl<std::string> local_chat_date_format(gSavedPerAccountSettings, "LogFileLocalChatDateFormat", "-%Y-%m-%d");
strftime(dbuffer, 100, local_chat_date_format().c_str(), localtime(&now));
}
else
{
static const LLCachedControl<std::string> ims_date_format(gSavedPerAccountSettings, "LogFileIMsDateFormat", "-%Y-%m");
strftime(dbuffer, 100, ims_date_format().c_str(), localtime(&now));
}
filename += dbuffer;
std::array<char, 100> dbuffer;
static const LLCachedControl<std::string> local_chat_date_format(gSavedPerAccountSettings, "LogFileLocalChatDateFormat", "-%Y-%m-%d");
static const LLCachedControl<std::string> ims_date_format(gSavedPerAccountSettings, "LogFileIMsDateFormat", "-%Y-%m");
strftime(dbuffer.data(), dbuffer.size(), (filename == "chat" ? local_chat_date_format : ims_date_format)().c_str(), localtime(&now));
filename += dbuffer.data();
}
cleanFileName(filename);
return get_log_dir_file(filename + ".txt");
}
bool LLLogChat::migrateFile(const std::string& old_name, const std::string& filename)
{
std::string oldfile = makeLogFileNameInternal(old_name);
if (!LLFile::isfile(oldfile)) return false; // An old file by this name doesn't exist
if (LLFile::isfile(filename)) // A file by the new name also exists, but wasn't being tracked yet
{
auto&& new_untracked_log = llifstream(filename);
auto&& tracked_log = llofstream(oldfile, llofstream::out|llofstream::app);
// Append new to old and find out if it failed
bool failed = !(tracked_log << new_untracked_log.rdbuf());
// Close streams
new_untracked_log.close();
tracked_log.close();
if (failed || LLFile::remove(filename)) // Delete the untracked new file so that reclaiming its name won't fail
return true; // We failed to remove it or update the old file, let's just use the new file and leave the old one alone
}
LLFile::rename(oldfile, filename); // Move the existing file to the new name
return true; // Report success
}
static LLSD sIDMap;
static std::string get_ids_map_file() { return get_log_dir_file("ids_to_names.json"); }
void LLLogChat::initializeIDMap()
{
const auto map_file = get_ids_map_file();
bool write = true; // Do we want to write back to map_file?
if (LLFile::isfile(map_file)) // If we've already made this file, load our map from it
{
if (auto&& fstr = llifstream(map_file))
{
LLSDSerialize::fromNotation(sIDMap, fstr, LLSDSerialize::SIZE_UNLIMITED);
fstr.close();
}
write = false; // Don't write what we just read
}
if (gCacheName) // Load what we can from name cache to initialize or update the map and its file
{
bool empty = sIDMap.size() == 0; // Opt out of searching the map for IDs we added if we started with none
for (const auto& r : gCacheName->getReverseMap()) // For every name id pair
{
const auto id = r.second.asString();
const auto& name = r.first;
const auto filename = makeLogFileNameInternal(name);
bool id_known = !empty && sIDMap.has(id); // Is this ID known?
if (id_known ? name != sIDMap[id].asStringRef() // If names don't match
&& migrateFile(sIDMap[id].asStringRef(), filename) // Do we need to migrate an existing log?
: LLFile::isfile(filename)) // Otherwise if there's a log file for them but they're not in the map yet
{
if (id_known) write = true; // We updated, write
sIDMap[id] = name; // Add them to the map
}
}
if (write)
if (auto&& fstr = llofstream(map_file))
{
LLSDSerialize::toPrettyNotation(sIDMap, fstr);
fstr.close();
}
}
}
//static
std::string LLLogChat::makeLogFileName(const std::string& username, const LLUUID& id)
{
const auto name = username.empty() ? id.asString() : username; // Fall back on ID if the grid sucks and we have no name
std::string filename = makeLogFileNameInternal(name);
if (id.notNull() && !LLFile::isfile(filename)) // No existing file by this user's current name, check for possible file rename
{
auto& entry = sIDMap[id.asString()];
const bool empty = !entry.size();
if (empty || entry != name) // If we haven't seen this entry yet, or the name is different than we remember
{
if (empty) // We didn't see this entry on load
{
// Ideally, we would look up the old names here via server request
// In lieu of that, our reverse cache has old names and new names that we've gained since our initialization of the ID map
for (const auto& r : gCacheName->getReverseMap())
if (r.second == id && migrateFile(r.first, filename))
break;
}
else migrateFile(entry.asStringRef(), filename); // We've seen this entry before, migrate old file if it exists
entry = name; // Update the entry to point to the new name
if (auto&& fstr = llofstream(get_ids_map_file())) // Write back to our map file
{
LLSDSerialize::toPrettyNotation(sIDMap, fstr);
fstr.close();
}
}
}
filename = cleanFileName(filename);
filename = gDirUtilp->getExpandedFilename(LL_PATH_PER_ACCOUNT_CHAT_LOGS,filename);
filename += ".txt";
return filename;
}
std::string LLLogChat::cleanFileName(std::string filename)
void LLLogChat::cleanFileName(std::string& filename)
{
std::string invalidChars = "\"\'\\/?*:<>|[]{}~"; // Cannot match glob or illegal filename chars
S32 position = filename.find_first_of(invalidChars);
@@ -73,7 +170,6 @@ std::string LLLogChat::cleanFileName(std::string filename)
filename[position] = '_';
position = filename.find_first_of(invalidChars, position);
}
return filename;
}
static void time_format(std::string& out, const char* fmt, const std::tm* time)
@@ -92,6 +188,7 @@ static void time_format(std::string& out, const char* fmt, const std::tm* time)
charvector.resize(1+size); // Use the String Stone
format_the_time();
}
#undef format_the_time
out.assign(charvector.data());
}
@@ -117,15 +214,15 @@ std::string LLLogChat::timestamp(bool withdate)
//static
void LLLogChat::saveHistory(std::string const& filename, std::string line)
void LLLogChat::saveHistory(const std::string& name, const LLUUID& id, const std::string& line)
{
if(!filename.size())
if(name.empty() && id.isNull())
{
LL_INFOS() << "Filename is Empty!" << LL_ENDL;
return;
}
LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(filename), "a"); /*Flawfinder: ignore*/
LLFILE* fp = LLFile::fopen(LLLogChat::makeLogFileName(name, id), "a"); /*Flawfinder: ignore*/
if (!fp)
{
LL_INFOS() << "Couldn't open chat history log!" << LL_ENDL;
@@ -140,10 +237,9 @@ void LLLogChat::saveHistory(std::string const& filename, std::string line)
static long const LOG_RECALL_BUFSIZ = 2048;
void LLLogChat::loadHistory(std::string const& filename , void (*callback)(ELogLineType, std::string, void*), void* userdata)
void LLLogChat::loadHistory(const std::string& name, const LLUUID& id, std::function<void (ELogLineType, const std::string&)> callback)
{
bool filename_empty = filename.empty();
if (filename_empty)
if (name.empty() && id.isNull())
{
LL_WARNS() << "filename is empty!" << LL_ENDL;
}
@@ -154,7 +250,7 @@ void LLLogChat::loadHistory(std::string const& filename , void (*callback)(ELogL
if (lines == 0) break;
// Open the log file.
LLFILE* fptr = LLFile::fopen(makeLogFileName(filename), "rb");
LLFILE* fptr = LLFile::fopen(makeLogFileName(name, id), "rb");
if (!fptr) break;
// Set pos to point to the last character of the file, if any.
@@ -199,20 +295,15 @@ void LLLogChat::loadHistory(std::string const& filename , void (*callback)(ELogL
// Read lines from the file one by one until we reach the end of the file.
while (fgets(buffer, LOG_RECALL_BUFSIZ, fptr))
{
size_t len = strlen(buffer);
int i = len - 1;
while (i >= 0 && (buffer[i] == '\r' || buffer[i] == '\n')) // strip newline chars from the end of the string
{
buffer[i] = '\0';
i--;
}
callback(LOG_LINE, buffer, userdata);
// strip newline chars from the end of the string
for (S32 i = strlen(buffer) - 1; i >= 0 && (buffer[i] == '\r' || buffer[i] == '\n'); --i)
buffer[i] = '\0';
callback(LOG_LINE, buffer);
}
fclose(fptr);
callback(LOG_END, LLStringUtil::null, userdata);
callback(LOG_END, LLStringUtil::null);
return;
}
callback(LOG_EMPTY, LLStringUtil::null, userdata);
callback(LOG_EMPTY, LLStringUtil::null);
}

View File

@@ -45,14 +45,16 @@ public:
LOG_LINE,
LOG_END
};
static void initializeIDMap();
static std::string timestamp(bool withdate = false);
static std::string makeLogFileName(std::string filename);
static void saveHistory(std::string const& filename, std::string line);
static void loadHistory(std::string const& filename,
void (*callback)(ELogLineType,std::string,void*),
void* userdata);
static std::string makeLogFileName(const std::string& name, const LLUUID& id);
static void saveHistory(const std::string& name, const LLUUID& id, const std::string& line);
static void loadHistory(const std::string& name, const LLUUID& id,
std::function<void (ELogLineType, const std::string&)> callback);
private:
static std::string cleanFileName(std::string filename);
static std::string makeLogFileNameInternal(std::string filename);
static bool migrateFile(const std::string& old_name, const std::string& filename);
static void cleanFileName(std::string& filename);
};
#endif

View File

@@ -72,7 +72,7 @@ namespace
{
// This method is used to return an object to mute given an object id.
// Its used by the LLMute constructor and LLMuteList::isMuted.
LLViewerObject* get_object_to_mute_from_id(LLUUID object_id)
LLViewerObject* get_object_to_mute_from_id(const LLUUID& object_id)
{
LLViewerObject *objectp = gObjectList.findObject(object_id);
if ((objectp) && (!objectp->isAvatar()))
@@ -91,11 +91,11 @@ namespace
class LLDispatchEmptyMuteList : public LLDispatchHandler
{
public:
virtual bool operator()(
bool operator()(
const LLDispatcher* dispatcher,
const std::string& key,
const LLUUID& invoice,
const sparam_t& strings)
const sparam_t& strings) override
{
LLMuteList::getInstance()->setLoaded();
return true;
@@ -160,10 +160,10 @@ std::string LLMute::getDisplayType() const
LLMuteList* LLMuteList::getInstance()
{
// Register callbacks at the first time that we find that the message system has been created.
static BOOL registered = FALSE;
if( !registered && gMessageSystem != NULL)
static bool registered = false;
if( !registered && gMessageSystem)
{
registered = TRUE;
registered = true;
// Register our various callbacks
gMessageSystem->setHandlerFuncFast(_PREHASH_MuteListUpdate, processMuteListUpdate);
gMessageSystem->setHandlerFuncFast(_PREHASH_UseCachedMuteList, processUseCachedMuteList);
@@ -206,7 +206,7 @@ BOOL LLMuteList::isLinden(const std::string& name) const
tokenizer::iterator token_iter = tokens.begin();
if (token_iter == tokens.end()) return FALSE;
token_iter++;
++token_iter;
if (token_iter == tokens.end()) return FALSE;
std::string last_name = *token_iter;
@@ -227,7 +227,7 @@ static LLVOAvatar* find_avatar(const LLUUID& id)
}
else
{
return NULL;
return nullptr;
}
}
@@ -237,6 +237,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
if ((mute.mType == LLMute::AGENT)
&& isLinden(mute.mName) && (flags & LLMute::flagTextChat || flags == 0))
{
LL_WARNS() << "Trying to mute a Linden; ignored" << LL_ENDL;
LLNotifications::instance().add("MuteLinden", LLSD(), LLSD());
return FALSE;
}
@@ -245,6 +246,7 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
if (mute.mType == LLMute::AGENT
&& mute.mID == gAgent.getID())
{
LL_WARNS() << "Trying to self; ignored" << LL_ENDL;
return FALSE;
}
@@ -275,67 +277,67 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
}
else
{
LL_INFOS() << "duplicate mute ignored" << LL_ENDL;
// was duplicate
return FALSE;
}
}
// Need a local (non-const) copy to set up flags properly.
LLMute localmute = mute;
// If an entry for the same entity is already in the list, remove it, saving flags as necessary.
mute_set_t::iterator it = mMutes.find(localmute);
bool duplicate = it != mMutes.end();
if (duplicate)
{
// This mute is already in the list. Save the existing entry's flags if that's warranted.
localmute.mFlags = it->mFlags;
mMutes.erase(it);
// Don't need to call notifyObservers() here, since it will happen after the entry has been re-added below.
}
else
{
// Need a local (non-const) copy to set up flags properly.
LLMute localmute = mute;
// If an entry for the same entity is already in the list, remove it, saving flags as necessary.
mute_set_t::iterator it = mMutes.find(localmute);
if (it != mMutes.end())
{
// This mute is already in the list. Save the existing entry's flags if that's warranted.
localmute.mFlags = it->mFlags;
mMutes.erase(it);
// Don't need to call notifyObservers() here, since it will happen after the entry has been re-added below.
}
else
{
// There was no entry in the list previously. Fake things up by making it look like the previous entry had all properties unmuted.
localmute.mFlags = LLMute::flagAll;
}
// There was no entry in the list previously. Fake things up by making it look like the previous entry had all properties unmuted.
localmute.mFlags = LLMute::flagAll;
}
if(flags)
{
// The user passed some combination of flags. Make sure those flag bits are turned off (i.e. those properties will be muted).
localmute.mFlags &= (~flags);
}
else
{
// The user passed 0. Make sure all flag bits are turned off (i.e. all properties will be muted).
localmute.mFlags = 0;
}
if(flags)
{
// The user passed some combination of flags. Make sure those flag bits are turned off (i.e. those properties will be muted).
localmute.mFlags &= (~flags);
}
else
{
// The user passed 0. Make sure all flag bits are turned off (i.e. all properties will be muted).
localmute.mFlags = 0;
}
// (re)add the mute entry.
{
std::pair<mute_set_t::iterator, bool> result = mMutes.insert(localmute);
if (result.second)
// (re)add the mute entry.
{
auto result = mMutes.insert(localmute);
if (result.second)
{
LL_INFOS() << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL;
updateAdd(localmute);
notifyObservers();
notifyObserversDetailed(localmute);
if(!(localmute.mFlags & LLMute::flagParticles))
{
LL_INFOS() << "Muting " << localmute.mName << " id " << localmute.mID << " flags " << localmute.mFlags << LL_ENDL;
updateAdd(localmute);
notifyObservers();
notifyObserversDetailed(localmute);
if(!(localmute.mFlags & LLMute::flagParticles))
//Kill all particle systems owned by muted task
if(localmute.mType == LLMute::AGENT || localmute.mType == LLMute::OBJECT)
{
//Kill all particle systems owned by muted task
if(localmute.mType == LLMute::AGENT || localmute.mType == LLMute::OBJECT)
{
LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID);
}
LLViewerPartSim::getInstance()->clearParticlesByOwnerID(localmute.mID);
}
//mute local lights that are attached to the avatar
LLVOAvatar *avatarp = find_avatar(localmute.mID);
if (avatarp)
{
LLPipeline::removeMutedAVsLights(avatarp);
}
return TRUE;
}
//mute local lights that are attached to the avatar
LLVOAvatar *avatarp = find_avatar(localmute.mID);
if (avatarp)
{
LLPipeline::removeMutedAVsLights(avatarp);
}
return !duplicate;
}
}
@@ -514,18 +516,14 @@ std::vector<LLMute> LLMuteList::getMutes() const
{
std::vector<LLMute> mutes;
for (mute_set_t::const_iterator it = mMutes.begin();
it != mMutes.end();
++it)
for (const auto& mMute : mMutes)
{
mutes.push_back(*it);
mutes.push_back(mMute);
}
for (string_set_t::const_iterator it = mLegacyMutes.begin();
it != mLegacyMutes.end();
++it)
for (const auto& mLegacyMute : mLegacyMutes)
{
LLMute legacy(LLUUID::null, *it);
LLMute legacy(LLUUID::null, mLegacyMute);
mutes.push_back(legacy);
}
@@ -538,7 +536,7 @@ std::vector<LLMute> LLMuteList::getMutes() const
//-----------------------------------------------------------------------------
BOOL LLMuteList::loadFromFile(const std::string& filename)
{
if(!filename.size())
if(filename.empty())
{
LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
return FALSE;
@@ -588,7 +586,7 @@ BOOL LLMuteList::loadFromFile(const std::string& filename)
//-----------------------------------------------------------------------------
BOOL LLMuteList::saveToFile(const std::string& filename)
{
if(!filename.size())
if(filename.empty())
{
LL_WARNS() << "Mute List Filename is Empty!" << LL_ENDL;
return FALSE;
@@ -603,23 +601,19 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
// legacy mutes have null uuid
std::string id_string;
LLUUID::null.toString(id_string);
for (string_set_t::iterator it = mLegacyMutes.begin();
it != mLegacyMutes.end();
++it)
for (const auto& mLegacyMute : mLegacyMutes)
{
fprintf(fp, "%d %s %s|\n", (S32)LLMute::BY_NAME, id_string.c_str(), it->c_str());
fprintf(fp, "%d %s %s|\n", (S32)LLMute::BY_NAME, id_string.c_str(), mLegacyMute.c_str());
}
for (mute_set_t::iterator it = mMutes.begin();
it != mMutes.end();
++it)
for (const auto& mMute : mMutes)
{
// Don't save external mutes as they are not sent to the server and probably won't
//be valid next time anyway.
if (it->mType != LLMute::EXTERNAL)
if (mMute.mType != LLMute::EXTERNAL)
{
it->mID.toString(id_string);
const std::string& name = it->mName;
fprintf(fp, "%d %s %s|%u\n", (S32)it->mType, id_string.c_str(), name.c_str(), it->mFlags);
mMute.mID.toString(id_string);
const std::string& name = mMute.mName;
fprintf(fp, "%d %s %s|%u\n", (S32)mMute.mType, id_string.c_str(), name.c_str(), mMute.mFlags);
}
}
fclose(fp);
@@ -629,6 +623,9 @@ BOOL LLMuteList::saveToFile(const std::string& filename)
BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) const
{
if (mMutes.empty() && mLegacyMutes.empty())
return FALSE;
// for objects, check for muting on their parent prim
LLViewerObject* mute_object = get_object_to_mute_from_id(id);
LLUUID id_to_check = (mute_object) ? mute_object->getID() : id;
@@ -662,10 +659,8 @@ BOOL LLMuteList::isMuted(const LLUUID& id, const std::string& name, U32 flags) c
//-----------------------------------------------------------------------------
void LLMuteList::requestFromServer(const LLUUID& agent_id)
{
std::string agent_id_string;
std::string filename;
agent_id.toString(agent_id_string);
filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,agent_id_string) + ".cached_mute";
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,
llformat("%s.cached_mute", agent_id.asString().c_str()));
LLCRC crc;
crc.update(filename);
@@ -688,10 +683,8 @@ void LLMuteList::cache(const LLUUID& agent_id)
// Write to disk even if empty.
if(mIsLoaded)
{
std::string agent_id_string;
std::string filename;
agent_id.toString(agent_id_string);
filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,agent_id_string) + ".cached_mute";
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,
llformat("%s.cached_mute", agent_id.asString().c_str()));
saveToFile(filename);
}
}
@@ -729,10 +722,8 @@ void LLMuteList::processUseCachedMuteList(LLMessageSystem* msg, void**)
{
LL_INFOS() << "LLMuteList::processUseCachedMuteList()" << LL_ENDL;
std::string agent_id_string;
gAgent.getID().toString(agent_id_string);
std::string filename;
filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,agent_id_string) + ".cached_mute";
std::string filename = gDirUtilp->getExpandedFilename(LL_PATH_CACHE,
llformat("%s.cached_mute", gAgent.getID().asString().c_str()));
LLMuteList::getInstance()->loadFromFile(filename);
}

View File

@@ -224,7 +224,9 @@ LLNotifyBox::LLNotifyBox(LLNotificationPtr notification)
if (!mIsCaution || !mIsTip) // We could do some extra color math here to determine if bg's too close to link color, but let's just cross with the link color instead
mText->setLinkColor(new LLColor4(lerp(text_color, gSavedSettings.getColor4("HTMLLinkColor"), 0.4f)));
mText->setTabStop(FALSE); // can't tab to it (may be a problem for scrolling via keyboard)
mText->appendText(message,false,false,style,!layout_script_dialog); // Now we can set the text, since colors have been set.
mText->appendText(message,false,false,style); // Now we can set the text, since colors have been set.
if (is_textbox || layout_script_dialog)
mText->appendText(notification->getSubstitutions()["SCRIPT_MESSAGE"], false, true, style, false);
addChild(mText);
}

View File

@@ -340,7 +340,7 @@ static std::string profile_picture_title(const std::string& str) { return "Profi
static void show_partner_help() { LLNotificationsUtil::add("ClickPartnerHelpAvatar", LLSD(), LLSD(), boost::bind(LLPanelAvatarSecondLife::onClickPartnerHelpLoadURL, _1, _2)); }
void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type)
{
void show_log_browser(const std::string& name, const std::string& id);
void show_log_browser(const std::string& name, const LLUUID& id);
std::string name;
if (type == LFIDBearer::AVATAR)
{
@@ -352,7 +352,7 @@ void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type)
{
gCacheName->getGroupName(id, name);
}
show_log_browser(name, id.asString());
show_log_browser(name, id);
}
BOOL LLPanelAvatarSecondLife::postBuild()
{
@@ -985,7 +985,8 @@ void LLPanelAvatarPicks::processProperties(void* data, EAvatarProcessorType type
// are no tabs in the container.
tabs->selectFirstTab();
bool edit(getPanelAvatar()->isEditable());
bool can_add = self && tabs->getTabCount() < LLAgentBenefitsMgr::current().getPicksLimit();
auto count = tabs->getTabCount();
bool can_add = self && count < LLAgentBenefitsMgr::current().getPicksLimit();
LLView* view = getChildView("New...");
view->setEnabled(can_add
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
@@ -993,7 +994,7 @@ void LLPanelAvatarPicks::processProperties(void* data, EAvatarProcessorType type
// [/RLVa:KB]
view->setVisible(self && edit);
view = getChildView("Delete...");
view->setEnabled(can_add);
view->setEnabled(count);
view->setVisible(self && edit);
//For pick import/export - RK
@@ -1001,7 +1002,7 @@ void LLPanelAvatarPicks::processProperties(void* data, EAvatarProcessorType type
view->setVisible(self && edit);
view->setEnabled(can_add);
view = getChildView("Export...");
view->setEnabled(can_add);
view->setEnabled(count);
view->setVisible(self);
childSetVisible("loading_text", false);

View File

@@ -32,6 +32,7 @@
#include "lllineeditor.h"
#include "llfloaterexperienceprofile.h"
#include "llfloaterexperiences.h"
//#include "llfloaterreg.h"
#include "lluictrlfactory.h"
#include "llscrolllistctrl.h"
@@ -62,13 +63,12 @@ const static std::string columnSpace = " ";
/* Singu Note: We do not have injectors, so we'll have to call this function instead
static LLPanelInjector<LLPanelExperiencePicker> t_panel_status("llpanelexperiencepicker");
*/
void* create_xp_picker(void* data) { return new LLPanelExperiencePicker(false); }
LLPanelExperiencePicker::LLPanelExperiencePicker(bool build)
LLPanelExperiencePicker::LLPanelExperiencePicker()
:LLPanel()
{
//buildFromFile("panel_experience_search.xml");
if (build) LLUICtrlFactory::getInstance()->buildPanel(this, "panel_experience_search.xml"); // Singu Note: Use filename in xml
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_experience_search.xml"); // Singu Note: Use filename in xml
setDefaultFilters();
}
@@ -288,7 +288,7 @@ void LLPanelExperiencePicker::onBtnSelect()
void LLPanelExperiencePicker::onBtnClose()
{
LLFloater* floater = static_cast<LLFloater*>(getParent());
LLFloater* floater = mSelectionCallback ? static_cast<LLFloater*>(getParent()) : LLFloaterExperiences::findInstance();
if (floater)
{
floater->close();

View File

@@ -32,7 +32,6 @@
class LLScrollListCtrl;
class LLLineEditor;
void* create_xp_picker(void* data);
class LLPanelExperiencePicker final : public LLPanel
{
public:
@@ -44,7 +43,7 @@ public:
typedef std::function<bool (const LLSD&)> filter_function;
typedef std::vector<filter_function> filter_list;
LLPanelExperiencePicker(bool build = true);
LLPanelExperiencePicker();
virtual ~LLPanelExperiencePicker();
BOOL postBuild() override;

View File

@@ -1609,22 +1609,8 @@ std::string LLPreviewGesture::getLabel(const std::vector<std::string>& v_labels)
for(const auto& pair : LLPreview::sInstances)
{
const auto& pPreview(pair.second);
#ifndef LL_WINDOWS
#if __cplusplus >= 201606
constexpr std::string_view gesture("Gesture");
if (pPreview && pPreview->getTitleName().compare(gesture) == 0)
LL_COMPILE_TIME_MESSAGE("String view support detected, remove this macro check, this line and the old check below");
#endif
#endif
if (pPreview && pPreview->getTitleName() ==
#ifndef LL_WINDOWS
static_cast<const std::string>(
#endif
"Gesture"
#ifndef LL_WINDOWS
)
#endif
)
if (pPreview && std::string_view(pPreview->getTitleName()) == gesture)
{
wait_anim = pPreview->getChild<LLCheckBoxCtrl>("wait_anim_check")->getLabel();
break;

View File

@@ -70,6 +70,7 @@ static U32 sZombieGroups = 0;
U32 LLSpatialGroup::sNodeCount = 0;
U32 gOctreeMaxCapacity;
float gOctreeMinSize;
U32 gOctreeReserveCapacity;
BOOL LLSpatialGroup::sNoDelete = FALSE;
@@ -751,7 +752,7 @@ void LLSpatialGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* c
{
if (child->getListenerCount() == 0)
{
new LLSpatialGroup(child, getSpatialPartition());
LLPointer<LLSpatialGroup> tmp = new LLSpatialGroup(child, getSpatialPartition());
}
else
{
@@ -816,7 +817,7 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
mSlopRatio = 0.25f;
mInfiniteFarClip = FALSE;
new LLSpatialGroup(mOctree, this);
LLPointer<LLSpatialGroup> tmp = new LLSpatialGroup(mOctree, this);
}
@@ -1623,10 +1624,10 @@ void renderOctree(LLSpatialGroup* group)
gGL.diffuseColor4fv(col.mV);
LLVector4a fudge;
fudge.splat(0.001f);
const LLVector4a* bounds = group->getObjectBounds();
LLVector4a size = bounds[1];
size.mul(1.01f);
size.add(fudge);
//const LLVector4a* bounds = group->getObjectBounds();
//LLVector4a size = bounds[1];
//size.mul(1.01f);
//size.add(fudge);*/
//{
// LLGLDepthTest depth(GL_TRUE, GL_FALSE);

View File

@@ -116,7 +116,7 @@ public:
BOOL mParticle;
F32 mPartSize;
F32 mVSize;
LLSpatialGroup* mGroup;
LLPointer<LLSpatialGroup> mGroup;
LL_ALIGN_16(LLFace* mFace); //associated face
F32 mDistance;
U32 mDrawMode;
@@ -316,7 +316,7 @@ public:
void drawObjectBox(LLColor4 col);
LLSpatialPartition* getSpatialPartition() const {return (LLSpatialPartition*)mSpatialPartition;}
LLSpatialPartition* getSpatialPartition() const {return mSpatialPartition;}
//LISTENER FUNCTIONS
void handleInsertion(const TreeNode* node, LLViewerOctreeEntry* face) final override;
@@ -478,7 +478,7 @@ class LLCullResult
public:
LLCullResult() {}
typedef std::vector<LLSpatialGroup*> sg_list_t;
typedef std::vector<LLPointer<LLSpatialGroup> > sg_list_t;
typedef std::vector<LLDrawable*> drawable_list_t;
typedef std::vector<LLSpatialBridge*> bridge_list_t;
typedef std::vector<LLDrawInfo*> drawinfo_list_t;

View File

@@ -1837,6 +1837,7 @@ bool idle_startup()
display_startup();
LLStartUp::initNameCache();
LLLogChat::initializeIDMap(); // Name cache loaded, create a happy mappy
display_startup();
// update the voice settings *after* gCacheName initialization

View File

@@ -139,6 +139,7 @@ public:
static bool startLLProxy(); // Initialize the SOCKS 5 proxy
static LLViewerStats::PhaseMap& getPhases() { return *sPhases; }
static LLEventPump& getStateEventPump() { return *sStateWatcher; }
private:
static LLSLURL sStartSLURL;

View File

@@ -53,6 +53,7 @@
#include "llglheaders.h"
#include "lldrawpoolterrain.h"
#include "lldrawable.h"
#include "hippogridmanager.h"
extern LLPipeline gPipeline;
extern bool gShiftFrame;
@@ -371,6 +372,14 @@ void LLSurface::connectNeighbor(LLSurface* neighborp, U32 direction)
// - Non-power-of-2 regions should work here, but the rest of the viewer code will probably choke on them.
surface_patch_ref patchp, neighbor_patchp;
if (mNeighbors[direction] == neighborp)
{
return;
}
if (mNeighbors[direction])
{
mNeighbors[direction]->disconnectNeighbor(this, gDirOpposite[direction]);
}
mNeighbors[direction] = neighborp;
const S32 max_idx = mPatchesPerEdge - 1;
@@ -480,34 +489,28 @@ void LLSurface::connectNeighbor(LLSurface* neighborp, U32 direction)
}
}
void LLSurface::disconnectNeighbor(LLSurface *surfacep)
void LLSurface::disconnectNeighbor(LLSurface* surfacep, U32 direction)
{
S32 i;
for (i = 0; i < 8; i++)
if (surfacep && surfacep == mNeighbors[direction])
{
if (surfacep == mNeighbors[i])
mNeighbors[direction] = NULL;
for (auto& patchp : mPatchList)
{
mNeighbors[i] = NULL;
patchp->disconnectNeighbor(surfacep);
}
}
// Iterate through surface patches, removing any connectivity to removed surface.
for (auto& patchp : mPatchList)
{
patchp->disconnectNeighbor(surfacep);
}
}
void LLSurface::disconnectAllNeighbors()
{
S32 i;
for (i = 0; i < 8; i++)
for (size_t i = 0; i < mNeighbors.size(); ++i)
{
if (mNeighbors[i])
auto& neighbor = mNeighbors[i];
if (neighbor)
{
mNeighbors[i]->disconnectNeighbor(this);
mNeighbors[i] = NULL;
neighbor->disconnectNeighbor(this, gDirOpposite[i]);
neighbor = NULL;
}
}
}

View File

@@ -85,7 +85,7 @@ public:
void setOriginGlobal(const LLVector3d &origin_global);
void connectNeighbor(LLSurface *neighborp, U32 direction);
void disconnectNeighbor(LLSurface *neighborp);
void disconnectNeighbor(LLSurface *neighborp, U32 direction);
void disconnectAllNeighbors();
// <FS:CR> Aurora Sim
@@ -167,7 +167,7 @@ public:
// +---+---+---+
// |SW | S | SE|
// +---+---+---+
LLSurface *mNeighbors[8]; // Adjacent patches
std::array<LLSurface*, 8> mNeighbors; // Adjacent patches
U32 mType; // Useful for identifying derived classes

View File

@@ -872,7 +872,7 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mCacheReadCount(0U),
mCacheWriteCount(0U)
{
mCanUseNET = mUrl.empty() ;
mCanUseNET = mUrl.empty(); // Necessary for precached UUID textures, regardless of grid.
if (!mCanUseNET)
{
@@ -1236,9 +1236,10 @@ bool LLTextureFetchWorker::doWork(S32 param)
if (mState == LOAD_FROM_NETWORK)
{
static LLCachedControl<bool> use_http(gSavedSettings,"ImagePipelineUseHTTP");
bool is_sl = gHippoGridManager->getConnectedGrid()->isSecondLife();
// if (mHost != LLHost::invalid) use_http = false;
if (use_http && mCanUseHTTP && mUrl.empty()) // get http url.
if ((is_sl || use_http) && mCanUseHTTP && mUrl.empty()) // get http url.
{
LLViewerRegion* region = NULL;
if (mHost == LLHost::invalid)
@@ -1280,6 +1281,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
mWriteToCacheState = CAN_WRITE;
}
if (!mUrl.empty() && SGHostBlackList::isBlacklisted(mUrl)){
LL_DEBUGS("Texture") << mID << "Blacklisted" << LL_ENDL;
mCanUseHTTP = false;
}
if (mCanUseHTTP && !mUrl.empty())
@@ -1292,7 +1294,12 @@ bool LLTextureFetchWorker::doWork(S32 param)
}
// don't return, fall through to next state
}
else if (mSentRequest == UNSENT && mCanUseNET)
else if (!mCanUseNET)
{
LL_WARNS(LOG_TXT) << mID << "Unable to retrieve texture via HTTP and UDP unavailable (probable 404): " << mUrl << LL_ENDL;
return true;
}
else if (mSentRequest == UNSENT)
{
LL_DEBUGS("Texture") << mID << " moving to UDP fetch. mSentRequest=" << mSentRequest << " mCanUseNET = " << mCanUseNET << LL_ENDL;
setState(SEND_UDP_REQ);
@@ -1821,6 +1828,7 @@ bool LLTextureFetchWorker::doWork(S32 param)
S32 discard = mHaveAllData ? 0 : mLoadedDiscard;
U32 image_priority = LLWorkerThread::PRIORITY_NORMAL | mWorkPriority;
mDecoded = FALSE;
setPriority(LLWorkerThread::PRIORITY_LOW | mWorkPriority);
setState(DECODE_IMAGE_UPDATE);
LL_DEBUGS(LOG_TXT) << mID << ": Decoding. Bytes: " << mFormattedImage->getDataSize() << " Discard: " << discard
<< " All Data: " << mHaveAllData << LL_ENDL;

View File

@@ -244,18 +244,19 @@ void LLToolBar::updateCommunicateList()
bold_if_equal(LLFloaterMyFriends::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterMyFriends::getInstance()->getShortTitle(), LLSD("contacts"), ADD_TOP));
bold_if_equal(LLFloaterChat::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterChat::getInstance()->getShortTitle(), LLSD("local chat"), ADD_TOP));
mCommunicateBtn->addSeparator(ADD_TOP);
mCommunicateBtn->add(getString("Redock Windows"), LLSD("redock"), ADD_TOP);
static const auto redock = getString("Redock Windows");
mCommunicateBtn->add(redock, LLSD("redock"), ADD_TOP);
mCommunicateBtn->addSeparator(ADD_TOP);
bold_if_equal(LLFloaterMute::getInstance(), frontmost_floater, mCommunicateBtn->add(LLFloaterMute::getInstance()->getShortTitle(), LLSD("mute list"), ADD_TOP));
if (gIMMgr->getIMFloaterHandles().size() > 0) mCommunicateBtn->addSeparator(ADD_TOP);
for(std::set<LLHandle<LLFloater> >::const_iterator floater_handle_it = gIMMgr->getIMFloaterHandles().begin(); floater_handle_it != gIMMgr->getIMFloaterHandles().end(); ++floater_handle_it)
for(const auto& handle : gIMMgr->getIMFloaterHandles())
{
if (LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)floater_handle_it->get())
if (LLFloaterIMPanel* im_floaterp = (LLFloaterIMPanel*)handle.get())
{
const S32 count = im_floaterp->getNumUnreadMessages();
std::string floater_title;
if (count > 0) floater_title = "*";
if (count > 0) floater_title = '*';
floater_title.append(im_floaterp->getShortTitle());
static const LLCachedControl<bool> show_counts("ShowUnreadIMsCounts", true);
if (show_counts && count > 0)
@@ -265,11 +266,14 @@ void LLToolBar::updateCommunicateList()
{
LLStringUtil::format_map_t args;
args["COUNT"] = llformat("%d", count);
floater_title += getString("IMs", args);
static LLUIString ims = getString("IMs");
ims.setArgList(args);
floater_title += ims.getString();
}
else
{
floater_title += getString("IM");
static const auto im = getString("IM");
floater_title += im;
}
}
bold_if_equal(im_floaterp, frontmost_floater, mCommunicateBtn->add(floater_title, im_floaterp->getSessionID(), ADD_TOP));

View File

@@ -454,6 +454,7 @@ static bool handleRepartition(const LLSD&)
if (gPipeline.isInit())
{
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize");
gOctreeReserveCapacity = llmin(gSavedSettings.getU32("OctreeReserveNodeCapacity"),U32(512));
gObjectList.repartitionObjects();
}
@@ -692,6 +693,7 @@ void settings_setup_listeners()
gSavedSettings.getControl("OctreeStaticObjectSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeDistanceFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeMaxNodeCapacity")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeMinimumNodeSize")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeReserveNodeCapacity")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeAlphaDistanceFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));
gSavedSettings.getControl("OctreeAttachmentSizeFactor")->getSignal()->connect(boost::bind(&handleRepartition, _2));

View File

@@ -548,24 +548,29 @@ void start_chat( EKeystate s )
}
// start chat
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
}
void start_gesture( EKeystate s )
{
if (LLAppViewer::instance()->quitRequested())
{
return; // can't talk, gotta go, kthxbye!
}
LLUICtrl* focus_ctrlp = dynamic_cast<LLUICtrl*>(gFocusMgr.getKeyboardFocus());
if (KEYSTATE_UP == s &&
! (focus_ctrlp && focus_ctrlp->acceptsTextInput()))
{
if (gChatBar->getCurrentChat().empty())
if (gChatBar && gChatBar->getCurrentChat().empty())
{
// No existing chat in chat editor, insert '/'
gChatBar->startChat("/");
LLChatBar::startChat("/");
}
else
{
// Don't overwrite existing text in chat editor
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
}
}
}

View File

@@ -152,10 +152,6 @@ bool can_block(const LLUUID& id);
static const boost::regex NEWLINES("\\n{1}");
// NaCl End
extern AIHTTPTimeoutPolicy authHandler_timeout;
//
// Constants
//
@@ -1368,8 +1364,7 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id,
LLMute mute(blocked_id, full_name, mute_type);
if (LLMuteList::getInstance()->add(mute))
{
LLFloaterMute::showInstance();
LLFloaterMute::getInstance()->selectMute(blocked_id);
LLFloaterMute::showInstance()->selectMute(blocked_id);
}
// purge the message queue of any previously queued inventory offers from the same source.
@@ -3878,17 +3873,18 @@ void process_sound_trigger(LLMessageSystem* msg, void**)
msg->getUUIDFast(_PREHASH_SoundData, _PREHASH_ObjectID, object_id);
// NaCl - Antispam Registry
if (auto antispam = NACLAntiSpamRegistry::getIfExists())
if (NACLAntiSpamRegistry::instanceExists())
{
auto& antispam = NACLAntiSpamRegistry::instance();
static const LLCachedControl<U32> _NACL_AntiSpamSoundMulti("_NACL_AntiSpamSoundMulti");
if (owner_id.isNull())
{
bool is_collision_sound(const std::string & sound);
if (!is_collision_sound(sound_id.asString())
&& antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, object_id, LFIDBearer::OBJECT, _NACL_AntiSpamSoundMulti))
&& antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, object_id, LFIDBearer::OBJECT, _NACL_AntiSpamSoundMulti))
return;
}
else if (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, owner_id, LFIDBearer::AVATAR, _NACL_AntiSpamSoundMulti)) return;
else if (antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, owner_id, LFIDBearer::AVATAR, _NACL_AntiSpamSoundMulti)) return;
}
// NaCl End
@@ -3968,12 +3964,13 @@ void process_preload_sound(LLMessageSystem* msg, void** user_data)
msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id);
// NaCl - Antispam Registry
if (auto antispam = NACLAntiSpamRegistry::getIfExists())
if (NACLAntiSpamRegistry::instanceExists())
{
auto& antispam = NACLAntiSpamRegistry::instance();
static const LLCachedControl<U32> _NACL_AntiSpamSoundPreloadMulti("_NACL_AntiSpamSoundPreloadMulti");
if ((owner_id.isNull()
&& antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND_PRELOAD, object_id, LFIDBearer::OBJECT, _NACL_AntiSpamSoundPreloadMulti))
|| antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND_PRELOAD, owner_id, LFIDBearer::AVATAR, _NACL_AntiSpamSoundPreloadMulti))
&& antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND_PRELOAD, object_id, LFIDBearer::OBJECT, _NACL_AntiSpamSoundPreloadMulti))
|| antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND_PRELOAD, owner_id, LFIDBearer::AVATAR, _NACL_AntiSpamSoundPreloadMulti))
return;
}
// NaCl End
@@ -4013,11 +4010,12 @@ void process_attached_sound(LLMessageSystem* msg, void** user_data)
msg->getUUIDFast(_PREHASH_DataBlock, _PREHASH_OwnerID, owner_id);
// NaCl - Antispam Registry
if (auto antispam = NACLAntiSpamRegistry::getIfExists())
if (NACLAntiSpamRegistry::instanceExists())
{
auto& antispam = NACLAntiSpamRegistry::instance();
if ((owner_id.isNull()
&& antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, object_id, LFIDBearer::OBJECT))
|| antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, owner_id))
&& antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, object_id, LFIDBearer::OBJECT))
|| antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SOUND, owner_id))
return;
}
// NaCl End
@@ -5776,9 +5774,11 @@ void process_economy_data(LLMessageSystem* msg, void** /*user_data*/)
void notify_cautioned_script_question(const LLSD& notification, const LLSD& response, S32 orig_questions, BOOL granted)
{
// NaCl - Antispam Registry
if (auto antispam = NACLAntiSpamRegistry::getIfExists())
if (antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, notification["payload"]["task_id"].asUUID(), LFIDBearer::OBJECT))
if (NACLAntiSpamRegistry::instanceExists())
{
if (NACLAntiSpamRegistry::instance().checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, notification["payload"]["task_id"].asUUID(), LFIDBearer::OBJECT))
return;
}
// NaCl End
// only continue if at least some permissions were requested
if (orig_questions)
@@ -6053,11 +6053,12 @@ void process_script_question(LLMessageSystem* msg, void** user_data)
msg->getUUIDFast(_PREHASH_Data, _PREHASH_ItemID, itemid);
// NaCl - Antispam Registry
if (auto antispam = NACLAntiSpamRegistry::getIfExists())
if (NACLAntiSpamRegistry::instanceExists())
{
auto& antispam = NACLAntiSpamRegistry::instance();
if ((taskid.isNull()
&& antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, itemid, LFIDBearer::NONE))
|| antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, taskid, LFIDBearer::OBJECT))
&& antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, itemid, LFIDBearer::NONE))
|| antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, taskid, LFIDBearer::OBJECT))
return;
}
// NaCl End
@@ -7020,7 +7021,8 @@ void process_script_dialog(LLMessageSystem* msg, void**)
LLSD args;
args["TITLE"] = object_name;
args["MESSAGE"] = message;
args["MESSAGE"] = LLStringUtil::null;
args["SCRIPT_MESSAGE"] = message;
args["CHANNEL"] = chat_channel;
LLNotificationPtr notification;
char const* name = (is_group && !is_text_box) ? "GROUPNAME" : "NAME";
@@ -7104,6 +7106,12 @@ void callback_load_url_name(const LLUUID& id, const std::string& full_name, bool
}
}
// We've got the name of the person who owns the object hurling the url.
void callback_load_url_avatar_name(const LLUUID& id, const LLAvatarName& av_name)
{
callback_load_url_name(id, av_name.getUserName(), false);
}
void process_load_url(LLMessageSystem* msg, void**)
{
LLUUID object_id;
@@ -7124,11 +7132,12 @@ void process_load_url(LLMessageSystem* msg, void**)
msg->getBOOL("Data", "OwnerIsGroup", owner_is_group);
// NaCl - Antispam Registry
if (auto antispam = NACLAntiSpamRegistry::getIfExists())
if (NACLAntiSpamRegistry::instanceExists())
{
auto& antispam = NACLAntiSpamRegistry::instance();
if ((owner_id.isNull()
&& antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, object_id, LFIDBearer::OBJECT))
|| antispam->checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, owner_id, owner_is_group ? LFIDBearer::GROUP : LFIDBearer::AVATAR))
&& antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, object_id, LFIDBearer::OBJECT))
|| antispam.checkQueue(NACLAntiSpamRegistry::QUEUE_SCRIPT_DIALOG, owner_id, owner_is_group ? LFIDBearer::GROUP : LFIDBearer::AVATAR))
return;
}
// NaCl End
@@ -7157,8 +7166,14 @@ void process_load_url(LLMessageSystem* msg, void**)
// Add to list of pending name lookups
gLoadUrlList.push_back(payload);
gCacheName->get(owner_id, owner_is_group,
boost::bind(&callback_load_url_name, _1, _2, _3));
if (owner_is_group)
{
gCacheName->getGroup(owner_id, boost::bind(&callback_load_url_name, _1, _2, _3));
}
else
{
LLAvatarNameCache::get(owner_id, boost::bind(&callback_load_url_avatar_name, _1, _2));
}
}
@@ -7308,21 +7323,15 @@ void onCovenantLoadComplete(LLVFS* vfs,
S32 file_length = file.getSize();
char* buffer = new char[file_length+1];
if (buffer == NULL)
{
LL_ERRS("Messaging") << "Memory Allocation failed" << LL_ENDL;
return;
}
file.read((U8*)buffer, file_length); /* Flawfinder: ignore */
std::vector<char> buffer(file_length + 1);
file.read((U8*)&buffer[0], file_length);
// put a EOS at the end
buffer[file_length] = 0;
if( (file_length > 19) && !strncmp( buffer, "Linden text version", 19 ) )
buffer[file_length] = '\0';
if ((file_length > 19) && !strncmp(&buffer[0], "Linden text version", 19))
{
LLViewerTextEditor * editor = new LLViewerTextEditor(std::string("temp"), LLRect(0,0,0,0), file_length+1);
if( !editor->importBuffer( buffer, file_length+1 ) )
if( !editor->importBuffer( &buffer[0], file_length+1 ) )
{
LL_WARNS("Messaging") << "Problem importing estate covenant." << LL_ENDL;
covenant_text = "Problem importing estate covenant.";
@@ -7339,7 +7348,6 @@ void onCovenantLoadComplete(LLVFS* vfs,
LL_WARNS("Messaging") << "Problem importing estate covenant: Covenant file format error." << LL_ENDL;
covenant_text = "Problem importing estate covenant: Covenant file format error.";
}
delete[] buffer;
}
else
{

View File

@@ -272,11 +272,10 @@ void LLViewerOctreeEntry::removeData(LLViewerOctreeEntryData* data)
mData[data->getDataType()] = NULL;
if(mGroup != NULL && !mData[LLDRAWABLE])
if(!mGroup.isNull() && !mData[LLDRAWABLE])
{
LLViewerOctreeGroup* group = mGroup;
mGroup->removeFromGroup(data);
mGroup = NULL;
group->removeFromGroup(data);
llassert(mBinIndex == -1);
}
@@ -390,7 +389,7 @@ void LLViewerOctreeEntryData::shift(const LLVector4a &shift_vector)
LLViewerOctreeGroup* LLViewerOctreeEntryData::getGroup()const
{
return mEntry.notNull() ? mEntry->mGroup : NULL;
return mEntry.notNull() ? mEntry->mGroup : LLPointer<LLViewerOctreeGroup>();
}
const LLVector4a& LLViewerOctreeEntryData::getPositionGroup() const
@@ -847,10 +846,12 @@ public:
};
LLOcclusionCullingGroup::LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctreePartition* part) :
LLOcclusionCullingGroup::LLOcclusionCullingGroup(OctreeNode* node, LLSpatialPartition* part) :
LLViewerOctreeGroup(node),
mSpatialPartition(part)
{
llassert(part);
mSpatialPartition->mGroups.push_back(this);
part->mLODSeed = (part->mLODSeed+1)%part->mLODPeriod;
mLODHash = part->mLODSeed;
@@ -868,12 +869,21 @@ LLOcclusionCullingGroup::LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctre
LLOcclusionCullingGroup::~LLOcclusionCullingGroup()
{
if (mSpatialPartition)
{
auto it = std::find_if(mSpatialPartition->mGroups.begin(), mSpatialPartition->mGroups.end(), [this](LLOcclusionCullingGroup* rhs) {return rhs == this; });
llassert(it != mSpatialPartition->mGroups.end());
if (it != mSpatialPartition->mGroups.end())
{
mSpatialPartition->mGroups.erase(it);
}
}
releaseOcclusionQueryObjectNames();
}
BOOL LLOcclusionCullingGroup::needsUpdate()
{
return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE;
return mSpatialPartition && (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? TRUE : FALSE;
}
BOOL LLOcclusionCullingGroup::isRecentlyVisible() const
@@ -1033,7 +1043,7 @@ BOOL LLOcclusionCullingGroup::earlyFail(LLCamera* camera, const LLVector4a* boun
LLVector4a fudge(vel*2.f);
const LLVector4a& c = bounds[0];
static LLVector4a r;
LLVector4a r;
r.setAdd(bounds[1], fudge);
/*if (r.magVecSquared() > 1024.0*1024.0)
@@ -1071,6 +1081,10 @@ U32 LLOcclusionCullingGroup::getLastOcclusionIssuedTime()
void LLOcclusionCullingGroup::checkOcclusion()
{
if (mSpatialPartition == nullptr)
{
return;
}
if (LLPipeline::sUseOcclusion > 1)
{
LL_RECORD_BLOCK_TIME(FTM_OCCLUSION_READBACK);
@@ -1171,6 +1185,10 @@ static LLTrace::BlockTimerStatHandle FTM_OCCLUSION_DRAW("Draw");
void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* shift)
{
if (mSpatialPartition == nullptr)
{
return;
}
LLGLDisable<GL_STENCIL_TEST> stencil;
if (mSpatialPartition->isOcclusionEnabled() && LLPipeline::sUseOcclusion > 1)
{
@@ -1242,6 +1260,11 @@ void LLOcclusionCullingGroup::doOcclusion(LLCamera* camera, const LLVector4a* sh
//static LLVector4a fudge(SG_OCCLUSION_FUDGE);
static LLCachedControl<F32> vel("SHOcclusionFudge",SG_OCCLUSION_FUDGE);
LLVector4a fudge(SG_OCCLUSION_FUDGE);
if (LLDrawPool::POOL_WATER == mSpatialPartition->mDrawableType)
{
fudge.getF32ptr()[2] = 1.f;
}
static LLVector4a fudged_bounds;
fudged_bounds.setAdd(fudge, bounds[1]);
shader->uniform3fv(LLShaderMgr::BOX_SIZE, 1, fudged_bounds.getF32ptr());
@@ -1315,6 +1338,11 @@ LLViewerOctreePartition::LLViewerOctreePartition() :
LLViewerOctreePartition::~LLViewerOctreePartition()
{
llassert(mGroups.empty());
for (auto& entry : mGroups)
{
entry->mSpatialPartition = nullptr;
}
delete mOctree;
mOctree = NULL;
}

View File

@@ -44,6 +44,7 @@ class LLViewerOctreeEntryData;
class LLViewerOctreeGroup;
class LLViewerOctreeEntry;
class LLViewerOctreePartition;
class LLSpatialPartition;
typedef LLOctreeListener<LLViewerOctreeEntry> OctreeListener;
typedef LLTreeNode<LLViewerOctreeEntry> TreeNode;
@@ -109,7 +110,7 @@ private:
private:
LLViewerOctreeEntryData* mData[NUM_DATA_TYPE]; //do not use LLPointer here.
LLViewerOctreeGroup* mGroup;
LLPointer<LLViewerOctreeGroup> mGroup;
//aligned members
LL_ALIGN_16(LLVector4a mExtents[2]);
@@ -229,6 +230,7 @@ public:
void handleChildRemoval(const OctreeNode* parent, const OctreeNode* child) final override;
OctreeNode* getOctreeNode() {return mOctreeNode;}
const OctreeNode* getOctreeNode() const { return mOctreeNode; }
LLViewerOctreeGroup* getParent();
const LLVector4a* getBounds() const {return mBounds;}
@@ -287,7 +289,7 @@ protected:
virtual ~LLOcclusionCullingGroup();
public:
LLOcclusionCullingGroup(OctreeNode* node, LLViewerOctreePartition* part);
LLOcclusionCullingGroup(OctreeNode* node, LLSpatialPartition* part);
LLOcclusionCullingGroup(const LLOcclusionCullingGroup& rhs) : LLViewerOctreeGroup(rhs)
{
*this = rhs;
@@ -329,7 +331,8 @@ protected:
S32 mLODHash;
LLViewerOctreePartition* mSpatialPartition;
friend class LLViewerOctreePartition;
LLSpatialPartition* mSpatialPartition;
U32 mOcclusionQuery[LLViewerCamera::NUM_CAMERAS];
public:
@@ -354,6 +357,7 @@ public:
BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed
U32 mLODSeed;
U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed)
std::vector<LLOcclusionCullingGroup*> mGroups;
};
class LLViewerOctreeCull : public OctreeTraveler

View File

@@ -107,6 +107,19 @@ typedef std::map<std::string, std::string> CapabilityMap;
static void log_capabilities(const CapabilityMap &capmap);
namespace
{
void newRegionEntry(LLViewerRegion& region)
{
LL_INFOS("LLViewerRegion") << "Entering region [" << region.getName() << "]" << LL_ENDL;
gDebugInfo["CurrentRegion"] = region.getName();
LLAppViewer::instance()->writeDebugInfo();
}
} // anonymous namespace
class LLViewerRegionImpl {
public:
LLViewerRegionImpl(LLViewerRegion * region, LLHost const & host)
@@ -117,6 +130,7 @@ public:
mSeedCapMaxAttemptsBeforeLogin(MAX_SEED_CAP_ATTEMPTS_BEFORE_LOGIN),
mSeedCapAttempts(0),
mHttpResponderID(0),
mLandp(NULL),
// I'd prefer to set the LLCapabilityListener name to match the region
// name -- it's disappointing that's not available at construction time.
// We could instead store an LLCapabilityListener*, making
@@ -2090,6 +2104,9 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
LL_DEBUGS("CrossingCaps") << "Received duplicate seed capability, posting to seed " <<
url << LL_ENDL;
// record that we just entered a new region
newRegionEntry(*this);
//Instead of just returning we build up a second set of seed caps and compare them
//to the "original" seed cap received and determine why there is problem!
LLSD capabilityNames = LLSD::emptyArray();
@@ -2104,6 +2121,8 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
mImpl->mCapabilities.clear();
setCapability("Seed", url);
// record that we just entered a new region
newRegionEntry(*this);
LLSD capabilityNames = LLSD::emptyArray();
mImpl->buildCapabilityNames(capabilityNames);

View File

@@ -2946,7 +2946,7 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
{
{
// passing NULL here, character will be added later when it is handled by character handler.
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
return TRUE;
}
}
@@ -3548,7 +3548,7 @@ void LLViewerWindow::updateLayout()
&& gFocusMgr.getKeyboardFocus() == NULL
&& gChatBar->isInVisibleChain())
{
gChatBar->startChat(NULL);
LLChatBar::startChat(NULL);
}
}

View File

@@ -172,6 +172,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
{
LL_INFOS() << "Add region with handle: " << region_handle << " on host " << host << LL_ENDL;
LLViewerRegion *regionp = getRegionFromHandle(region_handle);
std::string seedUrl;
if (regionp)
{
LLHost old_host = regionp->getHost();
@@ -191,9 +192,12 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
}
if (!regionp->isAlive())
{
LL_WARNS() << "LLWorld::addRegion exists, but isn't alive" << LL_ENDL;
LL_WARNS() << "LLWorld::addRegion exists, but isn't alive. Removing old region and creating new" << LL_ENDL;
}
// Save capabilities seed URL
seedUrl = regionp->getCapability("Seed");
// Kill the old host, and then we can continue on and add the new host. We have to kill even if the host
// matches, because all the agent state for the new camera is completely different.
removeRegion(old_host);
@@ -229,6 +233,11 @@ LLViewerRegion* LLWorld::addRegion(const U64 &region_handle, const LLHost &host)
LL_ERRS() << "Unable to create new region!" << LL_ENDL;
}
if ( !seedUrl.empty() )
{
regionp->setCapability("Seed", seedUrl);
}
//Classic clouds
#if ENABLE_CLASSIC_CLOUDS
regionp->mCloudLayer.create(regionp);
@@ -1447,6 +1456,8 @@ public:
<< sim << LL_ENDL;
return;
}
LL_DEBUGS("CrossingCaps") << "Calling setSeedCapability from LLEstablishAgentCommunication::post. Seed cap == "
<< input["body"]["seed-capability"] << LL_ENDL;
regionp->setSeedCapability(input["body"]["seed-capability"]);
}
};

View File

@@ -958,6 +958,7 @@ void LLPipeline::refreshCachedSettings()
LLVOAvatar::sMaxVisible = (U32)gSavedSettings.getS32("RenderAvatarMaxVisible");
//LLPipeline::sDelayVBUpdate = gSavedSettings.getBOOL("RenderDelayVBUpdate");
gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");
gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize");
gOctreeReserveCapacity = llmin(gSavedSettings.getU32("OctreeReserveNodeCapacity"), U32(512));
LLPipeline::sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD");
LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
@@ -1152,7 +1153,7 @@ void LLPipeline::createGLBuffers()
{
if (!mNoiseMap)
{
LLVector3 noise[NOISE_MAP_RES*NOISE_MAP_RES];
std::array<LLVector3, NOISE_MAP_RES * NOISE_MAP_RES> noise;
F32 scaler = gSavedSettings.getF32("RenderDeferredNoise")/100.f;
for (auto& val : noise)
@@ -1165,7 +1166,7 @@ void LLPipeline::createGLBuffers()
mNoiseMap = LLImageGL::createTextureName();
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap->getTexName());
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, NOISE_MAP_RES, NOISE_MAP_RES, GL_RGB, GL_FLOAT, noise);
LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, NOISE_MAP_RES, NOISE_MAP_RES, GL_RGB, GL_FLOAT, noise.data());
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);
}
@@ -3458,8 +3459,9 @@ void forAllDrawables(LLCullResult::sg_iterator begin,
{
for (LLCullResult::sg_iterator i = begin; i != end; ++i)
{
OctreeGuard guard((*i)->getOctreeNode());
for (LLSpatialGroup::element_iter j = (*i)->getDataBegin(); j != (*i)->getDataEnd(); ++j)
LLSpatialGroup* group = (*i).get();
OctreeGuard guard(group->getOctreeNode());
for (LLSpatialGroup::element_iter j = group->getDataBegin(); j != group->getDataEnd(); ++j)
{
func((LLDrawable*)(*j)->getDrawable());
}

View File

@@ -103,6 +103,7 @@
<NotifyCautionBoxColor value="254, 209, 118, 255" /> <!-- the background color of caution permissions prompts -->
<NotifyCautionWarnColor value="0, 0, 0, 255" /> <!-- the foreground color of the special title text in caution permissions prompts -->
<GroupNotifyBoxColor value="66, 66, 66, 255" />
<GroupNotifyHeaderBGColor value="0, 0, 0, 0" />
<GroupNotifyTextColor value="255, 255, 255, 128" />
<!-- CHAT AND IM HISTORY TEXTBOX COLORS -->

View File

@@ -99,6 +99,7 @@
<NotifyCautionBoxColor value="254, 209, 118, 255"/> <!-- the background color of caution permissions prompts -->
<NotifyCautionWarnColor value="0, 0, 0, 255"/> <!-- the foreground color of the special title text in caution permissions prompts -->
<GroupNotifyBoxColor value="66, 66, 66, 255"/>
<GroupNotifyHeaderBGColor value="0, 0, 0, 0" />
<GroupNotifyTextColor value="200, 200, 200, 255"/>
<!-- CHAT AND IM HISTORY TEXTBOX COLORS -->

View File

@@ -100,6 +100,7 @@
<NotifyCautionBoxColor value="254, 209, 118, 255" /> <!-- the background color of caution permissions prompts -->
<NotifyCautionWarnColor value="0, 0, 0, 255" /> <!-- the foreground color of the special title text in caution permissions prompts -->
<GroupNotifyBoxColor value="189, 0, 0, 240" />
<GroupNotifyHeaderBGColor value="0, 0, 0, 0" />
<GroupNotifyTextColor value="1, 0, 0, 255" />
<!-- CHAT AND IM HISTORY TEXTBOX COLORS -->

View File

@@ -103,6 +103,7 @@
<NotifyCautionBoxColor value="254, 209, 118, 255" /> <!-- the background color of caution permissions prompts -->
<NotifyCautionWarnColor value="0, 0, 0, 255" /> <!-- the foreground color of the special title text in caution permissions prompts -->
<GroupNotifyBoxColor value="70, 170, 255, 255" />
<GroupNotifyHeaderBGColor value="255, 255, 255, 184" />
<GroupNotifyTextColor value="0, 30, 60, 255" />
<!-- CHAT AND IM HISTORY TEXTBOX COLORS -->

View File

@@ -2156,7 +2156,7 @@ Offer a teleport?<tag>Best&#xE4;tigen</tag><form name="form">
<button name="GoNow..." text="Jetzt gehen..."/>
</form></notification>
<notification name="OfferFriendship">[NAME] bietet Ihnen die Freundschaft an.
<notification name="OfferFriendship">[NAME_SLURL] bietet Ihnen die Freundschaft an.
[MESSAGE]
@@ -2169,7 +2169,7 @@ Offer a teleport?<tag>Best&#xE4;tigen</tag><form name="form">
<notification name="FriendshipOffered">Sie haben [TO_NAME] die Freundschaft angeboten.</notification>
<notification name="OfferFriendshipNoMessage">[NAME] bietet Ihnen die Freundschaft an.
<notification name="OfferFriendshipNoMessage">[NAME_SLURL] bietet Ihnen die Freundschaft an.
(Sie werden dadurch den gegenseitigen Online-Status sehen k&#xF6;nnen.)<form name="form">
<button name="Accept" text="Akzeptieren"/>
@@ -2178,9 +2178,9 @@ Offer a teleport?<tag>Best&#xE4;tigen</tag><form name="form">
<button name="Profile" text="Profil"/>
</form></notification>
<notification name="FriendshipAccepted">[NAME] hat Ihr Freundschaftsangebot akzeptiert.</notification>
<notification name="FriendshipAccepted">[NAME_SLURL] hat Ihr Freundschaftsangebot akzeptiert.</notification>
<notification name="FriendshipDeclined">[NAME] hat Ihr Freundschaftsangebot abgelehnt.</notification>
<notification name="FriendshipDeclined">[NAME_SLURL] hat Ihr Freundschaftsangebot abgelehnt.</notification>
<notification name="FriendshipDissolved">[NAME] hat Ihr Freundschaftsangebot abgelehnt.</notification>

View File

@@ -64,7 +64,6 @@
height="530"
left="0"
name="xp_scroll"
opaque="true"
bottom="0"
width="348">
<panel
@@ -76,6 +75,7 @@
width="315"
min_width="315">
<layout_stack
name="Experience_profile"
follows="all"
height="550"
left="0"
@@ -152,7 +152,7 @@
bottom="-50"
value=""
width="305"
max_length="2048"/>
max_length="2048"/>
</layout_panel>
<layout_panel
follows=""
@@ -257,6 +257,7 @@
</text_editor>
</layout_panel>
<layout_panel
name ="owner panel"
follows="left|top|right"
height="18"
left="0"

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
min_height="300" min_width="400" name="inspect"
min_height="300" min_width="480" name="inspect"
rect_control="FloaterInspectRect" title="Inspect Objects">
<scroll_list bottom="30" can_resize="false" column_padding="0" draw_heading="true"
follows="top|right|left|bottom" left="10" multi_select="false"
@@ -22,12 +22,19 @@
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
label="See Owner Profile..." label_selected="" left="10"
mouse_opaque="true" name="button owner"
tool_tip="See profile of the highlighted object&apos;s owner" width="150" >
tool_tip="See profile of the highlighted object&apos;s owner" width="152" >
<button.commit_callback
function="Inspect.OwnerProfile" />
</button>
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
label="See Creator Profile..." label_selected="" left="170"
label="See Last Owner Profile..." label_selected="" left_delta="154"
mouse_opaque="true" name="button last owner"
tool_tip="See profile of the highlighted object&apos;s last owner" width="152" >
<button.commit_callback
function="Inspect.LastOwnerProfile" />
</button>
<button bottom="5" follows="left|bottom" font="SansSerif" halign="center" height="20"
label="See Creator Profile..." label_selected="" left_delta="154"
mouse_opaque="true" name="button creator"
tool_tip="See profile of the highlighted object&apos;s original creator"
width="150" >

View File

@@ -54,4 +54,4 @@
<on_click function="List.CopySLURL"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
</menu>
</context_menu>

View File

@@ -7862,7 +7862,7 @@ Offer a teleport?
icon="notify.tga"
name="FriendshipAccepted"
log_to_im="true"
type="notify">
type="notifytip">
<tag>friendship</tag>
[NAME] accepted your friendship offer.
</notification>
@@ -7872,7 +7872,7 @@ Offer a teleport?
name="FriendshipDeclined"
log_to_im="true"
persist="true"
type="notify">
type="notifytip">
<tag>friendship</tag>
[NAME] declined your friendship offer.
</notification>
@@ -9950,7 +9950,7 @@ You cannot copy your selection because the object '[OBJ_NAME]' is not transferra
name="NoPermsNoRemoval"
type="notify">
<tag>fail</tag>
Removal of the object '[OBJ_NAME]' from the simulator is disallowed by the permissions system.
Removal of the object '[OBJ_NAME]' from the region is disallowed by the permissions system.
</notification>
<notification
@@ -10221,7 +10221,7 @@ Unable to add script!
name="AssetServerTimeoutObjReturn"
type="notify">
<tag>fail</tag>
Asset server didn't respond in a timely fashion. Object returned to sim.
Asset server didn't respond in a timely fashion. Object returned to region.
</notification>
<notification
@@ -11694,7 +11694,7 @@ Media/audio URL blocked for [DOMAIN]
name="RadarChatKeysRequest"
type="alertmodal">
An object owned by you has requested keys from your radar.
Would you like to enable announcing keys to objects in the sim?
Would you like to enable announcing keys to objects in the region?
<usetemplate
name="yesnocancelbuttons"
yestext="Yes"

View File

@@ -14,6 +14,7 @@
name="loading"
value="loading..."/>
<layout_stack
name="experience_panel"
top="0"
left="4"
right="-1"
@@ -21,6 +22,7 @@
orientation="vertical"
follows="all">
<layout_panel
name="event_panel"
bottom="0"
left="1"
right="-1"

View File

@@ -5,6 +5,7 @@
left="0"
width="350"
height="330"
name="panel_experiences_search"
label="Search"
follows="all">
@@ -44,6 +45,7 @@
height="330"
name="search_panel">
<text
name="search_text"
left="0"
follows="top|left|right"
right="-1">
@@ -63,6 +65,7 @@
height="18"
name="find"/>
<text
name="content_text"
bottom_delta="-18"
left="0"
follows="top|left"

View File

@@ -80,8 +80,8 @@
<button bottom_delta="0" left="146" height="16" width="16" follows="left|bottom" image_overlay="inv_folder_trash.tga" scale_image="true" label="" tool_tip="Delete the currently selected remembered login info, if any." name="remove_login"/>
<check_box bottom_delta="0" left="173" control_name="RememberPassword" follows="left|bottom" height="16" label="Save password" name="remember_check" width="158"/>
<text name="fmod_text" value="Powered By" bottom="42" height="16" left="-425" width="84" follows="right|bottom" font="SansSerif" font_style="BOLD" font_size="Large"/>
<icon name="fmod_logo" bottom_delta="-32" height="40" left_delta="84" width="152" follows="right|bottom" image_name="FMOD_Logo"/>
<icon name="fmod_logo" bottom="10" height="40" left="-341" width="152" follows="right|bottom" image_name="FMOD_Logo"/>
<text name="fmod_text" value="Powered By" bottom_delta="40" height="16" left_delta="36" width="84" follows="right|bottom" font="SansSerif" font_style="BOLD" font_size="Large"/>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="45" drop_shadow_visible="true" follows="right|bottom"

View File

@@ -115,8 +115,9 @@
<spinner bottom_delta="0" decimal_digits="0" follows="top" height="16" increment="1" left_delta="210" max_val="9999" min_val="1" name="ScriptJumpCount" width="50" control_name="Ascentnumscriptdiff" tool_tip="Threshold for the script jump message [Default: 100]"/>
<check_box bottom_delta="-20" left="10" follows="top" label="Restrained Love API Support (RLVa)" name="RestrainedLove" control_name="RestrainedLove" tool_tip="Allows scripts to take greater control of the viewer, if you wear compliant objects."/>
<check_box bottom_delta="-20" follows="top" label="Replace slurls and formatted links with labels" name="SinguReplaceLinks" control_name="SinguReplaceLinks" tool_tip="While you can right click to see where they really lead by copying them, this does allow links to be misleading at first glance."/>
<text name="EmergencyTeleportDesc" left="14" bottom_delta="-12" follows="top">Drop a landmark below to autoteleport there in the last 20 seconds before region restarts</text>
<drop_target control_name="EmergencyTeleportLandmark" bottom_delta="-8" left="15" height="17" name="emergency_teleport_landmark_drop" width="430"/>
<text name="EmergencyTeleportDesc" left="14" bottom_delta="-12" follows="top">Drop a landmark below to autoteleport to before region restarts</text>
<spinner name="EmergencyTeleportSeconds" label="Seconds before restart to begin teleport attempts" label_width="380" width="432" control_name="EmergencyTeleportSeconds" bottom_delta="-26" decimal_digits="0" max_val="3600" min_val="0" follows="left|top" height="18" increment="1"/>
<drop_target control_name="EmergencyTeleportLandmark" bottom_delta="-4" left="15" height="17" name="emergency_teleport_landmark_drop" width="430"/>
<text name="EmergencyTeleportBackupDesc" halign="center" width="432" left="14" bottom_delta="-26" follows="top">Drop a backup landmark to autoteleport to below, should you already be at above</text>
<drop_target control_name="EmergencyTeleportLandmarkBackup" bottom_delta="-8" left="15" height="17" name="emergency_teleport_landmark_backup_drop" width="430"/>
</panel>

View File

@@ -4,7 +4,7 @@
<panel border="true" left="1" bottom="-190" height="180" width="500" label="Main" name="General">
<check_box bottom_delta="-25" control_name="AscentStoreSettingsPerAccount" follows="top" height="16" initial_value="true" label="Where applicable, save Vanity settings per-account." left="10" tool_tip="Saves settings per-account, allowing easier customization for alts." name="use_account_settings_check"/>
<check_box bottom_delta="-20" control_name="AscentDisableTeleportScreens" follows="top" height="16" initial_value="true" label="Hide the Teleport progress screens" tool_tip="If checked, the viewer will hide the teleport progress screen, allowing you to continue to read IMs." name="disable_tp_screen_check"/>
<check_box bottom_delta="-20" control_name="OptionPlayTpSound" follows="top" height="16" initial_value="true" label="Play the Teleport sound when moving between sims" tool_tip="Viewer will play the wooshing TP noise on teleport." name="tp_sound_check"/>
<check_box bottom_delta="-20" control_name="OptionPlayTpSound" follows="top" height="16" initial_value="true" label="Play the Teleport sound when teleporting between regions" tool_tip="Viewer will play the wooshing TP noise on teleport." name="tp_sound_check"/>
<check_box bottom_delta="-20" control_name="AscentDisableLogoutScreens" follows="top" height="16" initial_value="true" label="Hide the Login/Logout progress screens" tool_tip="If checked, the viewer will hide the login/logout progress screen." name="disable_logout_screen_check"/>
<check_box bottom_delta="-20" control_name="SGDisableChatAnimation" follows="top" height="16" initial_value="false" label="Disable chat, whisper and shout animations" tool_tip="Remove chat animations from your own avatar. Effect visible to everyone" name="disable_chat_animation"/>
<check_box bottom_delta="-20" control_name="LiruAddNotReplace" follows="top" height="16" label="Add attachments and wearables instead of replacing them" tool_tip="When double clicking or pressing enter in inventory with wearables or objects selected they will be added to your outfit, instead of replacing the wearable or object currently at their target destination." name="add_not_replace"/>

View File

@@ -3252,7 +3252,7 @@ Where tag = tag string to match. Removes bot's matching the tag.
<string name="has_left">has left</string>
<string name="has_left_flood">is now off the radar for</string>
<!-- [RANGE] -->
<string name="the_sim">the sim</string>
<string name="the_sim">the region</string>
<string name="draw_distance">draw distance</string>
<string name="shout_range">shout range</string>
<string name="chat_range">chat range</string>
@@ -3609,6 +3609,7 @@ If you continue to receive this message, please contact Second Life support for
<string name="Debits">Debits</string>
<string name="Total">Total</string>
<string name="NoGroupDataFound">No group data found for group </string>
<string name="AlreadyInGroup">You are already in this group </string>
<!-- floater IM bonus_info: When a Linden with Admin/god status receives a new IM this displays the estate (Mainland vs. teen grid) of the source avatar.
This is to help Lindens when answering questions. -->

View File

@@ -1,13 +1,11 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="active_speakers" title="Participantes Activos">
<layout_stack name="active_speakers_stack">
<layout_panel name="panel_voice_effect"/>
<layout_panel name="active_speakers_panel">
<name_list name="speakers_list">
<column label="Nombre" name="speaker_name"/>
<column label="" name="speaking_status"/>
</name_list>
<slider name="speaker_volume"/>
<button name="mute_btn" tool_tip="Ignorar la voz de este residente"/>
</layout_panel>
</layout_stack>

Some files were not shown because too many files have changed in this diff Show More