summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-05-18 14:08:24 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-05-18 14:08:24 -0400
commitc0aa1a1202678fdde0206c9372fb071c028cfe5b (patch)
tree614a5e0b9e24343c59709a9378050b601dd0f828 /indra/newview
parent06aa68c2fbcd83cb00465c9f14933bda276b11e8 (diff)
parenta9363222618a879dd7d0d78471f8773af6b61618 (diff)
SL-17219: Merge 'DRTVWR-546' of lindenlab/viewer into SL-17219
Update task branch from main project branch.
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt8
-rw-r--r--indra/newview/app_settings/cmd_line.xml8
-rw-r--r--indra/newview/app_settings/key_bindings.xml88
-rw-r--r--indra/newview/app_settings/settings.xml43
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl34
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/previewV.glsl29
-rw-r--r--indra/newview/app_settings/shaders/class1/objects/shinyV.glsl3
-rw-r--r--indra/newview/llagent.cpp10
-rw-r--r--indra/newview/llappviewer.cpp66
-rw-r--r--indra/newview/llappviewer.h17
-rw-r--r--indra/newview/llappviewerwin32.h4
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp2
-rw-r--r--indra/newview/llcallingcard.cpp4
-rw-r--r--indra/newview/llconversationview.cpp19
-rw-r--r--indra/newview/lldrawpool.cpp4
-rw-r--r--indra/newview/lldrawpoolalpha.cpp49
-rw-r--r--indra/newview/lldrawpoolbump.cpp4
-rw-r--r--indra/newview/lldrawpoolmaterials.cpp2
-rw-r--r--indra/newview/lldrawpoolwater.cpp14
-rw-r--r--indra/newview/llenvironment.cpp22
-rw-r--r--indra/newview/llenvironment.h2
-rw-r--r--indra/newview/llface.cpp36
-rw-r--r--indra/newview/llfloatercamera.cpp4
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp1
-rw-r--r--indra/newview/llfloatergesture.cpp3
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp2
-rw-r--r--indra/newview/llfloaterpreference.cpp11
-rw-r--r--indra/newview/llfloatersearch.cpp9
-rw-r--r--indra/newview/llfloaterworldmap.cpp120
-rw-r--r--indra/newview/llfloaterworldmap.h28
-rw-r--r--indra/newview/llgesturemgr.cpp79
-rw-r--r--indra/newview/llgroupactions.cpp2
-rw-r--r--indra/newview/llinventorymodel.cpp192
-rw-r--r--indra/newview/llinventorymodel.h11
-rw-r--r--indra/newview/llkeyconflict.cpp78
-rw-r--r--indra/newview/llkeyconflict.h12
-rw-r--r--indra/newview/lllogininstance.cpp79
-rw-r--r--indra/newview/llmediactrl.cpp5
-rw-r--r--indra/newview/llmodelpreview.cpp37
-rw-r--r--indra/newview/llmodelpreview.h4
-rw-r--r--indra/newview/llpanelgroupcreate.cpp2
-rw-r--r--indra/newview/llpanelpeople.cpp4
-rw-r--r--indra/newview/llpathfindingmanager.cpp2
-rw-r--r--indra/newview/llpreviewgesture.cpp1
-rw-r--r--indra/newview/llsearchableui.cpp7
-rw-r--r--indra/newview/llsecapi.h3
-rw-r--r--indra/newview/llsechandler_basic.cpp5
-rw-r--r--indra/newview/llsechandler_basic.h3
-rw-r--r--indra/newview/llspatialpartition.cpp1
-rw-r--r--indra/newview/llstartup.cpp107
-rw-r--r--indra/newview/lltoolcomp.cpp10
-rw-r--r--indra/newview/lltoolgrab.cpp26
-rw-r--r--indra/newview/lltoolpie.cpp13
-rw-r--r--indra/newview/llviewerassetstorage.cpp7
-rw-r--r--indra/newview/llviewerinput.cpp171
-rw-r--r--indra/newview/llviewerinput.h8
-rw-r--r--indra/newview/llviewermedia.cpp4
-rw-r--r--indra/newview/llviewerobject.cpp5
-rw-r--r--indra/newview/llvieweroctree.cpp12
-rw-r--r--indra/newview/llvieweroctree.h4
-rw-r--r--indra/newview/llviewerregion.cpp2
-rw-r--r--indra/newview/llviewershadermgr.cpp10
-rw-r--r--indra/newview/llviewertexturelist.cpp13
-rw-r--r--indra/newview/llviewerwindow.cpp15
-rw-r--r--indra/newview/llvoavatar.cpp103
-rw-r--r--indra/newview/llvoavatar.h6
-rw-r--r--indra/newview/llvocache.cpp7
-rw-r--r--indra/newview/llvocache.h1
-rw-r--r--indra/newview/llvovolume.cpp26
-rw-r--r--indra/newview/llweb.cpp21
-rw-r--r--indra/newview/llworld.cpp24
-rw-r--r--indra/newview/llworld.h4
-rw-r--r--indra/newview/pipeline.cpp17
-rw-r--r--indra/newview/skins/default/xui/de/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/en/control_table_contents_media.xml10
-rw-r--r--indra/newview/skins/default/xui/en/floater_associate_listing.xml3
-rw-r--r--indra/newview/skins/default/xui/en/floater_mfa.xml49
-rw-r--r--indra/newview/skins/default/xui/en/floater_model_preview.xml2
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml34
-rw-r--r--indra/newview/skins/default/xui/en/panel_hide_beacon.xml20
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml4
-rw-r--r--indra/newview/skins/default/xui/en/panel_toolbar_view.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_volume_pulldown.xml2
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml6
-rw-r--r--indra/newview/skins/default/xui/fr/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/it/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/strings.xml2
-rw-r--r--indra/newview/skins/default/xui/ru/strings.xml2
-rw-r--r--indra/newview/tests/lllogininstance_test.cpp8
-rw-r--r--indra/newview/tests/llsecapi_test.cpp1
-rwxr-xr-xindra/newview/viewer_manifest.py2
95 files changed, 1406 insertions, 549 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 24b7ab7441..964615320d 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1913,9 +1913,7 @@ if (WINDOWS)
add_dependencies(${VIEWER_BINARY_NAME} copy_win_scripts)
endif (EXISTS ${CMAKE_SOURCE_DIR}/copy_win_scripts)
- add_dependencies(${VIEWER_BINARY_NAME}
- SLPlugin
- )
+ add_dependencies(${VIEWER_BINARY_NAME} SLPlugin)
# sets the 'working directory' for debugging from visual studio.
# Condition for version can be moved to requirements once build agents will be updated (see TOOL-3865)
@@ -2266,7 +2264,7 @@ endif (INSTALL)
# Note that the conventional VIEWER_SYMBOL_FILE is set by ../../build.sh
if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIEWER_SYMBOL_FILE)
- if (BUGSPLAT_DB)
+ if (USE_BUGSPLAT)
# BugSplat symbol-file generation
if (WINDOWS)
# Just pack up a tarball containing only the .pdb file for the
@@ -2350,7 +2348,7 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
if (LINUX)
# TBD
endif (LINUX)
- endif (BUGSPLAT_DB)
+ endif (USE_BUGSPLAT)
# for both Bugsplat and Breakpad
add_dependencies(llpackage generate_symbols)
diff --git a/indra/newview/app_settings/cmd_line.xml b/indra/newview/app_settings/cmd_line.xml
index 7514913d13..dd2b656ce3 100644
--- a/indra/newview/app_settings/cmd_line.xml
+++ b/indra/newview/app_settings/cmd_line.xml
@@ -207,14 +207,6 @@
<map>
<key>map-to</key>
<string>NoAudio</string>
- </map>
-
- <key>noinvlib</key>
- <map>
- <key>desc</key>
- <string>Do not request the inventory library.</string>
- <key>map-to</key>
- <string>NoInventoryLibrary</string>
</map>
<key>noninteractive</key>
diff --git a/indra/newview/app_settings/key_bindings.xml b/indra/newview/app_settings/key_bindings.xml
index 1a5157838c..55babc88bc 100644
--- a/indra/newview/app_settings/key_bindings.xml
+++ b/indra/newview/app_settings/key_bindings.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<keys>
+<keys xml_version="1">
<first_person>
<binding key="A" mask="NONE" command="slide_left"/>
<binding key="D" mask="NONE" command="slide_right"/>
@@ -17,22 +17,13 @@
<binding key="PGDN" mask="NONE" command="push_down"/>
<binding key="HOME" mask="NONE" command="toggle_fly"/>
- <binding key="PAD_LEFT" mask="NONE" command="slide_left"/>
- <binding key="PAD_RIGHT" mask="NONE" command="slide_right"/>
- <binding key="PAD_UP" mask="NONE" command="push_forward"/>
- <binding key="PAD_DOWN" mask="NONE" command="push_backward"/>
- <binding key="PAD_PGUP" mask="NONE" command="jump"/>
- <binding key="PAD_PGDN" mask="NONE" command="push_down"/>
- <binding key="PAD_HOME" mask="NONE" command="toggle_fly"/>
- <binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
- <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
-
<binding key="SPACE" mask="NONE" command="stop_moving"/>
<binding key="ENTER" mask="NONE" command="start_chat"/>
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
+
+ <binding key="" mask="NONE" mouse="LMB" command="script_trigger_lbutton"/>
</first_person>
<third_person>
<binding key="A" mask="NONE" command="turn_left"/>
@@ -60,19 +51,6 @@
<binding key="PGDN" mask="NONE" command="push_down"/>
<binding key="HOME" mask="NONE" command="toggle_fly"/>
- <binding key="PAD_LEFT" mask="NONE" command="turn_left"/>
- <binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
- <binding key="PAD_RIGHT" mask="NONE" command="turn_right"/>
- <binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
- <binding key="PAD_UP" mask="NONE" command="push_forward"/>
- <binding key="PAD_DOWN" mask="NONE" command="push_backward"/>
- <binding key="PAD_PGUP" mask="NONE" command="jump"/>
- <binding key="PAD_PGDN" mask="NONE" command="push_down"/>
- <binding key="PAD_HOME" mask="NONE" command="toggle_fly"/>
- <binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
- <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
-
<!--Camera controls in third person on Alt-->
<binding key="LEFT" mask="ALT" command="spin_around_cw"/>
<binding key="RIGHT" mask="ALT" command="spin_around_ccw"/>
@@ -88,15 +66,6 @@
<binding key="E" mask="ALT" command="spin_over"/>
<binding key="C" mask="ALT" command="spin_under"/>
- <binding key="PAD_LEFT" mask="ALT" command="spin_around_cw"/>
- <binding key="PAD_RIGHT" mask="ALT" command="spin_around_ccw"/>
- <binding key="PAD_UP" mask="ALT" command="move_forward"/>
- <binding key="PAD_DOWN" mask="ALT" command="move_backward"/>
- <binding key="PAD_PGUP" mask="ALT" command="spin_over"/>
- <binding key="PAD_PGDN" mask="ALT" command="spin_under"/>
- <binding key="PAD_ENTER" mask="ALT" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="ALT" command="start_gesture"/>
-
<!--mimic alt zoom behavior with keyboard only-->
<binding key="W" mask="CTL_ALT" command="spin_over"/>
<binding key="S" mask="CTL_ALT" command="spin_under"/>
@@ -104,9 +73,6 @@
<binding key="UP" mask="CTL_ALT" command="spin_over"/>
<binding key="DOWN" mask="CTL_ALT" command="spin_under"/>
- <binding key="PAD_UP" mask="CTL_ALT" command="spin_over"/>
- <binding key="PAD_DOWN" mask="CTL_ALT" command="spin_under"/>
-
<!--Therefore pan on Alt-Shift-->
<binding key="A" mask="CTL_ALT_SHIFT" command="pan_left"/>
<binding key="D" mask="CTL_ALT_SHIFT" command="pan_right"/>
@@ -118,14 +84,10 @@
<binding key="UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
<binding key="DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
- <binding key="PAD_LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
- <binding key="PAD_RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
- <binding key="PAD_UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
- <binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
- <binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
-
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
+ <binding key="" mask="NONE" mouse="LMB" command="walk_to"/>
+
+ <binding key="" mask="NONE" mouse="LMB" command="script_trigger_lbutton"/>
</third_person>
<sitting>
<binding key="A" mask="ALT" command="spin_around_cw"/>
@@ -167,16 +129,6 @@
<binding key="PGUP" mask="NONE" command="spin_over_sitting"/>
<binding key="PGDN" mask="NONE" command="spin_under_sitting"/>
- <binding key="PAD_LEFT" mask="NONE" command="spin_around_cw_sitting"/>
- <binding key="PAD_RIGHT" mask="NONE" command="spin_around_ccw_sitting"/>
- <binding key="PAD_UP" mask="NONE" command="move_forward_sitting"/>
- <binding key="PAD_DOWN" mask="NONE" command="move_backward_sitting"/>
- <binding key="PAD_PGUP" mask="NONE" command="spin_over_sitting"/>
- <binding key="PAD_PGDN" mask="NONE" command="spin_under_sitting"/>
- <binding key="PAD_CENTER" mask="NONE" command="stop_moving"/>
- <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
-
<!--these are for passing controls when sitting on vehicles-->
<binding key="A" mask="SHIFT" command="slide_left"/>
<binding key="D" mask="SHIFT" command="slide_right"/>
@@ -192,15 +144,6 @@
<binding key="PGUP" mask="SHIFT" command="spin_over_sitting"/>
<binding key="PGDN" mask="SHIFT" command="spin_under_sitting"/>
- <binding key="PAD_LEFT" mask="SHIFT" command="slide_left"/>
- <binding key="PAD_RIGHT" mask="SHIFT" command="slide_right"/>
- <binding key="PAD_UP" mask="SHIFT" command="move_forward_sitting"/>
- <binding key="PAD_DOWN" mask="SHIFT" command="move_backward_sitting"/>
- <binding key="PAD_PGUP" mask="SHIFT" command="spin_over_sitting"/>
- <binding key="PAD_PGDN" mask="SHIFT" command="spin_under_sitting"/>
- <binding key="PAD_ENTER" mask="SHIFT" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="SHIFT" command="start_gesture"/>
-
<!--pan on Alt-Shift-->
<binding key="A" mask="CTL_ALT_SHIFT" command="pan_left"/>
<binding key="D" mask="CTL_ALT_SHIFT" command="pan_right"/>
@@ -212,17 +155,12 @@
<binding key="UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
<binding key="DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
- <binding key="PAD_LEFT" mask="CTL_ALT_SHIFT" command="pan_left"/>
- <binding key="PAD_RIGHT" mask="CTL_ALT_SHIFT" command="pan_right"/>
- <binding key="PAD_UP" mask="CTL_ALT_SHIFT" command="pan_up"/>
- <binding key="PAD_DOWN" mask="CTL_ALT_SHIFT" command="pan_down"/>
- <binding key="PAD_ENTER" mask="CTL_ALT_SHIFT" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="CTL_ALT_SHIFT" command="start_gesture"/>
-
<binding key="ENTER" mask="NONE" command="start_chat"/>
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
+
+ <binding key="" mask="NONE" mouse="LMB" command="script_trigger_lbutton"/>
</sitting>
<edit_avatar>
<!--Avatar editing camera controls-->
@@ -240,15 +178,9 @@
<binding key="PGDN" mask="NONE" command="edit_avatar_spin_under"/>
<binding key="ENTER" mask="NONE" command="start_chat"/>
<binding key="DIVIDE" mask="NONE" command="start_gesture"/>
- <binding key="PAD_LEFT" mask="NONE" command="edit_avatar_spin_cw"/>
- <binding key="PAD_RIGHT" mask="NONE" command="edit_avatar_spin_ccw"/>
- <binding key="PAD_UP" mask="NONE" command="edit_avatar_move_forward"/>
- <binding key="PAD_DOWN" mask="NONE" command="edit_avatar_move_backward"/>
- <binding key="PAD_PGUP" mask="NONE" command="edit_avatar_spin_over"/>
- <binding key="PAD_PGDN" mask="NONE" command="edit_avatar_spin_under"/>
- <binding key="PAD_ENTER" mask="NONE" command="start_chat"/>
- <binding key="PAD_DIVIDE" mask="NONE" command="start_gesture"/>
<binding key="" mask="NONE" mouse="MMB" command="toggle_voice"/>
+
+ <binding key="" mask="NONE" mouse="LMB" command="script_trigger_lbutton"/>
</edit_avatar>
</keys>
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ffb2fa326d..c41118d6a7 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4758,7 +4758,7 @@
<key>Type</key>
<string>String</string>
<key>Value</key>
- <string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;p=[AUTH_TOKEN]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
+ <string>https://search.[GRID]/viewer/[CATEGORY]/?q=[QUERY]&amp;r=[MATURITY]&amp;lang=[LANGUAGE]&amp;g=[GODLIKE]&amp;sid=[SESSION_ID]&amp;rid=[REGION_ID]&amp;pid=[PARCEL_ID]&amp;channel=[CHANNEL]&amp;version=[VERSION]&amp;major=[VERSION_MAJOR]&amp;minor=[VERSION_MINOR]&amp;patch=[VERSION_PATCH]&amp;build=[VERSION_BUILD]</string>
</map>
<key>GuidebookURL</key>
<map>
@@ -5895,17 +5895,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>LoginAsGod</key>
- <map>
- <key>Comment</key>
- <string>Attempt to login with god powers (Linden accounts only)</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>LoginLocation</key>
<map>
<key>Comment</key>
@@ -6975,6 +6964,17 @@
<key>Value</key>
<integer>1000</integer>
</map>
+ <key>FakeInitialOutfitName</key>
+ <map>
+ <key>Comment</key>
+ <string>Pretend that this is first time login and specified name was chosen</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string />
+ </map>
<key>MyOutfitsAutofill</key>
<map>
<key>Comment</key>
@@ -7077,7 +7077,7 @@
<key>NoInventoryLibrary</key>
<map>
<key>Comment</key>
- <string>Do not request inventory library.</string>
+ <string>(Deprecated) Do not request inventory library.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
@@ -8110,9 +8110,9 @@
<string>Color4</string>
<key>Value</key>
<array>
- <real>1.0</real>
- <real>1.0</real>
- <real>1.0</real>
+ <real>0.33</real>
+ <real>0.33</real>
+ <real>0.33</real>
<real>1.0</real>
</array>
</map>
@@ -16807,5 +16807,16 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MFAHash</key>
+ <map>
+ <key>Comment</key>
+ <string>Override MFA state hash for authentication</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>String</string>
+ <key>Value</key>
+ <string></string>
+ </map>
</map>
</llsd>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index 638a0f4e15..02b2daf0ac 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -56,6 +56,10 @@ VARYING vec3 vary_norm;
VARYING vec4 vertex_color; //vertex color should be treated as sRGB
#endif
+#ifdef HAS_ALPHA_MASK
+uniform float minimum_alpha;
+#endif
+
uniform mat4 proj_mat;
uniform mat4 inv_proj;
uniform vec2 screen_res;
@@ -191,7 +195,6 @@ void main()
#endif
vec4 diffuse_srgb = diffuse_tap;
- vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a);
#ifdef FOR_IMPOSTOR
vec4 color;
@@ -200,30 +203,37 @@ void main()
float final_alpha = diffuse_srgb.a * vertex_color.a;
diffuse_srgb.rgb *= vertex_color.rgb;
- diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb);
// Insure we don't pollute depth with invis pixels in impostor rendering
//
- if (final_alpha < 0.01)
+ if (final_alpha < minimum_alpha)
{
discard;
}
-#else
-
+
+ color.rgb = diffuse_srgb.rgb;
+ color.a = final_alpha;
+
+#else // FOR_IMPOSTOR
+
+ vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a);
+
vec3 light_dir = (sun_up_factor == 1) ? sun_dir: moon_dir;
float final_alpha = diffuse_linear.a;
#ifdef USE_VERTEX_COLOR
- if (vertex_color.a <= 0.0)
+ final_alpha *= vertex_color.a;
+
+ if (final_alpha < minimum_alpha)
{ // TODO: figure out how to get invisible faces out of
// render batches without breaking glow
discard;
}
- final_alpha *= vertex_color.a;
+
diffuse_srgb.rgb *= vertex_color.rgb;
diffuse_linear.rgb = srgb_to_linear(diffuse_srgb.rgb);
-#endif
+#endif // USE_VERTEX_COLOR
vec3 sunlit;
vec3 amblit;
@@ -255,13 +265,13 @@ void main()
#if !defined(AMBIENT_KILL)
color.rgb = amblit;
color.rgb *= ambient;
-#endif
+#endif // !defined(AMBIENT_KILL)
vec3 post_ambient = color.rgb;
#if !defined(SUNLIGHT_KILL)
color.rgb += sun_contrib;
-#endif
+#endif // !defined(SUNLIGHT_KILL)
vec3 post_sunlight = color.rgb;
@@ -293,7 +303,7 @@ vec3 post_atmo = color.rgb;
// sum local light contrib in linear colorspace
#if !defined(LOCAL_LIGHT_KILL)
color.rgb += light.rgb;
-#endif
+#endif // !defined(LOCAL_LIGHT_KILL)
// back to sRGB as we're going directly to the final RT post-deferred gamma correction
color.rgb = linear_to_srgb(color.rgb);
@@ -312,7 +322,7 @@ vec3 post_atmo = color.rgb;
color = applyWaterFogView(pos.xyz, color);
#endif // WATER_FOG
-#endif
+#endif // #else // FOR_IMPOSTOR
frag_color = color;
}
diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl
index 2c139430e7..3bd6b693fa 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightShinyV.glsl
@@ -25,6 +25,7 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
@@ -71,7 +72,7 @@ void main()
vec3 ref = reflect(pos.xyz, -norm);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_texcoord1 = transpose(normal_matrix) * ref.xyz;
+ vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
diff --git a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
index eb6e56e718..a58cc3d12d 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/impostorF.glsl
@@ -54,8 +54,7 @@ void main()
vec4 norm = texture2D(normalMap, vary_texcoord0.xy);
vec4 spec = texture2D(specularMap, vary_texcoord0.xy);
- col.rgb = linear_to_srgb(col.rgb);
frag_data[0] = vec4(col.rgb, 0.0);
frag_data[1] = spec;
- frag_data[2] = vec4(norm.xy,0,0);
+ frag_data[2] = norm;
}
diff --git a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
index 1855cfceeb..690821bb56 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/lightFullbrightAlphaMaskF.glsl
@@ -43,14 +43,14 @@ VARYING vec2 vary_texcoord0;
void fullbright_lighting()
{
- vec4 color = diffuseLookup(vary_texcoord0.xy);
+ vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color;
if (color.a < minimum_alpha)
{
discard;
}
- color.rgb *= vertex_color.rgb;
+ //color.rgb *= vertex_color.rgb;
color.rgb = pow(color.rgb, vec3(texture_gamma));
diff --git a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
index ace2574ac2..891515ab1e 100644
--- a/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/fullbrightShinyV.glsl
@@ -25,6 +25,7 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
@@ -70,7 +71,7 @@ void main()
vec3 ref = reflect(pos.xyz, -norm);
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
- vary_texcoord1 = transpose(normal_matrix) * ref;
+ vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
diff --git a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
index 4bb588335a..5886f47cbc 100644
--- a/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/previewV.glsl
@@ -51,30 +51,6 @@ float calcDirectionalLight(vec3 n, vec3 l)
return a;
}
-
-float calcLocalLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight)
-{
- //get light vector
- vec3 lv = lp.xyz-v;
-
- //get distance
- float d = length(lv);
-
- //normalize light vector
- lv *= 1.0/d;
-
- //distance attenuation
- float da = clamp(1.0/(la * d), 0.0, 1.0);
-
- // spotlight coefficient.
- float spot = max(dot(-ln, lv), is_pointlight);
- da *= spot*spot; // GL_SPOT_EXPONENT=2
-
- //angular attenuation
- da *= calcDirectionalLight(n, lv);
-
- return da;
-}
//====================================================================================================
@@ -91,7 +67,8 @@ void main()
// Collect normal lights (need to be divided by two, as we later multiply by 2)
col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);
- col.rgb += light_diffuse[2].rgb*calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
- col.rgb += light_diffuse[3].rgb*calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
+ col.rgb += light_diffuse[2].rgb * calcDirectionalLight(norm, light_position[2].xyz);
+ col.rgb += light_diffuse[3].rgb * calcDirectionalLight(norm, light_position[3].xyz);
+
vertex_color = col*color;
}
diff --git a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
index 097e42d233..3ad7bcaa50 100644
--- a/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
+++ b/indra/newview/app_settings/shaders/class1/objects/shinyV.glsl
@@ -25,6 +25,7 @@
uniform mat3 normal_matrix;
uniform mat4 texture_matrix0;
+uniform mat4 texture_matrix1;
uniform mat4 modelview_matrix;
uniform mat4 modelview_projection_matrix;
@@ -69,7 +70,7 @@ void main()
vec3 ref = reflect(pos.xyz, -norm);
vary_texcoord0 = (texture_matrix0*vec4(texcoord0,0,1)).xy;
- vary_texcoord1 = transpose(normal_matrix) * ref;
+ vary_texcoord1 = (texture_matrix1 * vec4(ref,1.0)).xyz;
calcAtmospherics(pos.xyz);
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 650cc4e193..b79af04c36 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1988,7 +1988,8 @@ void LLAgent::propagate(const F32 dt)
//-----------------------------------------------------------------------------
void LLAgent::updateAgentPosition(const F32 dt, const F32 yaw_radians, const S32 mouse_x, const S32 mouse_y)
{
- if (mMoveTimer.getStarted() && mMoveTimer.getElapsedTimeF32() > gSavedSettings.getF32("NotMovingHintTimeout"))
+ static LLCachedControl<F32> hint_timeout(gSavedSettings, "NotMovingHintTimeout");
+ if (mMoveTimer.getStarted() && mMoveTimer.getElapsedTimeF32() > hint_timeout)
{
LLFirstUse::notMoving();
}
@@ -2159,7 +2160,8 @@ void LLAgent::endAnimationUpdateUI()
LLNavigationBar::getInstance()->setVisible(TRUE && gSavedSettings.getBOOL("ShowNavbarNavigationPanel"));
gStatusBar->setVisibleForMouselook(true);
- if (gSavedSettings.getBOOL("ShowMiniLocationPanel"))
+ static LLCachedControl<bool> show_mini_location_panel(gSavedSettings, "ShowMiniLocationPanel");
+ if (show_mini_location_panel)
{
LLPanelTopInfoBar::getInstance()->setVisible(TRUE);
}
@@ -3901,10 +3903,6 @@ bool LLAgent::teleportCore(bool is_local)
// yet if the teleport will succeed. Look in
// process_teleport_location_reply
- // close the map panel so we can see our destination.
- // we don't close search floater, see EXT-5840.
- LLFloaterReg::hideInstance("world_map");
-
// hide land floater too - it'll be out of date
LLFloaterReg::hideInstance("about_land");
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 7625547dd9..e9bf6bf4e5 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -637,6 +637,7 @@ LLAppViewer::LLAppViewer()
mLogoutMarkerFile(),
mReportedCrash(false),
mNumSessions(0),
+ mGeneralThreadPool(nullptr),
mPurgeCache(false),
mPurgeCacheOnExit(false),
mPurgeUserDataOnExit(false),
@@ -956,13 +957,7 @@ bool LLAppViewer::init()
// If we don't have the right GL requirements, exit.
if (!gGLManager.mHasRequirements)
{
- // can't use an alert here since we're exiting and
- // all hell breaks lose.
- LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements");
- OSMessageBox(
- details.getString(),
- LLStringUtil::null,
- OSMB_OK);
+ // already handled with a MBVideoDrvErr
return 0;
}
@@ -1712,11 +1707,6 @@ void LLAppViewer::flushLFSIO()
bool LLAppViewer::cleanup()
{
- // Since we don't know what functions are going to be queued by
- // onCleanup(), we have to assume they might rely on some of the things
- // we're about to destroy below. Run them first.
- mOnCleanup();
-
LLAtmosphere::cleanupClass();
//ditch LLVOAvatarSelf instance
@@ -2070,6 +2060,10 @@ bool LLAppViewer::cleanup()
sTextureCache->shutdown();
sImageDecodeThread->shutdown();
sPurgeDiskCacheThread->shutdown();
+ if (mGeneralThreadPool)
+ {
+ mGeneralThreadPool->close();
+ }
sTextureFetch->shutDownTextureCacheThread() ;
sTextureFetch->shutDownImageDecodeThread() ;
@@ -2094,6 +2088,8 @@ bool LLAppViewer::cleanup()
mFastTimerLogThread = NULL;
delete sPurgeDiskCacheThread;
sPurgeDiskCacheThread = NULL;
+ delete mGeneralThreadPool;
+ mGeneralThreadPool = NULL;
if (LLFastTimerView::sAnalyzePerformance)
{
@@ -2159,6 +2155,7 @@ bool LLAppViewer::cleanup()
LLEnvironment::deleteSingleton();
LLSelectMgr::deleteSingleton();
LLViewerEventRecorder::deleteSingleton();
+ LLWorld::deleteSingleton();
// It's not at first obvious where, in this long sequence, a generic cleanup
// call OUGHT to go. So let's say this: as we migrate cleanup from
@@ -2179,6 +2176,24 @@ bool LLAppViewer::cleanup()
return true;
}
+void LLAppViewer::initGeneralThread()
+{
+ if (mGeneralThreadPool)
+ {
+ return;
+ }
+
+ LLSD poolSizes{ gSavedSettings.getLLSD("ThreadPoolSizes") };
+ LLSD sizeSpec{ poolSizes["General"] };
+ LLSD::Integer poolSize{ sizeSpec.isInteger() ? sizeSpec.asInteger() : 3 };
+ LL_DEBUGS("ThreadPool") << "Instantiating General pool with "
+ << poolSize << " threads" << LL_ENDL;
+ // We don't want anyone, especially the main thread, to have to block
+ // due to this ThreadPool being full.
+ mGeneralThreadPool = new LL::ThreadPool("General", poolSize, 1024 * 1024);
+ mGeneralThreadPool->start();
+}
+
bool LLAppViewer::initThreads()
{
static const bool enable_threads = true;
@@ -3117,6 +3132,11 @@ bool LLAppViewer::initWindow()
return true;
}
+bool LLAppViewer::isUpdaterMissing()
+{
+ return mUpdaterNotFound;
+}
+
void LLAppViewer::writeDebugInfo(bool isStatic)
{
#if LL_WINDOWS && LL_BUGSPLAT
@@ -5368,14 +5388,18 @@ void LLAppViewer::disconnectViewer()
}
// save inventory if appropriate
- gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
- if (gInventory.getLibraryRootFolderID().notNull()
- && gInventory.getLibraryOwnerID().notNull())
- {
- gInventory.cache(
- gInventory.getLibraryRootFolderID(),
- gInventory.getLibraryOwnerID());
- }
+ if (gInventory.isInventoryUsable()
+ && gAgent.getID().notNull()) // Shouldn't be null at this stage
+ {
+ gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
+ if (gInventory.getLibraryRootFolderID().notNull()
+ && gInventory.getLibraryOwnerID().notNull())
+ {
+ gInventory.cache(
+ gInventory.getLibraryRootFolderID(),
+ gInventory.getLibraryOwnerID());
+ }
+ }
saveNameCache();
if (LLExperienceCache::instanceExists())
@@ -5397,7 +5421,7 @@ void LLAppViewer::disconnectViewer()
// Now we just ask the LLWorld singleton to cleanly shut down.
if(LLWorld::instanceExists())
{
- LLWorld::getInstance()->destroyClass();
+ LLWorld::getInstance()->resetClass();
}
LLVOCache::deleteSingleton();
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h
index d807cf9765..68c04d450b 100644
--- a/indra/newview/llappviewer.h
+++ b/indra/newview/llappviewer.h
@@ -63,6 +63,11 @@ class LLViewerJoystick;
class LLPurgeDiskCacheThread;
class LLViewerRegion;
+namespace LL
+{
+ class ThreadPool;
+}
+
extern LLTrace::BlockTimerStatHandle FTM_FRAME;
class LLAppViewer : public LLApp
@@ -100,7 +105,7 @@ public:
bool quitRequested() { return mQuitRequested; }
bool logoutRequestSent() { return mLogoutRequestSent; }
bool isSecondInstance() { return mSecondInstance; }
- bool isUpdaterMissing() { return mUpdaterNotFound; }
+ bool isUpdaterMissing(); // In use by tests
void writeDebugInfo(bool isStatic=true);
@@ -201,13 +206,7 @@ public:
void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
- typedef boost::signals2::signal<void()> cleanup_signal_t;
- cleanup_signal_t mOnCleanup;
- boost::signals2::connection onCleanup(const cleanup_signal_t::slot_type& cb)
- {
- return mOnCleanup.connect(cb);
- }
-
+ void initGeneralThread();
void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
void purgeCache(); // Clear the local cache.
void purgeCacheImmediate(); //clear local cache immediately.
@@ -269,7 +268,6 @@ private:
void idle();
void idleShutdown();
// update avatar SLID and display name caches
- void idleExperienceCache();
void idleNameCache();
void idleNetwork();
@@ -298,6 +296,7 @@ private:
static LLImageDecodeThread* sImageDecodeThread;
static LLTextureFetch* sTextureFetch;
static LLPurgeDiskCacheThread* sPurgeDiskCacheThread;
+ LL::ThreadPool* mGeneralThreadPool;
S32 mNumSessions;
diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h
index 82b6b0c77c..ab52bf15f9 100644
--- a/indra/newview/llappviewerwin32.h
+++ b/indra/newview/llappviewerwin32.h
@@ -51,8 +51,8 @@ protected:
bool initHardwareTest() override; // Win32 uses DX9 to test hardware.
bool initParseCommandLine(LLCommandLineParser& clp) override;
- virtual bool beingDebugged();
- virtual bool restoreErrorTrap();
+ bool beingDebugged() override;
+ bool restoreErrorTrap() override;
bool sendURLToOtherInstance(const std::string& url) override;
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index 140b9e6f36..fe94cd27b6 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -370,6 +370,8 @@ void LLAvatarRenderInfoAccountant::idle()
&& regionp->capabilitiesReceived())
{
// each of these is further governed by and resets its own timer
+ // Note: We can have multiple regions, each launches up to two coroutines,
+ // it likely is expensive
sendRenderInfoToRegion(regionp);
getRenderInfoFromRegion(regionp);
}
diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp
index 9ee9900eba..8d1e9a438e 100644
--- a/indra/newview/llcallingcard.cpp
+++ b/indra/newview/llcallingcard.cpp
@@ -257,6 +257,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
LLAvatarName av_name;
LLAvatarNameCache::get(agent_id, &av_name);
+ addChangedMask(LLFriendObserver::ADD, agent_id);
LL_DEBUGS() << "Added buddy " << agent_id
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
<< ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo()
@@ -645,7 +646,8 @@ void LLAvatarTracker::processChange(LLMessageSystem* msg)
{
if(mBuddyInfo.find(agent_id) != mBuddyInfo.end())
{
- if((mBuddyInfo[agent_id]->getRightsGrantedFrom() ^ new_rights) & LLRelationship::GRANT_MODIFY_OBJECTS)
+ if (((mBuddyInfo[agent_id]->getRightsGrantedFrom() ^ new_rights) & LLRelationship::GRANT_MODIFY_OBJECTS)
+ && !gAgent.isDoNotDisturb())
{
LLSD args;
args["NAME"] = LLSLURL("agent", agent_id, "displayname").getSLURLString();
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index fee85d50bd..20fa6d490b 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -96,10 +96,14 @@ LLConversationViewSession::~LLConversationViewSession()
{
mActiveVoiceChannelConnection.disconnect();
- if(LLVoiceClient::instanceExists() && mVoiceClientObserver)
- {
- LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
- }
+ if (mVoiceClientObserver)
+ {
+ if (LLVoiceClient::instanceExists())
+ {
+ LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
+ }
+ delete mVoiceClientObserver;
+ }
mFlashTimer->unset();
}
@@ -255,7 +259,12 @@ BOOL LLConversationViewSession::postBuild()
mIsInActiveVoiceChannel = true;
if(LLVoiceClient::instanceExists())
{
- LLNearbyVoiceClientStatusObserver* mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
+ if (mVoiceClientObserver)
+ {
+ LLVoiceClient::getInstance()->removeObserver(mVoiceClientObserver);
+ delete mVoiceClientObserver;
+ }
+ mVoiceClientObserver = new LLNearbyVoiceClientStatusObserver(this);
LLVoiceClient::getInstance()->addObserver(mVoiceClientObserver);
}
break;
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 5c291b69fc..a3837fe10c 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -596,6 +596,10 @@ bool LLRenderPass::uploadMatrixPalette(LLDrawInfo& params)
//static
bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo)
{
+ if (!avatar)
+ {
+ return false;
+ }
const LLVOAvatar::MatrixPaletteCache& mpc = avatar->updateSkinInfoMatrixPalette(skinInfo);
U32 count = mpc.mMatrixPalette.size();
diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp
index 5656eb1471..e674707c01 100644
--- a/indra/newview/lldrawpoolalpha.cpp
+++ b/indra/newview/lldrawpoolalpha.cpp
@@ -56,6 +56,11 @@ BOOL LLDrawPoolAlpha::sShowDebugAlpha = FALSE;
static BOOL deferred_render = FALSE;
+// minimum alpha before discarding a fragment
+static const F32 MINIMUM_ALPHA = 0.004f; // ~ 1/255
+// minimum alpha before discarding a fragment when rendering impostors
+static const F32 MINIMUM_IMPOSTOR_ALPHA = 0.1f;
+
LLDrawPoolAlpha::LLDrawPoolAlpha(U32 type) :
LLRenderPass(type), target_shader(NULL),
mColorSFactor(LLRender::BF_UNDEF), mColorDFactor(LLRender::BF_UNDEF),
@@ -106,11 +111,11 @@ static void prepare_alpha_shader(LLGLSLShader* shader, bool textureGamma, bool d
if (LLPipeline::sImpostorRender)
{
- shader->setMinimumAlpha(0.5f);
+ shader->setMinimumAlpha(MINIMUM_IMPOSTOR_ALPHA);
}
else
{
- shader->setMinimumAlpha(0.f);
+ shader->setMinimumAlpha(MINIMUM_ALPHA);
}
if (textureGamma)
{
@@ -130,14 +135,15 @@ void LLDrawPoolAlpha::renderPostDeferred(S32 pass)
deferred_render = TRUE;
// prepare shaders
- emissive_shader = (LLPipeline::sUnderWaterRender) ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram;
+ emissive_shader = (LLPipeline::sRenderDeferred) ? &gDeferredEmissiveProgram :
+ (LLPipeline::sUnderWaterRender) ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram;
prepare_alpha_shader(emissive_shader, true, false);
- fullbright_shader = (LLPipeline::sImpostorRender) ? &gDeferredFullbrightProgram :
- (LLPipeline::sUnderWaterRender) ? &gDeferredFullbrightWaterProgram : &gDeferredFullbrightProgram;
+ fullbright_shader = (LLPipeline::sImpostorRender) ? &gDeferredFullbrightAlphaMaskProgram :
+ (LLPipeline::sUnderWaterRender) ? &gDeferredFullbrightWaterProgram : &gDeferredFullbrightAlphaMaskProgram;
prepare_alpha_shader(fullbright_shader, true, false);
- simple_shader = (LLPipeline::sImpostorRender) ? &gDeferredAlphaImpostorProgram :
+ simple_shader = (LLPipeline::sImpostorRender) ? &gDeferredAlphaImpostorProgram :
(LLPipeline::sUnderWaterRender) ? &gDeferredAlphaWaterProgram : &gDeferredAlphaProgram;
prepare_alpha_shader(simple_shader, false, true); //prime simple shader (loads shadow relevant uniforms)
@@ -196,18 +202,18 @@ void LLDrawPoolAlpha::render(S32 pass)
LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWPOOL;
simple_shader = (LLPipeline::sImpostorRender) ? &gObjectSimpleImpostorProgram :
- (LLPipeline::sUnderWaterRender) ? &gObjectSimpleWaterProgram : &gObjectSimpleProgram;
+ (LLPipeline::sUnderWaterRender) ? &gObjectSimpleWaterProgram : &gObjectSimpleAlphaMaskProgram;
- fullbright_shader = (LLPipeline::sImpostorRender) ? &gObjectFullbrightProgram :
- (LLPipeline::sUnderWaterRender) ? &gObjectFullbrightWaterProgram : &gObjectFullbrightProgram;
+ fullbright_shader = (LLPipeline::sImpostorRender) ? &gObjectFullbrightAlphaMaskProgram :
+ (LLPipeline::sUnderWaterRender) ? &gObjectFullbrightWaterProgram : &gObjectFullbrightAlphaMaskProgram;
emissive_shader = (LLPipeline::sImpostorRender) ? &gObjectEmissiveProgram :
(LLPipeline::sUnderWaterRender) ? &gObjectEmissiveWaterProgram : &gObjectEmissiveProgram;
- F32 minimum_alpha = 0.f;
+ F32 minimum_alpha = MINIMUM_ALPHA;
if (LLPipeline::sImpostorRender)
{
- minimum_alpha = 0.5f;
+ minimum_alpha = MINIMUM_IMPOSTOR_ALPHA;
}
prepare_forward_shader(fullbright_shader, minimum_alpha);
prepare_forward_shader(simple_shader, minimum_alpha);
@@ -588,7 +594,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
const LLTextureEntry* tep = face->getTextureEntry();
if(tep)
{ // don't render faces that are more than 90% transparent
- if(tep->getColor().mV[3] < 0.1f)
+ if(tep->getColor().mV[3] < MINIMUM_IMPOSTOR_ALPHA)
continue;
}
}
@@ -711,6 +717,16 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
LLGLEnableFunc stencil_test(GL_STENCIL_TEST, params.mSelected, &LLGLCommonFunc::selected_stencil_test);
gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor);
+
+ bool reset_minimum_alpha = false;
+ if (!LLPipeline::sImpostorRender &&
+ params.mBlendFuncDst != LLRender::BF_SOURCE_ALPHA &&
+ params.mBlendFuncSrc != LLRender::BF_SOURCE_ALPHA)
+ { // this draw call has a custom blend function that may require rendering of "invisible" fragments
+ current_shader->setMinimumAlpha(0.f);
+ reset_minimum_alpha = true;
+ }
+
U32 drawMask = mask;
if (params.mFullbright)
{
@@ -723,6 +739,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
params.mVertexBuffer->setBufferFast(drawMask);
params.mVertexBuffer->drawRangeFast(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
+
+ if (reset_minimum_alpha)
+ {
+ current_shader->setMinimumAlpha(MINIMUM_ALPHA);
+ }
}
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls is expensive, but glow must be drawn Z-sorted with alpha.
@@ -796,6 +817,10 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
bool LLDrawPoolAlpha::uploadMatrixPalette(const LLDrawInfo& params)
{
+ if (params.mAvatar.isNull())
+ {
+ return false;
+ }
const LLVOAvatar::MatrixPaletteCache& mpc = params.mAvatar.get()->updateSkinInfoMatrixPalette(params.mSkinInfo);
U32 count = mpc.mMatrixPalette.size();
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 2892fc6f9f..ef38b77922 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -311,6 +311,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
shader->uniform4fv(LLViewerShaderMgr::SHINY_ORIGIN, 1, vec4.mV);
if (shader_level > 1)
{
+ cube_map->setMatrix(1);
// Make sure that texture coord generation happens for tex unit 1, as that's the one we use for
// the cube map in the one pass shiny shaders
cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
@@ -319,6 +320,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
}
else
{
+ cube_map->setMatrix(0);
cube_channel = shader->enableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
diffuse_channel = -1;
cube_map->enable(cube_channel);
@@ -332,6 +334,7 @@ void LLDrawPoolBump::bindCubeMap(LLGLSLShader* shader, S32 shader_level, S32& di
diffuse_channel = -1;
gGL.getTexUnit(0)->disable();
cube_map->enable(0);
+ cube_map->setMatrix(0);
gGL.getTexUnit(0)->bind(cube_map);
}
}
@@ -390,6 +393,7 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
// Moved below shader->disableTexture call to avoid false alarms from auto-re-enable of textures on stage 0
// MAINT-755
cube_map->disable();
+ cube_map->restoreMatrix();
}
}
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp
index 135770c99c..2b05f4c453 100644
--- a/indra/newview/lldrawpoolmaterials.cpp
+++ b/indra/newview/lldrawpoolmaterials.cpp
@@ -243,7 +243,7 @@ void LLDrawPoolMaterials::pushMaterialsBatch(LLDrawInfo& params, U32 mask, bool
}
// upload matrix palette to shader
- if (rigged)
+ if (rigged && params.mAvatar.notNull())
{
const LLVOAvatar::MatrixPaletteCache& mpc = params.mAvatar->updateSkinInfoMatrixPalette(params.mSkinInfo);
U32 count = mpc.mMatrixPalette.size();
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 6762b38c39..a84f62036e 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -624,18 +624,10 @@ void LLDrawPoolWater::renderWater()
shader->uniform3fv(LLShaderMgr::WATER_SPECULAR, 1, light_diffuse.mV);
shader->uniform1f(LLShaderMgr::WATER_SPECULAR_EXP, light_exp);
- if (LLEnvironment::instance().isCloudScrollPaused())
- {
- static const std::array<F32, 2> zerowave {{0.0f, 0.0f}};
- shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR1, 1, zerowave.data());
- shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR2, 1, zerowave.data());
- }
- else
- {
- shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR1, 1, pwater->getWave1Dir().mV);
- shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR2, 1, pwater->getWave2Dir().mV);
- }
+ shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR1, 1, pwater->getWave1Dir().mV);
+ shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR2, 1, pwater->getWave2Dir().mV);
+
shader->uniform3fv(LLShaderMgr::WATER_LIGHT_DIR, 1, light_dir.mV);
shader->uniform3fv(LLShaderMgr::WATER_NORM_SCALE, 1, pwater->getNormalScale().mV);
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 42f3d15a1c..b76dc6a961 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -1155,6 +1155,10 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
mSignalEnvChanged(env, env_version);
}
+void LLEnvironment::setCurrentEnvironmentSelection(LLEnvironment::EnvSelection_t env)
+{
+ mCurrentEnvironment->setEnvironmentSelection(env);
+}
void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironment::fixedEnvironment_t fixed, S32 env_version)
{
@@ -1761,8 +1765,22 @@ void LLEnvironment::updateShaderUniforms(LLGLSLShader* shader)
void LLEnvironment::updateSettingsUniforms()
{
- updateGLVariablesForSettings(mWaterUniforms, mCurrentEnvironment->getWater());
- updateGLVariablesForSettings(mSkyUniforms, mCurrentEnvironment->getSky());
+ if (mCurrentEnvironment->getWater())
+ {
+ updateGLVariablesForSettings(mWaterUniforms, mCurrentEnvironment->getWater());
+ }
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Failed to update GL variable for water settings, environment is not properly set" << LL_ENDL;
+ }
+ if (mCurrentEnvironment->getSky())
+ {
+ updateGLVariablesForSettings(mSkyUniforms, mCurrentEnvironment->getSky());
+ }
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Failed to update GL variable for sky settings, environment is not properly set" << LL_ENDL;
+ }
}
void LLEnvironment::recordEnvironment(S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envinfo, LLSettingsBase::Seconds transition)
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 0ec06402f8..330de2bea8 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -158,6 +158,8 @@ public:
static void logEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &settings, S32 env_version = NO_VERSION);
+ void setCurrentEnvironmentSelection(LLEnvironment::EnvSelection_t env);
+
LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env);
LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env);
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 9bf9e7503e..740396178b 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1172,6 +1172,11 @@ bool LLFace::canRenderAsMask()
return true;
}
+ if (isState(LLFace::RIGGED))
+ { // never auto alpha-mask rigged faces
+ return false;
+ }
+
const LLTextureEntry* te = getTextureEntry();
if( !te || !getViewerObject() || !getTexture() )
{
@@ -2360,14 +2365,35 @@ F32 LLFace::getTextureVirtualSize()
BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
//VECTORIZE THIS
//get area of circle around face
- LLVector4a center;
- center.load3(getPositionAgent().mV);
- LLVector4a size;
- size.setSub(mExtents[1], mExtents[0]);
+
+ LLVector4a center;
+ LLVector4a size;
+
+
+ if (isState(LLFace::RIGGED))
+ {
+ //override with avatar bounding box
+ LLVOAvatar* avatar = mVObjp->getAvatar();
+ if (avatar && avatar->mDrawable)
+ {
+ center.load3(avatar->getPositionAgent().mV);
+ const LLVector4a* exts = avatar->mDrawable->getSpatialExtents();
+ size.setSub(exts[1], exts[0]);
+ }
+ else
+ {
+ return false;
+ }
+ }
+ else
+ {
+ center.load3(getPositionAgent().mV);
+ size.setSub(mExtents[1], mExtents[0]);
+ }
size.mul(0.5f);
LLViewerCamera* camera = LLViewerCamera::getInstance();
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 3b192ff81b..1c69b9d60b 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -453,18 +453,18 @@ void LLFloaterCamera::setMode(ECameraControlMode mode)
void LLFloaterCamera::switchMode(ECameraControlMode mode)
{
- setMode(mode);
-
switch (mode)
{
case CAMERA_CTRL_MODE_PRESETS:
case CAMERA_CTRL_MODE_PAN:
sFreeCamera = false;
+ setMode(mode); // depends onto sFreeCamera
clear_camera_tool();
break;
case CAMERA_CTRL_MODE_FREE_CAMERA:
sFreeCamera = true;
+ setMode(mode);
activate_camera_tool();
break;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 4f2c36f45b..fec218ca3b 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -137,6 +137,7 @@ void LLFloaterFixedEnvironment::onClose(bool app_quitting)
doCloseInventoryFloater(app_quitting);
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+ LLEnvironment::instance().setCurrentEnvironmentSelection(LLEnvironment::ENV_LOCAL);
LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
mSettings.reset();
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index c4e0dd483f..6e326ff3cf 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -582,8 +582,7 @@ void LLFloaterGesture::onCopyPasteAction(const LLSD& command)
LLInventoryItem* item = gInventory.getItem(*it);
if(item && item->getInventoryType() == LLInventoryType::IT_GESTURE)
{
- LLWString item_name = utf8str_to_wstring(item->getName());
- LLClipboard::instance().addToClipboard(item_name, 0, item_name.size());
+ LLClipboard::instance().addToClipboard(*it);
}
}
}
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 43dc304c10..34499ac170 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -384,7 +384,7 @@ void LLFloaterIMSessionTab::draw()
void LLFloaterIMSessionTab::enableDisableCallBtn()
{
- if (LLVoiceClient::instanceExists())
+ if (LLVoiceClient::instanceExists() && mVoiceButton)
{
mVoiceButton->setEnabled(
mSessionID.notNull()
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index f94c53a08b..70114df989 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -2341,7 +2341,16 @@ void LLPanelPreference::saveSettings()
{
view_stack.push_back(*iter);
}
- }
+ }
+
+ if (LLStartUp::getStartupState() == STATE_STARTED)
+ {
+ LLControlVariable* control = gSavedPerAccountSettings.getControl("VoiceCallsFriendsOnly");
+ if (control)
+ {
+ mSavedValues[control] = control->getValue();
+ }
+ }
}
void LLPanelPreference::showMultipleViewersWarning(LLUICtrl* checkbox, const LLSD& value)
diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp
index 779542cfcc..2e1fbb09e0 100644
--- a/indra/newview/llfloatersearch.cpp
+++ b/indra/newview/llfloatersearch.cpp
@@ -169,15 +169,6 @@ void LLFloaterSearch::search(const SearchQuery &p)
// add the search query string
subs["QUERY"] = LLURI::escape(p.query);
- // add the permissions token that login.cgi gave us
- // We use "search_token", and fallback to "auth_token" if not present.
- LLSD search_token = LLLoginInstance::getInstance()->getResponse("search_token");
- if (search_token.asString().empty())
- {
- search_token = LLLoginInstance::getInstance()->getResponse("auth_token");
- }
- subs["AUTH_TOKEN"] = search_token.asString();
-
// add the user's preferred maturity (can be changed via prefs)
std::string maturity;
if (gAgent.prefersAdult())
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 27197f0b06..2c84cd1f93 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -56,10 +56,12 @@
#include "llscrolllistctrl.h"
#include "llslurl.h"
#include "lltextbox.h"
+#include "lltoolbarview.h"
#include "lltracker.h"
#include "lltrans.h"
#include "llviewerinventory.h" // LLViewerInventoryItem
#include "llviewermenu.h"
+#include "llviewerparcelmgr.h"
#include "llviewerregion.h"
#include "llviewerstats.h"
#include "llviewertexture.h"
@@ -87,6 +89,9 @@ static const F32 MAP_ZOOM_TIME = 0.2f;
// Currently (01/26/09), this value allows the whole grid to be visible in a 1024x1024 window.
static const S32 MAX_VISIBLE_REGIONS = 512;
+
+const S32 HIDE_BEACON_PAD = 133;
+
// It would be more logical to have this inside the method where it is used but to compile under gcc this
// struct has to be here.
struct SortRegionNames
@@ -326,6 +331,8 @@ LLFloaterWorldMap::~LLFloaterWorldMap()
mFriendObserver = NULL;
gFloaterWorldMap = NULL;
+
+ mTeleportFinishConnection.disconnect();
}
//static
@@ -339,12 +346,16 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
{
// While we're not visible, discard the overlay images we're using
LLWorldMap::getInstance()->clearImageRefs();
+ mTeleportFinishConnection.disconnect();
}
// virtual
void LLFloaterWorldMap::onOpen(const LLSD& key)
{
- bool center_on_target = (key.asString() == "center");
+ mTeleportFinishConnection = LLViewerParcelMgr::getInstance()->
+ setTeleportFinishedCallback(boost::bind(&LLFloaterWorldMap::onTeleportFinished, this));
+
+ bool center_on_target = (key.asString() == "center");
mIsClosing = FALSE;
@@ -1566,6 +1577,13 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
}
}
+void LLFloaterWorldMap::onTeleportFinished()
+{
+ if(isInVisibleChain())
+ {
+ LLWorldMapView::setPan(0, 0, TRUE);
+ }
+}
void LLFloaterWorldMap::onCommitSearchResult()
{
@@ -1642,3 +1660,103 @@ void LLFloaterWorldMap::onFocusLost()
LLWorldMapView* map_panel = (LLWorldMapView*)gFloaterWorldMap->mPanel;
map_panel->mPanning = FALSE;
}
+
+LLPanelHideBeacon::LLPanelHideBeacon() :
+ mHideButton(NULL)
+{
+}
+
+// static
+LLPanelHideBeacon* LLPanelHideBeacon::getInstance()
+{
+ static LLPanelHideBeacon* panel = getPanelHideBeacon();
+ return panel;
+}
+
+
+BOOL LLPanelHideBeacon::postBuild()
+{
+ mHideButton = getChild<LLButton>("hide_beacon_btn");
+ mHideButton->setCommitCallback(boost::bind(&LLPanelHideBeacon::onHideButtonClick, this));
+
+ gViewerWindow->setOnWorldViewRectUpdated(boost::bind(&LLPanelHideBeacon::updatePosition, this));
+
+ return TRUE;
+}
+
+//virtual
+void LLPanelHideBeacon::draw()
+{
+ if (!LLTracker::isTracking(NULL))
+ {
+ mHideButton->setVisible(false);
+ return;
+ }
+ mHideButton->setVisible(true);
+ updatePosition();
+ LLPanel::draw();
+}
+
+//virtual
+void LLPanelHideBeacon::setVisible(BOOL visible)
+{
+ if (gAgentCamera.getCameraMode() == CAMERA_MODE_MOUSELOOK) visible = false;
+
+ if (visible)
+ {
+ updatePosition();
+ }
+
+ LLPanel::setVisible(visible);
+}
+
+
+//static
+LLPanelHideBeacon* LLPanelHideBeacon::getPanelHideBeacon()
+{
+ LLPanelHideBeacon* panel = new LLPanelHideBeacon();
+ panel->buildFromFile("panel_hide_beacon.xml");
+
+ LL_INFOS() << "Build LLPanelHideBeacon panel" << LL_ENDL;
+
+ panel->updatePosition();
+ return panel;
+}
+
+void LLPanelHideBeacon::onHideButtonClick()
+{
+ LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance();
+ if (instance)
+ {
+ instance->onClearBtn();
+ }
+}
+
+/**
+* Updates position of the panel (similar to Stand & Stop Flying panel).
+*/
+void LLPanelHideBeacon::updatePosition()
+{
+ S32 bottom_tb_center = 0;
+ if (LLToolBar* toolbar_bottom = gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_BOTTOM))
+ {
+ bottom_tb_center = toolbar_bottom->getRect().getCenterX();
+ }
+
+ S32 left_tb_width = 0;
+ if (LLToolBar* toolbar_left = gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_LEFT))
+ {
+ left_tb_width = toolbar_left->getRect().getWidth();
+ }
+
+ if (gToolBarView != NULL && gToolBarView->getToolbar(LLToolBarEnums::TOOLBAR_LEFT)->hasButtons())
+ {
+ S32 x_pos = bottom_tb_center - getRect().getWidth() / 2 - left_tb_width;
+ setOrigin( x_pos + HIDE_BEACON_PAD, 0);
+ }
+ else
+ {
+ S32 x_pos = bottom_tb_center - getRect().getWidth() / 2;
+ setOrigin( x_pos + HIDE_BEACON_PAD, 0);
+ }
+}
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 97e99297cf..14a9c26fb9 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -107,7 +107,8 @@ public:
// teleport to the tracked item, if there is one
void teleport();
void onChangeMaturity();
-
+
+ void onClearBtn();
//Slapp instigated avatar tracking
void avatarTrackFromSlapp( const LLUUID& id );
@@ -124,7 +125,6 @@ protected:
void onComboTextEntry( );
void onSearchTextEntry( );
- void onClearBtn();
void onClickTeleportBtn();
void onShowTargetBtn();
void onShowAgentBtn();
@@ -151,7 +151,7 @@ protected:
void onCoordinatesCommit();
void onCommitSearchResult();
- void cacheLandmarkPosition();
+ void onTeleportFinished();
private:
LLPanel* mPanel; // Panel displaying the map
@@ -195,9 +195,31 @@ private:
LLCtrlListInterface * mListFriendCombo;
LLCtrlListInterface * mListLandmarkCombo;
LLCtrlListInterface * mListSearchResults;
+
+ boost::signals2::connection mTeleportFinishConnection;
};
extern LLFloaterWorldMap* gFloaterWorldMap;
+
+class LLPanelHideBeacon : public LLPanel
+{
+public:
+ static LLPanelHideBeacon* getInstance();
+
+ LLPanelHideBeacon();
+ /*virtual*/ BOOL postBuild();
+ /*virtual*/ void setVisible(BOOL visible);
+ /*virtual*/ void draw();
+
+private:
+ static LLPanelHideBeacon* getPanelHideBeacon();
+ void onHideButtonClick();
+ void updatePosition();
+
+ LLButton* mHideButton;
+
+};
+
#endif
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 9f2119281d..489d34edca 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -483,8 +483,13 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, LLMultiGesture* new_ges
mActive[base_item_id] = new_gesture;
- delete old_gesture;
- old_gesture = NULL;
+ // replaceGesture(const LLUUID& item_id, const LLUUID& new_asset_id)
+ // replaces ids without repalcing gesture
+ if (old_gesture != new_gesture)
+ {
+ delete old_gesture;
+ old_gesture = NULL;
+ }
if (asset_id.notNull())
{
@@ -910,7 +915,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
else if (gesture->mWaitTimer.getElapsedTimeF32() > MAX_WAIT_ANIM_SECS)
{
// we've waited too long for an animation
- LL_INFOS() << "Waited too long for animations to stop, continuing gesture."
+ LL_INFOS("GestureMgr") << "Waited too long for animations to stop, continuing gesture."
<< LL_ENDL;
gesture->mWaitingAnimations = FALSE;
gesture->mCurrentStep++;
@@ -1097,6 +1102,34 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid,
self.setFetchID(item_id);
self.startFetch();
}
+
+ item_map_t::iterator it = self.mActive.find(item_id);
+ if (it == self.mActive.end())
+ {
+ // Gesture is supposed to be present, active, but NULL
+ LL_DEBUGS("GestureMgr") << "Gesture " << item_id << " not found in active list" << LL_ENDL;
+ }
+ else
+ {
+ LLMultiGesture* old_gesture = (*it).second;
+ if (old_gesture && old_gesture != gesture)
+ {
+ LL_DEBUGS("GestureMgr") << "Received dupplicate " << item_id << " callback" << LL_ENDL;
+ // In case somebody managest to activate, deactivate and
+ // then activate gesture again, before asset finishes loading.
+ // LLLoadInfo will have a different pointer, asset storage will
+ // see it as a different request, resulting in two callbacks.
+
+ // deactivateSimilarGestures() did not turn this one off
+ // because of matching item_id
+ self.stopGesture(old_gesture);
+
+ self.mActive.erase(item_id);
+ delete old_gesture;
+ old_gesture = NULL;
+ }
+ }
+
self.mActive[item_id] = gesture;
// Everything has been successful. Add to the active list.
@@ -1131,9 +1164,23 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid,
}
else
{
- LL_WARNS() << "Unable to load gesture" << LL_ENDL;
-
- self.mActive.erase(item_id);
+ LL_WARNS("GestureMgr") << "Unable to load gesture" << LL_ENDL;
+
+ item_map_t::iterator it = self.mActive.find(item_id);
+ if (it != self.mActive.end())
+ {
+ LLMultiGesture* old_gesture = (*it).second;
+ if (old_gesture)
+ {
+ // Shouldn't happen, just in case
+ LL_WARNS("GestureMgr") << "Gesture " << item_id << " existed when it shouldn't" << LL_ENDL;
+
+ self.stopGesture(old_gesture);
+ delete old_gesture;
+ old_gesture = NULL;
+ }
+ self.mActive.erase(item_id);
+ }
delete gesture;
gesture = NULL;
@@ -1151,9 +1198,23 @@ void LLGestureMgr::onLoadComplete(const LLUUID& asset_uuid,
LLDelayedGestureError::gestureFailedToLoad( item_id );
}
- LL_WARNS() << "Problem loading gesture: " << status << LL_ENDL;
-
- LLGestureMgr::instance().mActive.erase(item_id);
+ LL_WARNS("GestureMgr") << "Problem loading gesture: " << status << LL_ENDL;
+
+ item_map_t::iterator it = self.mActive.find(item_id);
+ if (it != self.mActive.end())
+ {
+ LLMultiGesture* old_gesture = (*it).second;
+ if (old_gesture)
+ {
+ // Shouldn't happen, just in case
+ LL_WARNS("GestureMgr") << "Gesture " << item_id << " existed when it shouldn't" << LL_ENDL;
+
+ self.stopGesture(old_gesture);
+ delete old_gesture;
+ old_gesture = NULL;
+ }
+ self.mActive.erase(item_id);
+ }
}
}
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp
index 9dca509262..e7bc2a9268 100644
--- a/indra/newview/llgroupactions.cpp
+++ b/indra/newview/llgroupactions.cpp
@@ -196,7 +196,7 @@ LLFetchLeaveGroupData* gFetchLeaveGroupData = NULL;
// static
void LLGroupActions::search()
{
- LLFloaterReg::showInstance("search", LLSD().with("category", "groups"));
+ LLFloaterReg::showInstance("search");
}
// static
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index fa7deb78f8..c101033a5d 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -138,6 +138,8 @@ bool LLCanCache::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
LLInventoryValidationInfo::LLInventoryValidationInfo():
mFatalErrorCount(0),
mWarningCount(0),
+ mLoopCount(0),
+ mOrphanedCount(0),
mInitialized(false),
mFatalNoRootFolder(false),
mFatalNoLibraryRootFolder(false),
@@ -147,7 +149,10 @@ LLInventoryValidationInfo::LLInventoryValidationInfo():
void LLInventoryValidationInfo::toOstream(std::ostream& os) const
{
- os << "mFatalErrorCount " << mFatalErrorCount << " mWarningCount " << mWarningCount;
+ os << "mFatalErrorCount " << mFatalErrorCount
+ << " mWarningCount " << mWarningCount
+ << " mLoopCount " << mLoopCount
+ << " mOrphanedCount " << mOrphanedCount;
}
@@ -161,6 +166,8 @@ void LLInventoryValidationInfo::asLLSD(LLSD& sd) const
{
sd["fatal_error_count"] = mFatalErrorCount;
sd["warning_count"] = mWarningCount;
+ sd["loop_count"] = mLoopCount;
+ sd["orphaned_count"] = mOrphanedCount;
sd["initialized"] = mInitialized;
sd["missing_system_folders_count"] = LLSD::Integer(mMissingRequiredSystemFolders.size());
sd["fatal_no_root_folder"] = mFatalNoRootFolder;
@@ -335,21 +342,35 @@ const LLViewerInventoryCategory* LLInventoryModel::getFirstDescendantOf(const LL
return NULL;
}
-bool LLInventoryModel::getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const
+LLInventoryModel::EAnscestorResult LLInventoryModel::getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const
{
LLInventoryObject *object = getObject(object_id);
- while (object && object->getParentUUID().notNull())
- {
- LLInventoryObject *parent_object = getObject(object->getParentUUID());
+ if (!object)
+ {
+ LL_WARNS(LOG_INV) << "Unable to trace topmost ancestor, initial object " << object_id << " does not exist" << LL_ENDL;
+ return ANSCESTOR_MISSING;
+ }
+
+ std::set<LLUUID> object_ids{ object_id }; // loop protection
+ while (object->getParentUUID().notNull())
+ {
+ LLUUID parent_id = object->getParentUUID();
+ if (object_ids.find(parent_id) != object_ids.end())
+ {
+ LL_WARNS(LOG_INV) << "Detected a loop on an object " << parent_id << " when searching for ancestor of " << object_id << LL_ENDL;
+ return ANSCESTOR_LOOP;
+ }
+ object_ids.insert(parent_id);
+ LLInventoryObject *parent_object = getObject(parent_id);
if (!parent_object)
{
- LL_WARNS(LOG_INV) << "unable to trace topmost ancestor, missing item for uuid " << object->getParentUUID() << LL_ENDL;
- return false;
+ LL_WARNS(LOG_INV) << "unable to trace topmost ancestor of " << object_id << ", missing item for uuid " << parent_id << LL_ENDL;
+ return ANSCESTOR_MISSING;
}
object = parent_object;
}
result = object->getUUID();
- return true;
+ return ANSCESTOR_OK;
}
// Get the object by id. Returns NULL if not found.
@@ -2944,42 +2965,69 @@ bool LLInventoryModel::saveToFile(const std::string& filename,
LL_INFOS(LOG_INV) << "saving inventory to: (" << filename << ")" << LL_ENDL;
- llofstream fileXML(filename.c_str());
- if (!fileXML.is_open())
- {
- LL_WARNS(LOG_INV) << "unable to save inventory to: " << filename << LL_ENDL;
- return false;
- }
+ try
+ {
+ llofstream fileXML(filename.c_str());
+ if (!fileXML.is_open())
+ {
+ LL_WARNS(LOG_INV) << "Failed to open file. Unable to save inventory to: " << filename << LL_ENDL;
+ return false;
+ }
- LLSD cache_ver;
- cache_ver["inv_cache_version"] = sCurrentInvCacheVersion;
+ LLSD cache_ver;
+ cache_ver["inv_cache_version"] = sCurrentInvCacheVersion;
- fileXML << LLSDOStreamer<LLSDNotationFormatter>(cache_ver) << std::endl;
+ if (fileXML.fail())
+ {
+ LL_WARNS(LOG_INV) << "Failed to write cache version to file. Unable to save inventory to: " << filename << LL_ENDL;
+ return false;
+ }
- S32 count = categories.size();
- S32 cat_count = 0;
- S32 i;
- for(i = 0; i < count; ++i)
- {
- LLViewerInventoryCategory* cat = categories[i];
- if(cat->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN)
- {
- fileXML << LLSDOStreamer<LLSDNotationFormatter>(cat->exportLLSD()) << std::endl;
- cat_count++;
- }
- }
+ fileXML << LLSDOStreamer<LLSDNotationFormatter>(cache_ver) << std::endl;
- S32 it_count = items.size();
- for(i = 0; i < it_count; ++i)
- {
- fileXML << LLSDOStreamer<LLSDNotationFormatter>(items[i]->asLLSD()) << std::endl;
- }
+ S32 count = categories.size();
+ S32 cat_count = 0;
+ S32 i;
+ for (i = 0; i < count; ++i)
+ {
+ LLViewerInventoryCategory* cat = categories[i];
+ if (cat->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ fileXML << LLSDOStreamer<LLSDNotationFormatter>(cat->exportLLSD()) << std::endl;
+ cat_count++;
+ }
- fileXML.close();
+ if (fileXML.fail())
+ {
+ LL_WARNS(LOG_INV) << "Failed to write a folder to file. Unable to save inventory to: " << filename << LL_ENDL;
+ return false;
+ }
+ }
- LL_INFOS(LOG_INV) << "Inventory saved: " << cat_count << " categories, " << it_count << " items." << LL_ENDL;
+ S32 it_count = items.size();
+ for (i = 0; i < it_count; ++i)
+ {
+ fileXML << LLSDOStreamer<LLSDNotationFormatter>(items[i]->asLLSD()) << std::endl;
- return true;
+ if (fileXML.fail())
+ {
+ LL_WARNS(LOG_INV) << "Failed to write an item to file. Unable to save inventory to: " << filename << LL_ENDL;
+ return false;
+ }
+ }
+
+ fileXML.close();
+
+ LL_INFOS(LOG_INV) << "Inventory saved: " << cat_count << " categories, " << it_count << " items." << LL_ENDL;
+ }
+ catch (...)
+ {
+ LOG_UNHANDLED_EXCEPTION("");
+ LL_INFOS(LOG_INV) << "Failed to save inventory to: (" << filename << ")" << LL_ENDL;
+ return false;
+ }
+
+ return true;
}
// message handling functionality
@@ -3847,20 +3895,23 @@ void LLInventoryModel::dumpInventory() const
LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
{
LLPointer<LLInventoryValidationInfo> validation_info = new LLInventoryValidationInfo;
- S32 fatalities = 0;
+ S32 fatal_errs = 0;
S32 warnings = 0;
+ S32 loops = 0;
+ S32 orphaned = 0;
if (getRootFolderID().isNull())
{
LL_WARNS("Inventory") << "Fatal inventory corruption: no root folder id" << LL_ENDL;
validation_info->mFatalNoRootFolder = true;
- fatalities++;
+ fatal_errs++;
}
if (getLibraryRootFolderID().isNull())
{
+ // Probably shouldn't be a fatality, inventory can function without a library
LL_WARNS("Inventory") << "Fatal inventory corruption: no library root folder id" << LL_ENDL;
validation_info->mFatalNoLibraryRootFolder = true;
- fatalities++;
+ fatal_errs++;
}
if (mCategoryMap.size() + 1 != mParentChildCategoryTree.size())
@@ -3892,7 +3943,23 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
}
LLUUID topmost_ancestor_id;
// Will leave as null uuid on failure
- getObjectTopmostAncestor(cat_id, topmost_ancestor_id);
+ EAnscestorResult res = getObjectTopmostAncestor(cat_id, topmost_ancestor_id);
+ switch (res)
+ {
+ case ANSCESTOR_MISSING:
+ orphaned++;
+ break;
+ case ANSCESTOR_LOOP:
+ loops++;
+ break;
+ case ANSCESTOR_OK:
+ break;
+ default:
+ LL_WARNS("Inventory") << "Unknown ancestor error for " << cat_id << LL_ENDL;
+ warnings++;
+ break;
+ }
+
if (cat_id != cat->getUUID())
{
LL_WARNS("Inventory") << "cat id/index mismatch " << cat_id << " " << cat->getUUID() << LL_ENDL;
@@ -3992,8 +4059,8 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
// Topmost ancestor should be root or library.
LLUUID topmost_ancestor_id;
- bool found = getObjectTopmostAncestor(item_id, topmost_ancestor_id);
- if (!found)
+ EAnscestorResult found = getObjectTopmostAncestor(item_id, topmost_ancestor_id);
+ if (found != ANSCESTOR_OK)
{
LL_WARNS("Inventory") << "unable to find topmost ancestor for " << item_id << LL_ENDL;
warnings++;
@@ -4023,7 +4090,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
{
LL_WARNS("Inventory") << "cat " << cat_id << " name [" << cat->getName()
<< "] orphaned - no child cat array for alleged parent " << parent_id << LL_ENDL;
- warnings++;
+ orphaned++;
}
else
{
@@ -4041,6 +4108,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
{
LL_WARNS("Inventory") << "cat " << cat_id << " name [" << cat->getName()
<< "] orphaned - not found in child cat array of alleged parent " << parent_id << LL_ENDL;
+ orphaned++;
}
}
}
@@ -4049,7 +4117,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
LLFolderType::EType folder_type = cat->getPreferredType();
bool cat_is_in_library = false;
LLUUID topmost_id;
- if (getObjectTopmostAncestor(cat->getUUID(),topmost_id) && topmost_id == getLibraryRootFolderID())
+ if (getObjectTopmostAncestor(cat->getUUID(),topmost_id) == ANSCESTOR_OK && topmost_id == getLibraryRootFolderID())
{
cat_is_in_library = true;
}
@@ -4089,6 +4157,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
if (parent_id.isNull())
{
LL_WARNS("Inventory") << "item " << item_id << " name [" << item->getName() << "] has null parent id!" << LL_ENDL;
+ orphaned++;
}
else
{
@@ -4099,6 +4168,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
{
LL_WARNS("Inventory") << "item " << item_id << " name [" << item->getName()
<< "] orphaned - alleged parent has no child items list " << parent_id << LL_ENDL;
+ orphaned++;
}
else
{
@@ -4115,6 +4185,7 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
{
LL_WARNS("Inventory") << "item " << item_id << " name [" << item->getName()
<< "] orphaned - not found as child of alleged parent " << parent_id << LL_ENDL;
+ orphaned++;
}
}
@@ -4132,15 +4203,18 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
LL_WARNS("Inventory") << "link " << item->getUUID() << " type " << item->getActualType()
<< " missing backlink info at target_id " << target_id
<< LL_ENDL;
+ orphaned++;
}
// Links should have referents.
if (item->getActualType() == LLAssetType::AT_LINK && !target_item)
{
LL_WARNS("Inventory") << "broken item link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
+ orphaned++;
}
else if (item->getActualType() == LLAssetType::AT_LINK_FOLDER && !target_cat)
{
LL_WARNS("Inventory") << "broken folder link " << item->getName() << " id " << item->getUUID() << LL_ENDL;
+ orphaned++;
}
if (target_item && target_item->getIsLinkType())
{
@@ -4212,8 +4286,8 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
if (is_automatic)
{
LL_WARNS("Inventory") << "Fatal inventory corruption: cannot create system folder of type " << ft << LL_ENDL;
- fatalities++;
- validation_info->mMissingRequiredSystemFolders.insert(LLFolderType::EType(ft));
+ fatal_errs++;
+ validation_info->mMissingRequiredSystemFolders.insert(folder_type);
}
else
{
@@ -4224,8 +4298,20 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
else if (count_under_root > 1)
{
LL_WARNS("Inventory") << "Fatal inventory corruption: system folder type has excess copies under root, type " << ft << " count " << count_under_root << LL_ENDL;
- validation_info->mDuplicateRequiredSystemFolders.insert(LLFolderType::EType(ft));
- fatalities++;
+ validation_info->mDuplicateRequiredSystemFolders.insert(folder_type);
+ if (!is_automatic && folder_type != LLFolderType::FT_SETTINGS)
+ {
+ // It is a fatal problem or can lead to fatal problems for COF,
+ // outfits, trash and other non-automatic folders.
+ fatal_errs++;
+ }
+ else
+ {
+ // For automatic folders it's not a fatal issue and shouldn't
+ // break inventory or other functionality further
+ // Exception: FT_SETTINGS is not automatic, but only deserves a warning.
+ warnings++;
+ }
}
if (count_elsewhere > 0)
{
@@ -4251,11 +4337,13 @@ LLPointer<LLInventoryValidationInfo> LLInventoryModel::validate() const
}
// FIXME need to fail login and tell user to retry, contact support if problem persists.
- bool valid = (fatalities == 0);
- LL_INFOS("Inventory") << "Validate done, fatal errors: " << fatalities << ", warnings: " << warnings << ", valid: " << valid << LL_ENDL;
+ bool valid = (fatal_errs == 0);
+ LL_INFOS("Inventory") << "Validate done, fatal errors: " << fatal_errs << ", warnings: " << warnings << ", valid: " << valid << LL_ENDL;
- validation_info->mFatalErrorCount = fatalities;
+ validation_info->mFatalErrorCount = fatal_errs;
validation_info->mWarningCount = warnings;
+ validation_info->mLoopCount = loops;
+ validation_info->mOrphanedCount = orphaned;
return validation_info;
}
diff --git a/indra/newview/llinventorymodel.h b/indra/newview/llinventorymodel.h
index fdbc6426ad..85343cf95c 100644
--- a/indra/newview/llinventorymodel.h
+++ b/indra/newview/llinventorymodel.h
@@ -68,6 +68,8 @@ public:
S32 mFatalErrorCount;
S32 mWarningCount;
+ S32 mLoopCount; // Presence of folders whose ansestors loop onto themselves
+ S32 mOrphanedCount; // Missing or orphaned items, links and folders
bool mInitialized;
bool mFatalNoRootFolder;
bool mFatalNoLibraryRootFolder;
@@ -283,9 +285,14 @@ public:
// Check if one object has a parent chain up to the category specified by UUID.
BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id) const;
-
+
+ enum EAnscestorResult{
+ ANSCESTOR_OK = 0,
+ ANSCESTOR_MISSING = 1,
+ ANSCESTOR_LOOP = 2,
+ };
// Follow parent chain to the top.
- bool getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const;
+ EAnscestorResult getObjectTopmostAncestor(const LLUUID& object_id, LLUUID& result) const;
//--------------------------------------------------------------------
// Find
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp
index c1e5e5faed..d3ba18525b 100644
--- a/indra/newview/llkeyconflict.cpp
+++ b/indra/newview/llkeyconflict.cpp
@@ -411,8 +411,16 @@ void LLKeyConflictHandler::loadFromSettings(ESourceMode load_mode)
filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, filename_default);
if (!gDirUtilp->fileExists(filename) || !loadFromSettings(load_mode, filename, &mControlsMap))
{
- // mind placeholders
- mControlsMap.insert(mDefaultsMap.begin(), mDefaultsMap.end());
+ // Mind placeholders
+ // Do not use mControlsMap.insert(mDefaultsMap) since mControlsMap has
+ // placeholders that won't be added over(to) by insert.
+ // Or instead move generatePlaceholders call to be after copying
+ control_map_t::iterator iter = mDefaultsMap.begin();
+ while (iter != mDefaultsMap.end())
+ {
+ mControlsMap[iter->first].mKeyBind = iter->second.mKeyBind;
+ iter++;
+ }
}
}
mLoadMode = load_mode;
@@ -575,6 +583,8 @@ void LLKeyConflictHandler::saveToSettings(bool temporary)
break;
}
+ keys.xml_version.set(keybindings_xml_version, true);
+
if (temporary)
{
// write to temporary xml and use it for gViewerInput
@@ -736,9 +746,9 @@ void LLKeyConflictHandler::resetToDefault(const std::string &control_name)
resetToDefaultAndResolve(control_name, false);
}
-void LLKeyConflictHandler::resetToDefaults(ESourceMode mode)
+void LLKeyConflictHandler::resetToDefaultsAndResolve()
{
- if (mode == MODE_SAVED_SETTINGS)
+ if (mLoadMode == MODE_SAVED_SETTINGS)
{
control_map_t::iterator iter = mControlsMap.begin();
control_map_t::iterator end = mControlsMap.end();
@@ -751,8 +761,16 @@ void LLKeyConflictHandler::resetToDefaults(ESourceMode mode)
else
{
mControlsMap.clear();
- generatePlaceholders(mode);
+
+ // Set key combinations.
+ // Copy from mDefaultsMap before doing generatePlaceholders, otherwise
+ // insert() will fail to add some keys into pre-existing values from
+ // generatePlaceholders()
mControlsMap.insert(mDefaultsMap.begin(), mDefaultsMap.end());
+
+ // Set conflict masks and mark functions (un)assignable
+ generatePlaceholders(mLoadMode);
+
}
mHasUnsavedChanges = true;
@@ -762,7 +780,7 @@ void LLKeyConflictHandler::resetToDefaults()
{
if (!empty())
{
- resetToDefaults(mLoadMode);
+ resetToDefaultsAndResolve();
}
else
{
@@ -772,7 +790,7 @@ void LLKeyConflictHandler::resetToDefaults()
// 3. We are loading 'current' only to replace it
// but it is reliable and works Todo: consider optimizing.
loadFromSettings(mLoadMode);
- resetToDefaults(mLoadMode);
+ resetToDefaultsAndResolve();
}
}
@@ -805,7 +823,7 @@ void LLKeyConflictHandler::resetKeyboardBindings()
void LLKeyConflictHandler::generatePlaceholders(ESourceMode load_mode)
{
- // These controls are meant to cause conflicts when user tries to assign same control somewhere else
+ // These placeholders are meant to cause conflict resolution when user tries to assign same control somewhere else
// also this can be used to pre-record controls that should not conflict or to assign conflict groups/masks
if (load_mode == MODE_FIRST_PERSON)
@@ -865,24 +883,60 @@ void LLKeyConflictHandler::generatePlaceholders(ESourceMode load_mode)
registerTemporaryControl("spin_around_ccw_sitting");
registerTemporaryControl("spin_around_cw_sitting");
}
+
+
+ // Special case, mouse clicks passed to scripts have 'lowest' piority
+ // thus do not conflict, everything else has a chance before them
+ // also in ML they have highest priority, but only when script-grabbed,
+ // thus do not conflict
+ // (see AGENT_CONTROL_ML_LBUTTON_DOWN and CONTROL_LBUTTON_DOWN_INDEX)
+ LLKeyConflict *type_data = &mControlsMap[script_mouse_handler_name];
+ type_data->mAssignable = true;
+ type_data->mConflictMask = U32_MAX - CONFLICT_LMOUSE;
}
-bool LLKeyConflictHandler::removeConflicts(const LLKeyData &data, const U32 &conlict_mask)
+bool LLKeyConflictHandler::removeConflicts(const LLKeyData &data, U32 conlict_mask)
{
if (conlict_mask == CONFLICT_NOTHING)
{
// Can't conflict
return true;
}
+
+ if (data.mMouse == CLICK_LEFT
+ && data.mMask == MASK_NONE
+ && data.mKey == KEY_NONE)
+ {
+ if ((conlict_mask & CONFLICT_LMOUSE) == 0)
+ {
+ // Can't conflict
+ return true;
+ }
+ else
+ {
+ // simplify conflict mask
+ conlict_mask = CONFLICT_LMOUSE;
+ }
+ }
+ else
+ {
+ // simplify conflict mask
+ conlict_mask &= ~CONFLICT_LMOUSE;
+ }
+
std::map<std::string, S32> conflict_list;
control_map_t::iterator cntrl_iter = mControlsMap.begin();
control_map_t::iterator cntrl_end = mControlsMap.end();
for (; cntrl_iter != cntrl_end; ++cntrl_iter)
{
+ const U32 cmp_mask = cntrl_iter->second.mConflictMask;
+ if ((cmp_mask & conlict_mask) == 0)
+ {
+ // can't conflict
+ continue;
+ }
S32 index = cntrl_iter->second.mKeyBind.findKeyData(data);
- if (index >= 0
- && cntrl_iter->second.mConflictMask != CONFLICT_NOTHING
- && (cntrl_iter->second.mConflictMask & conlict_mask) != 0)
+ if (index >= 0)
{
if (cntrl_iter->second.mAssignable)
{
diff --git a/indra/newview/llkeyconflict.h b/indra/newview/llkeyconflict.h
index 2926ca3aeb..23c1adf1e4 100644
--- a/indra/newview/llkeyconflict.h
+++ b/indra/newview/llkeyconflict.h
@@ -66,6 +66,7 @@ public:
};
const U32 CONFLICT_NOTHING = 0;
+ const U32 CONFLICT_LMOUSE = 0x1 << 1;
// at the moment this just means that key will conflict with everything that is identical
const U32 CONFLICT_ANY = U32_MAX;
@@ -128,23 +129,24 @@ public:
// resets current mode to defaults
void resetToDefaults();
- bool empty() { return mControlsMap.empty(); }
+ bool empty() const { return mControlsMap.empty(); }
void clear();
// reloads bindings from last valid user's xml or from default xml
// to keyboard's handler
static void resetKeyboardBindings();
- bool hasUnsavedChanges() { return mHasUnsavedChanges; }
+ bool hasUnsavedChanges() const { return mHasUnsavedChanges; }
void setLoadMode(ESourceMode mode) { mLoadMode = mode; }
- ESourceMode getLoadMode() { return mLoadMode; }
+ ESourceMode getLoadMode() const { return mLoadMode; }
private:
void resetToDefaultAndResolve(const std::string &control_name, bool ignore_conflicts);
- void resetToDefaults(ESourceMode mode);
+ void resetToDefaultsAndResolve();
// at the moment these kind of control is not savable, but takes part in conflict resolution
void registerTemporaryControl(const std::string &control_name, EMouseClickType mouse_ind, KEY key, MASK mask, U32 conflict_mask);
+ // conflict mask 0 means that any conflicts will be ignored
void registerTemporaryControl(const std::string &control_name, U32 conflict_mask = 0);
typedef std::map<std::string, LLKeyConflict> control_map_t;
@@ -152,7 +154,7 @@ private:
bool loadFromSettings(const ESourceMode &load_mode, const std::string &filename, control_map_t *destination);
void generatePlaceholders(ESourceMode load_mode); //E.x. non-assignable values
// returns false in case user is trying to reuse control that can't be reassigned
- bool removeConflicts(const LLKeyData &data, const U32 &conlict_mask);
+ bool removeConflicts(const LLKeyData &data, U32 conlict_mask);
// removes flags and removes temporary file, returns 'true' if file was removed
bool clearUnsavedChanges();
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index e81d2cc082..a3d0eb5796 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -61,6 +61,7 @@
#include "lltrans.h"
#include <boost/scoped_ptr.hpp>
+#include <boost/regex.hpp>
#include <sstream>
const S32 LOGIN_MAX_RETRIES = 0; // Viewer should not autmatically retry login
@@ -165,13 +166,12 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
//requested_options.append("inventory-meat");
//requested_options.append("inventory-skel-targets");
#if (!defined LL_MINIMIAL_REQUESTED_OPTIONS)
- if(FALSE == gSavedSettings.getBOOL("NoInventoryLibrary"))
- {
- requested_options.append("inventory-lib-root");
- requested_options.append("inventory-lib-owner");
- requested_options.append("inventory-skel-lib");
+
+ // Not requesting library will trigger mFatalNoLibraryRootFolder
+ requested_options.append("inventory-lib-root");
+ requested_options.append("inventory-lib-owner");
+ requested_options.append("inventory-skel-lib");
// requested_options.append("inventory-meat-lib");
- }
requested_options.append("initial-outfit");
requested_options.append("gestures");
@@ -225,8 +225,9 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
request_params["id0"] = mSerialNumber;
request_params["host_id"] = gSavedSettings.getString("HostID");
request_params["extended_errors"] = true; // request message_id and message_args
+ request_params["token"] = "";
- // log request_params _before_ adding the credentials
+ // log request_params _before_ adding the credentials or sensitive MFA hash data
LL_DEBUGS("LLLogin") << "Login parameters: " << LLSDOStreamer<LLSDNotationFormatter>(request_params) << LL_ENDL;
// Copy the credentials into the request after logging the rest
@@ -239,6 +240,33 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
request_params[it->first] = it->second;
}
+ std::string mfa_hash = gSavedSettings.getString("MFAHash"); //non-persistent to enable testing
+ std::string grid(LLGridManager::getInstance()->getGridId());
+ std::string user_id = user_credential->userID();
+ if (gSecAPIHandler)
+ {
+ if (mfa_hash.empty())
+ {
+ // normal execution, mfa_hash was not set from debug setting so load from protected store
+ LLSD data_map = gSecAPIHandler->getProtectedData("mfa_hash", grid);
+ if (data_map.isMap() && data_map.has(user_id))
+ {
+ mfa_hash = data_map[user_id].asString();
+ }
+ }
+ else
+ {
+ // SL-16888 the mfa_hash is being overridden for testing so save it for consistency for future login requests
+ gSecAPIHandler->addToProtectedMap("mfa_hash", grid, user_id, mfa_hash);
+ }
+ }
+ else
+ {
+ LL_WARNS() << "unable to access protected store for mfa_hash" << LL_ENDL;
+ }
+
+ request_params["mfa_hash"] = mfa_hash;
+
// Specify desired timeout/retry options
LLSD http_params;
F32 srv_timeout = llclamp(gSavedSettings.getF32("LoginSRVTimeout"), LOGIN_SRV_TIMEOUT_MIN, LOGIN_SRV_TIMEOUT_MAX);
@@ -251,6 +279,11 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
mRequestData["params"] = request_params;
mRequestData["options"] = requested_options;
mRequestData["http_params"] = http_params;
+#if LL_RELEASE_FOR_DOWNLOAD
+ mRequestData["wait_for_updater"] = !gSavedSettings.getBOOL("CmdLineSkipUpdater") && !LLAppViewer::instance()->isUpdaterMissing();
+#else
+ mRequestData["wait_for_updater"] = false;
+#endif
}
bool LLLoginInstance::handleLoginEvent(const LLSD& event)
@@ -407,6 +440,38 @@ void LLLoginInstance::handleLoginFailure(const LLSD& event)
boost::bind(&LLLoginInstance::syncWithUpdater, this, resp, _1, _2));
}
}
+ else if(reason_response == "mfa_challenge")
+ {
+ LL_DEBUGS("LLLogin") << " MFA challenge" << LL_ENDL;
+
+ if (gViewerWindow)
+ {
+ gViewerWindow->setShowProgress(FALSE);
+ }
+
+ LLSD args(llsd::map( "MESSAGE", LLTrans::getString(response["message_id"]) ));
+ LLSD payload;
+ LLNotificationsUtil::add("PromptMFAToken", args, payload, [=](LLSD const & notif, LLSD const & response) {
+ bool continue_clicked = response["continue"].asBoolean();
+ std::string token = response["token"].asString();
+ LL_DEBUGS("LLLogin") << "PromptMFAToken: response: " << response << " continue_clicked" << continue_clicked << LL_ENDL;
+
+ // strip out whitespace - SL-17034/BUG-231938
+ token = boost::regex_replace(token, boost::regex("\\s"), "");
+
+ if (continue_clicked && !token.empty())
+ {
+ LL_INFOS("LLLogin") << "PromptMFAToken: token submitted" << LL_ENDL;
+
+ // Set the request data to true and retry login.
+ mRequestData["params"]["token"] = token;
+ reconnect();
+ } else {
+ LL_INFOS("LLLogin") << "PromptMFAToken: no token, attemptComplete" << LL_ENDL;
+ attemptComplete();
+ }
+ });
+ }
else if( reason_response == "key"
|| reason_response == "presence"
|| reason_response == "connect"
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 5393d0b0b7..9142aadab9 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -1146,6 +1146,11 @@ void LLMediaCtrl::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event)
}
else
{
+ // Media might be blocked, waiting for a file,
+ // send an empty response to unblock it
+ const std::vector<std::string> empty_response;
+ self->sendPickFileResponse(empty_response);
+
LLNotificationsUtil::add("MediaFileDownloadUnsupported");
}
};
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index c7f56de4ed..859d987fc3 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -180,7 +180,6 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp)
mPreviewLOD = 0;
mModelLoader = NULL;
mMaxTriangleLimit = 0;
- mMinTriangleLimit = 0;
mDirty = false;
mGenLOD = false;
mLoading = false;
@@ -1287,7 +1286,14 @@ F32 LLModelPreview::genMeshOptimizerPerModel(LLModel *base_model, LLModel *targe
F32 result_error = 0; // how far from original the model is, 1 == 100%
S32 new_indices = 0;
- target_indices = llclamp(llfloor(size_indices / indices_decimator), 3, (S32)size_indices); // leave at least one triangle
+ if (indices_decimator > 0)
+ {
+ target_indices = llclamp(llfloor(size_indices / indices_decimator), 3, (S32)size_indices); // leave at least one triangle
+ }
+ else // indices_decimator can be zero for error_threshold based calculations
+ {
+ target_indices = 3;
+ }
new_indices = LLMeshOptimizer::simplifyU32(
output_indices,
combined_indices,
@@ -1491,7 +1497,14 @@ F32 LLModelPreview::genMeshOptimizerPerFace(LLModel *base_model, LLModel *target
F32 result_error = 0; // how far from original the model is, 1 == 100%
S32 new_indices = 0;
- target_indices = llclamp(llfloor(size_indices / indices_decimator), 3, (S32)size_indices); // leave at least one triangle
+ if (indices_decimator > 0)
+ {
+ target_indices = llclamp(llfloor(size_indices / indices_decimator), 3, (S32)size_indices); // leave at least one triangle
+ }
+ else
+ {
+ target_indices = 3;
+ }
new_indices = LLMeshOptimizer::simplify(
output,
face.mIndices,
@@ -1628,11 +1641,13 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
}
// meshoptimizer doesn't use triangle limit, it uses indices limit, so convert it to aproximate ratio
- indices_decimator = (F32)base_triangle_count / triangle_limit;
+ // triangle_limit can be 0.
+ indices_decimator = (F32)base_triangle_count / llmax(triangle_limit, 1.f);
}
else
{
- lod_error_threshold = mFMP->childGetValue("lod_error_threshold_" + lod_name[which_lod]).asReal();
+ // UI shows 0 to 100%, but meshoptimizer works with 0 to 1
+ lod_error_threshold = mFMP->childGetValue("lod_error_threshold_" + lod_name[which_lod]).asReal() / 100.f;
}
}
else
@@ -1643,7 +1658,6 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
}
mMaxTriangleLimit = base_triangle_count;
- mMinTriangleLimit = mBaseModel.size();
// Build models
@@ -1668,8 +1682,8 @@ void LLModelPreview::genMeshOptimizerLODs(S32 which_lod, S32 meshopt_mode, U32 d
}
}
- mRequestedTriangleCount[lod] = llmax(mMinTriangleLimit, (S32)triangle_limit);
- mRequestedErrorThreshold[lod] = lod_error_threshold;
+ mRequestedTriangleCount[lod] = triangle_limit;
+ mRequestedErrorThreshold[lod] = lod_error_threshold * 100;
mRequestedLoDMode[lod] = lod_mode;
mModel[lod].clear();
@@ -2003,7 +2017,6 @@ void LLModelPreview::updateStatusMessages()
if (mMaxTriangleLimit == 0)
{
mMaxTriangleLimit = total_tris[LLModel::LOD_HIGH];
- mMinTriangleLimit = mUploadData.size();
}
mHasDegenerate = false;
@@ -2506,7 +2519,6 @@ void LLModelPreview::updateLodControls(S32 lod)
LLSpinCtrl* limit = mFMP->getChild<LLSpinCtrl>("lod_triangle_limit_" + lod_name[lod]);
limit->setMaxValue(mMaxTriangleLimit);
- limit->setMinValue(mMinTriangleLimit);
limit->forceSetValue(mRequestedTriangleCount[lod]);
threshold->forceSetValue(mRequestedErrorThreshold[lod]);
@@ -2519,7 +2531,6 @@ void LLModelPreview::updateLodControls(S32 lod)
threshold->setVisible(false);
limit->setMaxValue(mMaxTriangleLimit);
- limit->setMinValue(mMinTriangleLimit);
limit->setIncrement(llmax((U32)1, mMaxTriangleLimit / 32));
}
else
@@ -2802,7 +2813,9 @@ void LLModelPreview::lookupLODModelFiles(S32 lod)
std::string lod_filename = mLODFile[LLModel::LOD_HIGH];
std::string ext = ".dae";
- std::string::size_type i = lod_filename.rfind(ext);
+ std::string lod_filename_lower(lod_filename);
+ LLStringUtil::toLower(lod_filename_lower);
+ std::string::size_type i = lod_filename_lower.rfind(ext);
if (i != std::string::npos)
{
lod_filename.replace(i, lod_filename.size() - ext.size(), getLodSuffix(next_lod) + ext);
diff --git a/indra/newview/llmodelpreview.h b/indra/newview/llmodelpreview.h
index f78f476810..9e32215e6a 100644
--- a/indra/newview/llmodelpreview.h
+++ b/indra/newview/llmodelpreview.h
@@ -290,10 +290,6 @@ protected:
// Amount of triangles in original(base) model
U32 mMaxTriangleLimit;
- // Minimum amount of allowed triangles in lod for spin cntrl.
- // Leave at least one triangle per model.
- S32 mMinTriangleLimit;
-
LLMeshUploadThread::instance_list mUploadData;
std::set<LLViewerFetchedTexture * > mTextureSet;
diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp
index 52be75072c..01a4ab0455 100644
--- a/indra/newview/llpanelgroupcreate.cpp
+++ b/indra/newview/llpanelgroupcreate.cpp
@@ -104,7 +104,7 @@ void LLPanelGroupCreate::onOpen(const LLSD& key)
// populate list
addMembershipRow("Base");
addMembershipRow("Premium");
- addMembershipRow("Premium Plus");
+ addMembershipRow("Premium_Plus");
addMembershipRow("Internal");// Present only if you are already in one, needed for testing
S32 cost = LLAgentBenefitsMgr::current().getCreateGroupCost();
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 5997d522c4..e424d6b5f5 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1090,9 +1090,9 @@ void LLPanelPeople::onGroupLimitInfo()
args["MAX_BASIC"] = max_basic;
args["MAX_PREMIUM"] = max_premium;
- if (LLAgentBenefitsMgr::has("Premium Plus"))
+ if (LLAgentBenefitsMgr::has("Premium_Plus"))
{
- S32 max_premium_plus = LLAgentBenefitsMgr::get("Premium Plus").getGroupMembershipLimit();
+ S32 max_premium_plus = LLAgentBenefitsMgr::get("Premium_Plus").getGroupMembershipLimit();
args["MAX_PREMIUM_PLUS"] = max_premium_plus;
LLNotificationsUtil::add("GroupLimitInfoPlus", args);
}
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index cb4c07a417..852b39f442 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -61,7 +61,7 @@
#define CAP_SERVICE_NAVMESH_STATUS "NavMeshGenerationStatus"
-#define CAP_SERVICE_OBJECT_LINKSETS "ObjectNavMeshProperties"
+#define CAP_SERVICE_OBJECT_LINKSETS "RegionObjects"
#define CAP_SERVICE_TERRAIN_LINKSETS "TerrainNavMeshProperties"
#define CAP_SERVICE_CHARACTERS "CharacterProperties"
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 061ecad099..39cdb6fb04 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -1029,7 +1029,6 @@ void LLPreviewGesture::finishInventoryUpload(LLUUID itemId, LLUUID newAssetId)
// active map with the new pointer.
if (LLGestureMgr::instance().isGestureActive(itemId))
{
- //*TODO: This is crashing for some reason. Fix it.
// Active gesture edited from menu.
LLGestureMgr::instance().replaceGesture(itemId, newAssetId);
gInventory.notifyObservers();
diff --git a/indra/newview/llsearchableui.cpp b/indra/newview/llsearchableui.cpp
index 1119e80005..620bbdfcdf 100644
--- a/indra/newview/llsearchableui.cpp
+++ b/indra/newview/llsearchableui.cpp
@@ -132,8 +132,11 @@ void ll::statusbar::SearchableItem::setNotHighlighted( )
{
mCtrl->setHighlighted( false );
- if( mWasHiddenBySearch )
- mMenu->setVisible( TRUE );
+ if (mWasHiddenBySearch)
+ {
+ mMenu->setVisible(TRUE);
+ mWasHiddenBySearch = false;
+ }
}
}
diff --git a/indra/newview/llsecapi.h b/indra/newview/llsecapi.h
index e1320375ab..d8831fee93 100644
--- a/indra/newview/llsecapi.h
+++ b/indra/newview/llsecapi.h
@@ -485,6 +485,9 @@ public:
const std::string& data_id,
const std::string& map_elem)=0;
+ // ensure protected store's map is written to storage
+ virtual void syncProtectedMap() = 0;
+
public:
virtual LLPointer<LLCredential> createCredential(const std::string& grid,
const LLSD& identifier,
diff --git a/indra/newview/llsechandler_basic.cpp b/indra/newview/llsechandler_basic.cpp
index 6b06abaf99..d0da3387ec 100644
--- a/indra/newview/llsechandler_basic.cpp
+++ b/indra/newview/llsechandler_basic.cpp
@@ -1608,6 +1608,11 @@ void LLSecAPIBasicHandler::removeFromProtectedMap(const std::string& data_type,
}
}
+void LLSecAPIBasicHandler::syncProtectedMap()
+{
+ // TODO - consider unifing these functions
+ _writeProtectedData();
+}
//
// Create a credential object from an identifier and authenticator. credentials are
// per grid.
diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h
index 17e9f72f07..bd1a8f640c 100644
--- a/indra/newview/llsechandler_basic.h
+++ b/indra/newview/llsechandler_basic.h
@@ -278,6 +278,9 @@ public:
const std::string& data_id,
const std::string& map_elem);
+ // ensure protected store's map is written to storage
+ virtual void syncProtectedMap();
+
// credential management routines
virtual LLPointer<LLCredential> createCredential(const std::string& grid,
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 99d7c81c8d..3ab7707df8 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -852,6 +852,7 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
LLSpatialPartition::~LLSpatialPartition()
{
+ cleanup();
}
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index bb6ad5d8fb..98b2bc703b 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -134,6 +134,7 @@
#include "llproxy.h"
#include "llproductinforequest.h"
#include "llqueryflags.h"
+#include "llsecapi.h"
#include "llselectmgr.h"
#include "llsky.h"
#include "llstatview.h"
@@ -1116,10 +1117,10 @@ bool idle_startup()
}
else
{
- if (reason_response != "tos")
+ if (reason_response != "tos" && reason_response != "mfa_challenge")
{
- // Don't pop up a notification in the TOS case because
- // LLFloaterTOS::onCancel() already scolded the user.
+ // Don't pop up a notification in the TOS or MFA cases because
+ // the specialized floater has already scolded the user.
std::string error_code;
if(response.has("errorcode"))
{
@@ -1496,19 +1497,7 @@ bool idle_startup()
display_startup();
// start up the ThreadPool we'll use for textures et al.
- {
- LLSD poolSizes{ gSavedSettings.getLLSD("ThreadPoolSizes") };
- LLSD sizeSpec{ poolSizes["General"] };
- LLSD::Integer poolSize{ sizeSpec.isInteger()? sizeSpec.asInteger() : 3 };
- LL_DEBUGS("ThreadPool") << "Instantiating General pool with "
- << poolSize << " threads" << LL_ENDL;
- // We don't want anyone, especially the main thread, to have to block
- // due to this ThreadPool being full.
- auto pool = new LL::ThreadPool("General", poolSize, 1024*1024);
- pool->start();
- // Once we start shutting down, destroy this ThreadPool.
- LLAppViewer::instance()->onCleanup([pool](){ delete pool; });
- }
+ LLAppViewer::instance()->initGeneralThread();
// Initialize global class data needed for surfaces (i.e. textures)
LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL;
@@ -2248,10 +2237,6 @@ bool idle_startup()
// Have the agent start watching the friends list so we can update proxies
gAgent.observeFriends();
- if (gSavedSettings.getBOOL("LoginAsGod"))
- {
- gAgent.requestEnterGodMode();
- }
// Start automatic replay if the flag is set.
if (gSavedSettings.getBOOL("StatsAutoRun") || gAgentPilot.getReplaySession())
@@ -2379,8 +2364,31 @@ void show_release_notes_if_required()
&& gSavedSettings.getBOOL("UpdaterShowReleaseNotes")
&& !gSavedSettings.getBOOL("FirstLoginThisInstall"))
{
- LLSD info(LLAppViewer::instance()->getViewerInfo());
- LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+
+#if LL_RELEASE_FOR_DOWNLOAD
+ if (!gSavedSettings.getBOOL("CmdLineSkipUpdater")
+ && !LLAppViewer::instance()->isUpdaterMissing())
+ {
+ // Instantiate a "relnotes" listener which assumes any arriving event
+ // is the release notes URL string. Since "relnotes" is an
+ // LLEventMailDrop, this listener will be invoked whether or not the
+ // URL has already been posted. If so, it will fire immediately;
+ // otherwise it will fire whenever the URL is (later) posted. Either
+ // way, it will display the release notes as soon as the URL becomes
+ // available.
+ LLEventPumps::instance().obtain("relnotes").listen(
+ "showrelnotes",
+ [](const LLSD& url) {
+ LLWeb::loadURLInternal(url.asString());
+ return false;
+ });
+ }
+ else
+#endif // LL_RELEASE_FOR_DOWNLOAD
+ {
+ LLSD info(LLAppViewer::instance()->getViewerInfo());
+ LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+ }
release_notes_shown = true;
}
}
@@ -2732,19 +2740,34 @@ void LLStartUp::loadInitialOutfit( const std::string& outfit_folder_name,
gAgentAvatarp->setSex(gender);
- // try to find the outfit - if not there, create some default
- // wearables.
+ // try to find the requested outfit or folder
+
+ // -- check for existing outfit in My Outfits
+ bool do_copy = false;
LLUUID cat_id = findDescendentCategoryIDByName(
- gInventory.getLibraryRootFolderID(),
+ gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS),
outfit_folder_name);
+
+ // -- check for existing folder in Library
if (cat_id.isNull())
{
+ cat_id = findDescendentCategoryIDByName(
+ gInventory.getLibraryRootFolderID(),
+ outfit_folder_name);
+ if (!cat_id.isNull())
+ {
+ do_copy = true;
+ }
+ }
+
+ if (cat_id.isNull())
+ {
+ // -- final fallback: create standard wearables
LL_DEBUGS() << "standard wearables" << LL_ENDL;
gAgentWearables.createStandardWearables();
}
else
{
- bool do_copy = true;
bool do_append = false;
LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
// Need to fetch cof contents before we can wear.
@@ -2842,7 +2865,7 @@ void reset_login()
gAgentWearables.cleanup();
gAgentCamera.cleanup();
gAgent.cleanup();
- LLWorld::getInstance()->destroyClass();
+ LLWorld::getInstance()->resetClass();
if ( gViewerWindow )
{ // Hide menus and normal buttons
@@ -3310,12 +3333,6 @@ bool init_benefits(LLSD& response)
succ = false;
}
- // FIXME PREMIUM - for testing if login does not yet provide Premium Plus. Should be removed thereafter.
- //if (succ && !LLAgentBenefitsMgr::has("Premium Plus"))
- //{
- // LLAgentBenefitsMgr::init("Premium Plus", packages_sd["Premium"]["benefits"]);
- // llassert(LLAgentBenefitsMgr::has("Premium Plus"));
- //}
return succ;
}
@@ -3619,6 +3636,19 @@ bool process_login_success_response()
}
}
+ std::string fake_initial_outfit_name = gSavedSettings.getString("FakeInitialOutfitName");
+ if (!fake_initial_outfit_name.empty())
+ {
+ gAgent.setFirstLogin(TRUE);
+ sInitialOutfit = fake_initial_outfit_name;
+ if (sInitialOutfitGender.empty())
+ {
+ sInitialOutfitGender = "female"; // just guess, will get overridden when outfit is worn anyway.
+ }
+
+ LL_WARNS() << "Faking first-time login with initial outfit " << sInitialOutfit << LL_ENDL;
+ }
+
// set the location of the Agent Appearance service, from which we can request
// avatar baked textures if they are supported by the current region
std::string agent_appearance_url = response["agent_appearance_service"];
@@ -3642,6 +3672,17 @@ bool process_login_success_response()
LLViewerMedia::getInstance()->openIDSetup(openid_url, openid_token);
}
+
+ // Only save mfa_hash for future logins if the user wants their info remembered.
+ if(response.has("mfa_hash") && gSavedSettings.getBOOL("RememberUser") && gSavedSettings.getBOOL("RememberPassword"))
+ {
+ std::string grid(LLGridManager::getInstance()->getGridId());
+ std::string user_id(gUserCredential->userID());
+ gSecAPIHandler->addToProtectedMap("mfa_hash", grid, user_id, response["mfa_hash"]);
+ // TODO(brad) - related to SL-17223 consider building a better interface that sync's automatically
+ gSecAPIHandler->syncProtectedMap();
+ }
+
bool success = false;
// JC: gesture loading done below, when we have an asset system
// in place. Don't delete/clear gUserCredentials until then.
diff --git a/indra/newview/lltoolcomp.cpp b/indra/newview/lltoolcomp.cpp
index ba328f27c4..6d54a3770c 100644
--- a/indra/newview/lltoolcomp.cpp
+++ b/indra/newview/lltoolcomp.cpp
@@ -44,6 +44,7 @@
#include "lltoolmgr.h"
#include "lltoolselectrect.h"
#include "lltoolplacer.h"
+#include "llviewerinput.h"
#include "llviewermenu.h"
#include "llviewerobject.h"
#include "llviewerwindow.h"
@@ -745,7 +746,7 @@ BOOL LLToolCompGun::handleHover(S32 x, S32 y, MASK mask)
BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
{
// if the left button is grabbed, don't put up the pie menu
- if (gAgent.leftButtonGrabbed())
+ if (gAgent.leftButtonGrabbed() && gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
{
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
return FALSE;
@@ -762,7 +763,7 @@ BOOL LLToolCompGun::handleMouseDown(S32 x, S32 y, MASK mask)
BOOL LLToolCompGun::handleDoubleClick(S32 x, S32 y, MASK mask)
{
// if the left button is grabbed, don't put up the pie menu
- if (gAgent.leftButtonGrabbed())
+ if (gAgent.leftButtonGrabbed() && gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
{
gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
return FALSE;
@@ -796,7 +797,10 @@ BOOL LLToolCompGun::handleRightMouseDown(S32 x, S32 y, MASK mask)
BOOL LLToolCompGun::handleMouseUp(S32 x, S32 y, MASK mask)
{
- gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
+ if (gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
+ }
setCurrentTool( (LLTool*) mGun );
return TRUE;
}
diff --git a/indra/newview/lltoolgrab.cpp b/indra/newview/lltoolgrab.cpp
index 6216899dc6..897f8c1e5f 100644
--- a/indra/newview/lltoolgrab.cpp
+++ b/indra/newview/lltoolgrab.cpp
@@ -51,6 +51,7 @@
#include "lltoolmgr.h"
#include "lltoolpie.h"
#include "llviewercamera.h"
+#include "llviewerinput.h"
#include "llviewerobject.h"
#include "llviewerobjectlist.h"
#include "llviewerregion.h"
@@ -140,7 +141,6 @@ BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
LL_INFOS() << "LLToolGrab handleMouseDown" << LL_ENDL;
}
- // call the base class to propogate info to sim
LLTool::handleMouseDown(x, y, mask);
// leftButtonGrabbed() checks if controls are reserved by scripts, but does not take masks into account
@@ -150,6 +150,19 @@ BOOL LLToolGrabBase::handleMouseDown(S32 x, S32 y, MASK mask)
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ TRUE);
}
mClickedInMouselook = gAgentCamera.cameraMouselook();
+
+ if (mClickedInMouselook && gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
+ {
+ // LLToolCompGun::handleMouseDown handles the event if ML controls are grabed,
+ // but LLToolGrabBase is often the end point for mouselook clicks if ML controls
+ // are not grabbed and LLToolGrabBase::handleMouseDown consumes the event,
+ // so send clicks from here.
+ // We are sending specifically CONTROL_LBUTTON_DOWN instead of _ML_ version.
+ gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
+
+ // Todo: LLToolGrabBase probably shouldn't consume the event if there is nothing
+ // to grab in Mouselook, it intercepts handling in scanMouse
+ }
return TRUE;
}
@@ -953,9 +966,18 @@ void LLToolGrabBase::handleHoverFailed(S32 x, S32 y, MASK mask)
BOOL LLToolGrabBase::handleMouseUp(S32 x, S32 y, MASK mask)
{
- // call the base class to propogate info to sim
LLTool::handleMouseUp(x, y, mask);
+ if (gAgentCamera.cameraMouselook() && gViewerInput.isLMouseHandlingDefault(MODE_FIRST_PERSON))
+ {
+ // LLToolCompGun::handleMouseUp handles the event if ML controls are grabed,
+ // but LLToolGrabBase is often the end point for mouselook clicks if ML controls
+ // are not grabbed and LToolGrabBase::handleMouseUp consumes the event,
+ // so send clicks from here.
+ // We are sending specifically CONTROL_LBUTTON_UP instead of _ML_ version.
+ gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
+ }
+
if( hasMouseCapture() )
{
setMouseCapture( FALSE );
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index b4736841d6..43deac60d9 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -394,8 +394,9 @@ BOOL LLToolPie::handleLeftClickPick()
gFocusMgr.setKeyboardFocus(NULL);
}
- BOOL touchable = (object && object->flagHandleTouch())
- || (parent && parent->flagHandleTouch());
+ bool touchable = object
+ && (object->getClickAction() != CLICK_ACTION_DISABLED)
+ && (object->flagHandleTouch() || (parent && parent->flagHandleTouch()));
// Switch to grab tool if physical or triggerable
if (object &&
@@ -656,6 +657,12 @@ bool LLToolPie::teleportToClickedLocation()
LLViewerObject* objp = mHoverPick.getObject();
LLViewerObject* parentp = objp ? objp->getRootEdit() : NULL;
+ if (objp && (objp->getAvatar() == gAgentAvatarp || objp == gAgentAvatarp)) // ex: nametag
+ {
+ // Don't teleport to self, teleporting to other avatars is fine
+ return false;
+ }
+
bool is_in_world = mHoverPick.mObjectID.notNull() && objp && !objp->isHUDAttachment();
bool is_land = mHoverPick.mPickType == LLPickInfo::PICK_LAND;
bool pos_non_zero = !mHoverPick.mPosGlobal.isExactlyZero();
@@ -750,7 +757,7 @@ BOOL LLToolPie::handleHover(S32 x, S32 y, MASK mask)
else if (!mMouseOutsideSlop
&& mMouseButtonDown
// disable camera steering if click on land is not used for moving
- && gViewerInput.isMouseBindUsed(CLICK_LEFT))
+ && gViewerInput.isMouseBindUsed(CLICK_LEFT, MASK_NONE, MODE_THIRD_PERSON))
{
S32 delta_x = x - mMouseDownX;
S32 delta_y = y - mMouseDownY;
diff --git a/indra/newview/llviewerassetstorage.cpp b/indra/newview/llviewerassetstorage.cpp
index 6aa1273174..70065cb5a0 100644
--- a/indra/newview/llviewerassetstorage.cpp
+++ b/indra/newview/llviewerassetstorage.cpp
@@ -353,7 +353,7 @@ void LLViewerAssetStorage::checkForTimeouts()
// Restore requests
LLCoprocedureManager* manager = LLCoprocedureManager::getInstance();
while (mCoroWaitList.size() > 0
- && manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < LLCoprocedureManager::DEFAULT_QUEUE_SIZE)
+ && manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < (LLCoprocedureManager::DEFAULT_QUEUE_SIZE - 1))
{
CoroWaitList &request = mCoroWaitList.front();
@@ -425,13 +425,14 @@ void LLViewerAssetStorage::queueRequestHttp(
if (!duplicate)
{
// Coroutine buffer has fixed size (synchronization buffer, so we have no alternatives), so buffer any request above limit
- if (LLCoprocedureManager::instance().count(VIEWER_ASSET_STORAGE_CORO_POOL) < LLCoprocedureManager::DEFAULT_QUEUE_SIZE)
+ LLCoprocedureManager* manager = LLCoprocedureManager::getInstance();
+ if (manager->count(VIEWER_ASSET_STORAGE_CORO_POOL) < (LLCoprocedureManager::DEFAULT_QUEUE_SIZE - 1))
{
bool with_http = true;
bool is_temp = false;
LLViewerAssetStatsFF::record_enqueue(atype, with_http, is_temp);
- LLCoprocedureManager::instance().enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL, "LLViewerAssetStorage::assetRequestCoro",
+ manager->enqueueCoprocedure(VIEWER_ASSET_STORAGE_CORO_POOL, "LLViewerAssetStorage::assetRequestCoro",
boost::bind(&LLViewerAssetStorage::assetRequestCoro, this, req, uuid, atype, callback, user_data));
}
else
diff --git a/indra/newview/llviewerinput.cpp b/indra/newview/llviewerinput.cpp
index 94ec534732..43b9cd90bd 100644
--- a/indra/newview/llviewerinput.cpp
+++ b/indra/newview/llviewerinput.cpp
@@ -816,13 +816,20 @@ bool toggle_enable_media(EKeystate s)
bool walk_to(EKeystate s)
{
- if (KEYSTATE_DOWN != s) return true;
+ if (KEYSTATE_DOWN != s)
+ {
+ // teleport/walk is usually on mouseclick, mouseclick needs
+ // to let AGENT_CONTROL_LBUTTON_UP happen if teleport didn't,
+ // so return false, but if it causes issues, do some kind of
+ // "return !has_teleported"
+ return false;
+ }
return LLToolPie::getInstance()->walkToClickedLocation();
}
bool teleport_to(EKeystate s)
{
- if (KEYSTATE_DOWN != s) return true;
+ if (KEYSTATE_DOWN != s) return false;
return LLToolPie::getInstance()->teleportToClickedLocation();
}
@@ -850,7 +857,47 @@ bool voice_follow_key(EKeystate s)
return false;
}
-bool agen_control_lbutton_handle(EKeystate s)
+bool script_trigger_lbutton(EKeystate s)
+{
+ // Check for script overriding/expecting left mouse button.
+ // Note that this does not pass event further and depends onto mouselook.
+ // Checks CONTROL_ML_LBUTTON_DOWN_INDEX for mouselook,
+ // CONTROL_LBUTTON_DOWN_INDEX for normal camera
+ if (gAgent.leftButtonGrabbed())
+ {
+ bool mouselook = gAgentCamera.cameraMouselook();
+ switch (s)
+ {
+ case KEYSTATE_DOWN:
+ if (mouselook)
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_DOWN);
+ }
+ else
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_DOWN);
+ }
+ return true;
+ case KEYSTATE_UP:
+ if (mouselook)
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_ML_LBUTTON_UP);
+ }
+ else
+ {
+ gAgent.setControlFlags(AGENT_CONTROL_LBUTTON_UP);
+ }
+ return true;
+ default:
+ break;
+ }
+ }
+ return false;
+}
+
+// Used by scripts, for overriding/handling left mouse button
+// see mControlsTakenCount
+bool agent_control_lbutton_handle(EKeystate s)
{
switch (s)
{
@@ -922,6 +969,7 @@ REGISTER_KEYBOARD_ACTION("teleport_to", teleport_to);
REGISTER_KEYBOARD_ACTION("walk_to", walk_to);
REGISTER_KEYBOARD_GLOBAL_ACTION("toggle_voice", toggle_voice);
REGISTER_KEYBOARD_GLOBAL_ACTION("voice_follow_key", voice_follow_key);
+REGISTER_KEYBOARD_ACTION(script_mouse_handler_name, script_trigger_lbutton);
#undef REGISTER_KEYBOARD_ACTION
LLViewerInput::LLViewerInput()
@@ -1193,6 +1241,20 @@ BOOL LLViewerInput::bindMouse(const S32 mode, const EMouseClickType mouse, const
typedef boost::function<bool(EKeystate)> function_t;
function_t function = NULL;
+ if (mouse == CLICK_LEFT
+ && mask == MASK_NONE
+ && function_name == script_mouse_handler_name)
+ {
+ // Special case
+ // Left click has script overrides and by default
+ // is handled via agent_control_lbutton as last option
+ // In case of mouselook and present overrides it has highest
+ // priority even over UI and is handled in LLToolCompGun::handleMouseDown
+ // so just mark it as having default handler
+ mLMouseDefaultHandling[mode] = true;
+ return TRUE;
+ }
+
LLKeybindFunctionData* result = LLKeyboardActionRegistry::getValue(function_name);
if (result)
{
@@ -1269,7 +1331,8 @@ LLViewerInput::Keys::Keys()
: first_person("first_person"),
third_person("third_person"),
sitting("sitting"),
- edit_avatar("edit_avatar")
+ edit_avatar("edit_avatar"),
+ xml_version("xml_version", 0)
{}
void LLViewerInput::resetBindings()
@@ -1280,6 +1343,7 @@ void LLViewerInput::resetBindings()
mGlobalMouseBindings[i].clear();
mKeyBindings[i].clear();
mMouseBindings[i].clear();
+ mLMouseDefaultHandling[i] = false;
}
}
@@ -1298,6 +1362,65 @@ S32 LLViewerInput::loadBindingsXML(const std::string& filename)
binding_count += loadBindingMode(keys.third_person, MODE_THIRD_PERSON);
binding_count += loadBindingMode(keys.sitting, MODE_SITTING);
binding_count += loadBindingMode(keys.edit_avatar, MODE_EDIT_AVATAR);
+
+ // verify version
+ if (keys.xml_version < 1)
+ {
+ // updating from a version that was not aware of LMouse bindings
+ for (S32 i = 0; i < MODE_COUNT; i++)
+ {
+ mLMouseDefaultHandling[i] = true;
+ }
+
+ // fix missing values
+ KeyBinding mouse_binding;
+ mouse_binding.key = "";
+ mouse_binding.mask = "NONE";
+ mouse_binding.mouse = "LMB";
+ mouse_binding.command = script_mouse_handler_name;
+
+ if (keys.third_person.isProvided())
+ {
+ keys.third_person.bindings.add(mouse_binding);
+ }
+
+ if (keys.first_person.isProvided())
+ {
+ keys.first_person.bindings.add(mouse_binding);
+ }
+
+ if (keys.sitting.isProvided())
+ {
+ keys.sitting.bindings.add(mouse_binding);
+ }
+
+ if (keys.edit_avatar.isProvided())
+ {
+ keys.edit_avatar.bindings.add(mouse_binding);
+ }
+
+ // fix version
+ keys.xml_version.set(keybindings_xml_version, true);
+
+ // Write the resulting XML to file
+ LLXMLNodePtr output_node = new LLXMLNode("keys", false);
+ LLXUIParser write_parser;
+ write_parser.writeXUI(output_node, keys);
+
+ if (!output_node->isNull())
+ {
+ // file in app_settings is supposed to be up to date
+ // this is only for the file from user_settings
+ LL_INFOS("ViewerInput") << "Updating file " << filename << " to a newer version" << LL_ENDL;
+ LLFILE *fp = LLFile::fopen(filename, "w");
+ if (fp != NULL)
+ {
+ LLXMLNode::writeHeaderToFile(fp);
+ output_node->writeToFile(fp);
+ fclose(fp);
+ }
+ }
+ }
}
return binding_count;
}
@@ -1469,17 +1592,6 @@ bool LLViewerInput::scanKey(KEY key, BOOL key_down, BOOL key_up, BOOL key_level)
bool res = scanKey(mKeyBindings[mode], mKeyBindings[mode].size(), key, mask, key_down, key_up, key_level, repeat);
- if (!res && agent_control_lbutton.canHandle(CLICK_NONE, key, mask))
- {
- if (key_down && !repeat)
- {
- res = agen_control_lbutton_handle(KEYSTATE_DOWN);
- }
- if (key_up)
- {
- res = agen_control_lbutton_handle(KEYSTATE_UP);
- }
- }
return res;
}
@@ -1603,29 +1715,36 @@ bool LLViewerInput::scanMouse(EMouseClickType click, EMouseState state) const
bool res = false;
S32 mode = getMode();
MASK mask = gKeyboard->currentMask(TRUE);
-
- // By default mouse clicks require exact mask
- // Todo: support for mIgnoreMasks because some functions like teleports
- // expect to be canceled, but for voice it's prefered to ignore mask.
res = scanMouse(mMouseBindings[mode], mMouseBindings[mode].size(), click, mask, state, false);
- // no user defined actions found or those actions can't handle the key/button, handle control if nessesary
- if (!res && agent_control_lbutton.canHandle(click, KEY_NONE, mask))
+
+ // No user defined actions found or those actions can't handle the key/button,
+ // so handle CONTROL_LBUTTON if nessesary.
+ //
+ // Default handling for MODE_FIRST_PERSON is in LLToolCompGun::handleMouseDown,
+ // and sends AGENT_CONTROL_ML_LBUTTON_DOWN, but it only applies if ML controls
+ // are leftButtonGrabbed(), send a normal click otherwise.
+
+ if (!res
+ && mLMouseDefaultHandling[mode]
+ && (mode != MODE_FIRST_PERSON || !gAgent.leftButtonGrabbed())
+ && (click == CLICK_LEFT || click == CLICK_DOUBLELEFT)
+ )
{
switch (state)
{
case MOUSE_STATE_DOWN:
- agen_control_lbutton_handle(KEYSTATE_DOWN);
+ agent_control_lbutton_handle(KEYSTATE_DOWN);
res = true;
break;
case MOUSE_STATE_CLICK:
// might not work best with some functions,
// but some function need specific states too specifically
- agen_control_lbutton_handle(KEYSTATE_DOWN);
- agen_control_lbutton_handle(KEYSTATE_UP);
+ agent_control_lbutton_handle(KEYSTATE_DOWN);
+ agent_control_lbutton_handle(KEYSTATE_UP);
res = true;
break;
case MOUSE_STATE_UP:
- agen_control_lbutton_handle(KEYSTATE_UP);
+ agent_control_lbutton_handle(KEYSTATE_UP);
res = true;
break;
default:
@@ -1655,7 +1774,7 @@ void LLViewerInput::scanMouse()
}
}
-bool LLViewerInput::isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode)
+bool LLViewerInput::isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const
{
S32 size = mMouseBindings[mode].size();
for (S32 index = 0; index < size; index++)
diff --git a/indra/newview/llviewerinput.h b/indra/newview/llviewerinput.h
index ca70ac76bf..52e95e2168 100644
--- a/indra/newview/llviewerinput.h
+++ b/indra/newview/llviewerinput.h
@@ -31,6 +31,8 @@
#include "llinitparam.h"
const S32 MAX_KEY_BINDINGS = 128; // was 60
+const S32 keybindings_xml_version = 1;
+const std::string script_mouse_handler_name = "script_trigger_lbutton";
class LLNamedFunction
{
@@ -100,7 +102,7 @@ public:
third_person,
sitting,
edit_avatar;
-
+ Optional<S32> xml_version; // 'xml', because 'version' appears to be reserved
Keys();
};
@@ -131,7 +133,8 @@ public:
BOOL handleMouse(LLWindow *window_impl, LLCoordGL pos, MASK mask, EMouseClickType clicktype, BOOL down);
void scanMouse();
- bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask = MASK_NONE, const S32 mode = MODE_THIRD_PERSON);
+ bool isMouseBindUsed(const EMouseClickType mouse, const MASK mask, const S32 mode) const;
+ bool isLMouseHandlingDefault(const S32 mode) const { return mLMouseDefaultHandling[mode]; }
private:
bool scanKey(const std::vector<LLKeyboardBinding> &binding,
@@ -171,6 +174,7 @@ private:
// to send what we think function wants based on collection of bools (mKeyRepeated, mKeyLevel, mKeyDown)
std::vector<LLKeyboardBinding> mKeyBindings[MODE_COUNT];
std::vector<LLMouseBinding> mMouseBindings[MODE_COUNT];
+ bool mLMouseDefaultHandling[MODE_COUNT]; // Due to having special priority
// keybindings that do not consume event and are handled earlier, before floaters
std::vector<LLKeyboardBinding> mGlobalKeyBindings[MODE_COUNT];
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 27d8df28c3..812f804ea9 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -3289,10 +3289,6 @@ void LLViewerMediaImpl::handleMediaEvent(LLPluginClassMedia* plugin, LLPluginCla
case LLViewerMediaObserver::MEDIA_EVENT_FILE_DOWNLOAD:
{
LL_DEBUGS("Media") << "Media event - file download requested - filename is " << plugin->getFileDownloadFilename() << LL_ENDL;
-
- //unblock media plugin
- const std::vector<std::string> empty_response;
- plugin->sendPickFileResponse(empty_response);
}
break;
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a2d3f2c0cf..a95636ff23 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1278,6 +1278,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
mesgsys->getBinaryDataFast(_PREHASH_ObjectData, _PREHASH_ObjectData, data, length, block_num, MAX_OBJECT_BINARY_DATA_SIZE);
mTotalCRC = crc;
+ // Might need to update mSourceMuted here to properly pick up new radius
mSoundCutOffRadius = cutoff;
// Owner ID used for sound muting or particle system muting
@@ -5884,7 +5885,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
else if (flags & LL_SOUND_FLAG_STOP)
{
// Just shut off the sound
- mAudioSourcep->play(LLUUID::null);
+ mAudioSourcep->stop();
}
return;
}
@@ -5923,7 +5924,7 @@ void LLViewerObject::setAttachedSound(const LLUUID &audio_uuid, const LLUUID& ow
mAudioSourcep->setQueueSounds(queue);
if(!queue) // stop any current sound first to avoid "farts of doom" (SL-1541) -MG
{
- mAudioSourcep->play(LLUUID::null);
+ mAudioSourcep->stop();
}
// Play this sound if region maturity permits
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 5eda75753e..12624ec3a2 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -564,7 +564,7 @@ void LLViewerOctreeGroup::rebound()
group->setState(SKIP_FRUSTUM_CHECK);
}
- else if (mOctreeNode->isLeaf())
+ else if (mOctreeNode->getChildCount() == 0)
{ //copy object bounding box if this is a leaf
boundObjects(TRUE, mExtents[0], mExtents[1]);
mBounds[0] = mObjectBounds[0];
@@ -1325,8 +1325,13 @@ LLViewerOctreePartition::LLViewerOctreePartition() :
LLViewerOctreePartition::~LLViewerOctreePartition()
{
- delete mOctree;
- mOctree = NULL;
+ cleanup();
+}
+
+void LLViewerOctreePartition::cleanup()
+{
+ delete mOctree;
+ mOctree = nullptr;
}
BOOL LLViewerOctreePartition::isOcclusionEnabled()
@@ -1334,6 +1339,7 @@ BOOL LLViewerOctreePartition::isOcclusionEnabled()
return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2;
}
+
//-----------------------------------------------------------------------------------
//class LLViewerOctreeCull definitions
//-----------------------------------------------------------------------------------
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 11ba7e4f1e..e6974b0f84 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -352,6 +352,10 @@ public:
virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0;
BOOL isOcclusionEnabled();
+protected:
+ // MUST call from destructor of any derived classes (SL-17276)
+ void cleanup();
+
public:
U32 mPartitionType;
U32 mDrawableType;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 501148a112..67ad72e997 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3060,12 +3060,12 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
capabilityNames.append("ObjectAnimation");
capabilityNames.append("ObjectMedia");
capabilityNames.append("ObjectMediaNavigate");
- capabilityNames.append("ObjectNavMeshProperties");
capabilityNames.append("ParcelPropertiesUpdate");
capabilityNames.append("ParcelVoiceInfoRequest");
capabilityNames.append("ProductInfoRequest");
capabilityNames.append("ProvisionVoiceAccountRequest");
capabilityNames.append("ReadOfflineMsgs"); // Requires to respond reliably: AcceptFriendship, AcceptGroupInvite, DeclineFriendship, DeclineGroupInvite
+ capabilityNames.append("RegionObjects");
capabilityNames.append("RemoteParcelRequest");
capabilityNames.append("RenderMaterials");
capabilityNames.append("RequestTextureDownload");
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index a8e0f576ca..086b433c72 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -426,6 +426,13 @@ void LLViewerShaderMgr::setShaders()
return;
}
+ if (!gGLManager.mHasRequirements)
+ {
+ // Viewer will show 'hardware requirements' warning later
+ LL_INFOS("ShaderLoading") << "Not supported hardware/software" << LL_ENDL;
+ return;
+ }
+
static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16);
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1);
@@ -1876,6 +1883,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->clearPermutations();
shader->addPermutation("USE_VERTEX_COLOR", "1");
+ shader->addPermutation("HAS_ALPHA_MASK", "1");
shader->addPermutation("USE_INDEXED_TEX", "1");
if (use_sun_shadow)
{
@@ -1952,6 +1960,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader->clearPermutations();
shader->addPermutation("USE_INDEXED_TEX", "1");
shader->addPermutation("FOR_IMPOSTOR", "1");
+ shader->addPermutation("HAS_ALPHA_MASK", "1");
shader->addPermutation("USE_VERTEX_COLOR", "1");
if (rigged)
{
@@ -2023,6 +2032,7 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
shader[i]->addPermutation("USE_INDEXED_TEX", "1");
shader[i]->addPermutation("WATER_FOG", "1");
shader[i]->addPermutation("USE_VERTEX_COLOR", "1");
+ shader[i]->addPermutation("HAS_ALPHA_MASK", "1");
if (use_sun_shadow)
{
shader[i]->addPermutation("HAS_SHADOW", "1");
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 5ac792aad0..71a5de1176 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -1854,9 +1854,18 @@ bool LLUIImageList::initFromFile()
preloadUIImage(image.name, file_name, image.use_mips, image.scale, image.clip, image.scale_type);
}
- if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload"))
+ if (!gSavedSettings.getBOOL("NoPreload"))
{
- gTextureList.decodeAllImages(10.f); // decode preloaded images
+ if (cur_pass == PASS_DECODE_NOW)
+ {
+ // init fetching and decoding of preloaded images
+ gTextureList.decodeAllImages(9.f);
+ }
+ else
+ {
+ // decodeAllImages needs two passes to refresh stats and priorities on second pass
+ gTextureList.decodeAllImages(1.f);
+ }
}
}
return true;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 47d612ab9a..65010f1985 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1914,12 +1914,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
p.ignore_pixel_depth,
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
- if (!LLViewerShaderMgr::sInitialized)
- { //immediately initialize shaders
- LLViewerShaderMgr::sInitialized = TRUE;
- LLViewerShaderMgr::instance()->setShaders();
- }
-
if (NULL == mWindow)
{
LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate"));
@@ -1938,6 +1932,12 @@ LLViewerWindow::LLViewerWindow(const Params& p)
#endif
LLAppViewer::instance()->fastQuit(1);
}
+ else if (!LLViewerShaderMgr::sInitialized)
+ {
+ //immediately initialize shaders
+ LLViewerShaderMgr::sInitialized = TRUE;
+ LLViewerShaderMgr::instance()->setShaders();
+ }
if (!LLAppViewer::instance()->restoreErrorTrap())
{
@@ -2282,6 +2282,9 @@ void LLViewerWindow::initWorldUI()
LLPanelStandStopFlying* panel_stand_stop_flying = LLPanelStandStopFlying::getInstance();
panel_ssf_container->addChild(panel_stand_stop_flying);
+ LLPanelHideBeacon* panel_hide_beacon = LLPanelHideBeacon::getInstance();
+ panel_ssf_container->addChild(panel_hide_beacon);
+
panel_ssf_container->setVisible(TRUE);
LLMenuOptionPathfindingRebakeNavmesh::getInstance()->initialize();
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index ed947a7eaa..add2ade0a1 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1334,7 +1334,8 @@ void LLVOAvatar::calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- S32 box_detail = gSavedSettings.getS32("AvatarBoundingBoxComplexity");
+ static LLCachedControl<S32> box_detail_cache(gSavedSettings, "AvatarBoundingBoxComplexity");
+ S32 box_detail = box_detail_cache;
if (getOverallAppearance() != AOA_NORMAL)
{
if (isControlAvatar())
@@ -2539,10 +2540,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
{
LL_INFOS() << "Warning! Idle on dead avatar" << LL_ENDL;
return;
- }
+ }
+ static LLCachedControl<bool> disable_all_render_types(gSavedSettings, "DisableAllRenderTypes");
if (!(gPipeline.hasRenderType(mIsControlAvatar ? LLPipeline::RENDER_TYPE_CONTROL_AV : LLPipeline::RENDER_TYPE_AVATAR))
- && !(gSavedSettings.getBOOL("DisableAllRenderTypes")) && !isSelf())
+ && !disable_all_render_types && !isSelf())
{
return;
}
@@ -2680,7 +2682,8 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled)
// Don't render the user's own voice visualizer when in mouselook, or when opening the mic is disabled.
if(isSelf())
{
- if(gAgentCamera.cameraMouselook() || gSavedSettings.getBOOL("VoiceDisableMic"))
+ static LLCachedControl<bool> voice_disable_mic(gSavedSettings, "VoiceDisableMic");
+ if(gAgentCamera.cameraMouselook() || voice_disable_mic)
{
render_visualizer = false;
}
@@ -2816,22 +2819,22 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
- LLViewerObject* attached_object = attachment_iter->get();
- BOOL visibleAttachment = visible || (attached_object && attached_object->mDrawable.notNull() &&
- !(attached_object->mDrawable->getSpatialBridge() &&
- attached_object->mDrawable->getSpatialBridge()->getRadius() < 2.0));
+ LLViewerObject* attached_object = attachment_iter->get();
+ if (!attached_object
+ || attached_object->isDead()
+ || !attachment->getValid()
+ || attached_object->mDrawable.isNull())
+ {
+ continue;
+ }
+
+ LLSpatialBridge* bridge = attached_object->mDrawable->getSpatialBridge();
- if (visibleAttachment
- && attached_object
- && !attached_object->isDead()
- && attachment->getValid()
- && attached_object->mDrawable.notNull())
+ if (visible || !(bridge && bridge->getRadius() < 2.0))
{
-
//override rigged attachments' octree spatial extents with this avatar's bounding box
- LLSpatialBridge* bridge = attached_object->mDrawable->getSpatialBridge();
bool rigged = false;
- if (bridge && !bridge->isDead())
+ if (bridge)
{
//transform avatar bounding box into attachment's coordinate frame
LLVector4a extents[2];
@@ -2844,11 +2847,23 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
}
}
-
- attached_object->mDrawable->makeActive();
- attached_object->mDrawable->updateXform(TRUE);
-
- if (bridge && !bridge->isDead())
+ // if selecting any attachments, update all of them as non-damped
+ if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() && LLSelectMgr::getInstance()->getSelection()->isAttachment())
+ {
+ gPipeline.updateMoveNormalAsync(attached_object->mDrawable);
+ }
+ else
+ {
+ // Note: SL-17415; While most objects follow joints,
+ // some objects get position updates from server
+ gPipeline.updateMoveDampedAsync(attached_object->mDrawable);
+ }
+
+ // override_bbox calls movePartition() and getSpatialPartition(),
+ // so bridge might no longer be valid, get it again.
+ // ex: animesh stops being an animesh
+ bridge = attached_object->mDrawable->getSpatialBridge();
+ if (bridge)
{
if (!rigged)
{
@@ -3181,11 +3196,14 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
}
const F32 time_visible = mTimeVisible.getElapsedTimeF32();
- const F32 NAME_SHOW_TIME = gSavedSettings.getF32("RenderNameShowTime"); // seconds
- const F32 FADE_DURATION = gSavedSettings.getF32("RenderNameFadeDuration"); // seconds
- BOOL visible_avatar = isVisible() || mNeedsAnimUpdate;
- BOOL visible_chat = gSavedSettings.getBOOL("UseChatBubbles") && (mChats.size() || mTyping);
- BOOL render_name = visible_chat ||
+
+ static LLCachedControl<F32> NAME_SHOW_TIME(gSavedSettings, "RenderNameShowTime"); // seconds
+ static LLCachedControl<F32> FADE_DURATION(gSavedSettings, "RenderNameFadeDuration"); // seconds
+ static LLCachedControl<bool> use_chat_bubbles(gSavedSettings, "UseChatBubbles");
+
+ bool visible_avatar = isVisible() || mNeedsAnimUpdate;
+ bool visible_chat = use_chat_bubbles && (mChats.size() || mTyping);
+ bool render_name = visible_chat ||
(visible_avatar &&
((sRenderName == RENDER_NAME_ALWAYS) ||
(sRenderName == RENDER_NAME_FADE && time_visible < NAME_SHOW_TIME)));
@@ -3193,10 +3211,11 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
// draw if we're specifically hiding our own name.
if (isSelf())
{
+ static LLCachedControl<bool> render_name_show_self(gSavedSettings, "RenderNameShowSelf");
+ static LLCachedControl<S32> name_tag_mode(gSavedSettings, "AvatarNameTagMode");
render_name = render_name
&& !gAgentCamera.cameraMouselook()
- && (visible_chat || (gSavedSettings.getBOOL("RenderNameShowSelf")
- && gSavedSettings.getS32("AvatarNameTagMode") ));
+ && (visible_chat || (render_name_show_self && name_tag_mode));
}
if ( !render_name )
@@ -3211,7 +3230,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
return;
}
- BOOL new_name = FALSE;
+ bool new_name = FALSE;
if (visible_chat != mVisibleChat)
{
mVisibleChat = visible_chat;
@@ -3276,7 +3295,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
idleUpdateNameTagAlpha(new_name, alpha);
}
-void LLVOAvatar::idleUpdateNameTagText(BOOL new_name)
+void LLVOAvatar::idleUpdateNameTagText(bool new_name)
{
LLNameValue *title = getNVPair("Title");
LLNameValue* firstname = getNVPair("FirstName");
@@ -3586,7 +3605,7 @@ void LLVOAvatar::idleUpdateNameTagPosition(const LLVector3& root_pos_last)
mNameText->setPositionAgent(name_position);
}
-void LLVOAvatar::idleUpdateNameTagAlpha(BOOL new_name, F32 alpha)
+void LLVOAvatar::idleUpdateNameTagAlpha(bool new_name, F32 alpha)
{
llassert(mNameText);
@@ -3729,7 +3748,8 @@ void LLVOAvatar::updateAppearanceMessageDebugText()
{
debug_line += llformat(" - cof: %d req: %d rcv:%d",
curr_cof_version, last_request_cof_version, last_received_cof_version);
- if (gSavedSettings.getBOOL("DebugForceAppearanceRequestFailure"))
+ static LLCachedControl<bool> debug_force_failure(gSavedSettings, "DebugForceAppearanceRequestFailure");
+ if (debug_force_failure)
{
debug_line += " FORCING ERRS";
}
@@ -5935,7 +5955,8 @@ BOOL LLVOAvatar::processSingleAnimationStateChange( const LLUUID& anim_id, BOOL
//}
//else
{
- LLUUID sound_id = LLUUID(gSavedSettings.getString("UISndTyping"));
+ static LLCachedControl<std::string> ui_snd_string(gSavedSettings, "UISndTyping");
+ LLUUID sound_id = LLUUID(ui_snd_string);
gAudiop->triggerSound(sound_id, getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_SFX, char_pos_global);
}
}
@@ -6003,7 +6024,7 @@ void LLVOAvatar::resetAnimations()
// animations.
LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
{
- BOOL use_new_walk_run = gSavedSettings.getBOOL("UseNewWalkRun");
+ static LLCachedControl<bool> use_new_walk_run(gSavedSettings, "UseNewWalkRun");
LLUUID result = id;
// start special case female walk for female avatars
@@ -8224,7 +8245,8 @@ BOOL LLVOAvatar::isFullyLoaded() const
bool LLVOAvatar::isTooComplex() const
{
bool too_complex;
- bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && gSavedSettings.getBOOL("AlwaysRenderFriends"));
+ static LLCachedControl<bool> always_render_friends(gSavedSettings, "AlwaysRenderFriends");
+ bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && always_render_friends);
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
@@ -9081,7 +9103,8 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
- bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
+ static LLCachedControl<bool> block_some_avatars(gSavedSettings, "BlockSomeAvatarAppearanceVisualParams");
+ bool drop_visual_params_debug = block_some_avatars && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
if( num_blocks > 1 && !drop_visual_params_debug)
{
//LL_DEBUGS("Avatar") << avString() << " handle visual params, num_blocks " << num_blocks << LL_ENDL;
@@ -9186,10 +9209,12 @@ bool resolve_appearance_version(const LLAppearanceMessageContents& contents, S32
void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
{
LL_DEBUGS("Avatar") << "starts" << LL_ENDL;
-
- bool enable_verbose_dumps = gSavedSettings.getBOOL("DebugAvatarAppearanceMessage");
+
+ static LLCachedControl<bool> enable_verbose_dumps(gSavedSettings, "DebugAvatarAppearanceMessage");
+ static LLCachedControl<bool> block_avatar_appearance_messages(gSavedSettings, "BlockAvatarAppearanceMessages");
+
std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_";
- if (gSavedSettings.getBOOL("BlockAvatarAppearanceMessages"))
+ if (block_avatar_appearance_messages)
{
LL_WARNS() << "Blocking AvatarAppearance message" << LL_ENDL;
return;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index ba67007fa9..3c3decaad6 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -282,9 +282,9 @@ public:
void idleUpdateLoadingEffect();
void idleUpdateWindEffect();
void idleUpdateNameTag(const LLVector3& root_pos_last);
- void idleUpdateNameTagText(BOOL new_name);
+ void idleUpdateNameTagText(bool new_name);
void idleUpdateNameTagPosition(const LLVector3& root_pos_last);
- void idleUpdateNameTagAlpha(BOOL new_name, F32 alpha);
+ void idleUpdateNameTagAlpha(bool new_name, F32 alpha);
LLColor4 getNameTagColor(bool is_friend);
void clearNameTag();
static void invalidateNameTag(const LLUUID& agent_id);
@@ -938,7 +938,7 @@ public:
void startTyping() { mTyping = TRUE; mTypingTimer.reset(); }
void stopTyping() { mTyping = FALSE; }
private:
- BOOL mVisibleChat;
+ bool mVisibleChat;
//--------------------------------------------------------------------
// Lip synch morphs
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index e10a9f9bcb..db8ad183f0 100644
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -632,6 +632,13 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
new LLVOCacheGroup(mOctree, this);
}
+LLVOCachePartition::~LLVOCachePartition()
+{
+ // SL-17276 make sure to do base class cleanup while this instance
+ // can still be treated as an LLVOCachePartition
+ cleanup();
+}
+
bool LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry)
{
llassert(entry->hasVOCacheEntry());
diff --git a/indra/newview/llvocache.h b/indra/newview/llvocache.h
index c510ff77fc..55a13d934d 100644
--- a/indra/newview/llvocache.h
+++ b/indra/newview/llvocache.h
@@ -189,6 +189,7 @@ class LLVOCachePartition : public LLViewerOctreePartition
{
public:
LLVOCachePartition(LLViewerRegion* regionp);
+ virtual ~LLVOCachePartition();
bool addEntry(LLViewerOctreeEntry* entry);
void removeEntry(LLViewerOctreeEntry* entry);
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a0d034850f..f7678f5f26 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -71,6 +71,8 @@
#include "llmediaentry.h"
#include "llmediadataclient.h"
#include "llmeshrepository.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
#include "llagent.h"
#include "llviewermediafocus.h"
#include "lldatapacker.h"
@@ -2991,6 +2993,17 @@ void LLVOVolume::mediaEvent(LLViewerMediaImpl *impl, LLPluginClassMedia* plugin,
}
}
break;
+
+ case LLViewerMediaObserver::MEDIA_EVENT_FILE_DOWNLOAD:
+ {
+ // Media might be blocked, waiting for a file,
+ // send an empty response to unblock it
+ const std::vector<std::string> empty_response;
+ plugin->sendPickFileResponse(empty_response);
+
+ LLNotificationsUtil::add("MediaFileDownloadUnsupported");
+ }
+ break;
default:
break;
@@ -5928,7 +5941,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
// for rigged set, add weights and disable alpha sorting (rigged items use depth buffer)
extra_mask |= LLVertexBuffer::MAP_WEIGHT4;
- alpha_sort = FALSE;
rigged = TRUE;
}
@@ -6183,8 +6195,11 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
if (rigged)
{
- //sort faces by things that break batches, including avatar and mesh id
- std::sort(faces, faces + face_count, CompareBatchBreakerRigged());
+ if (!distance_sort) // <--- alpha "sort" rigged faces by maintaining original draw order
+ {
+ //sort faces by things that break batches, including avatar and mesh id
+ std::sort(faces, faces + face_count, CompareBatchBreakerRigged());
+ }
}
else if (!distance_sort)
{
@@ -6219,11 +6234,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels;
}
- if (rigged)
- { //don't attempt distance sorting on rigged meshes, not likely to succeed and breaks batches
- distance_sort = FALSE;
- }
-
if (distance_sort)
{
buffer_index = -1;
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index b8f1ec35f6..c4d873dd22 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -199,19 +199,16 @@ std::string LLWeb::expandURLSubstitutions(const std::string &url,
// find the grid
std::string current_grid = LLGridManager::getInstance()->getGridId();
std::transform(current_grid.begin(), current_grid.end(), current_grid.begin(), ::tolower);
- if (current_grid == "agni")
+ if (current_grid == "damballah")
{
- substitution["GRID"] = "secondlife.com";
- }
- else if (current_grid == "damballah")
- {
- // Staging grid has its own naming scheme.
- substitution["GRID"] = "secondlife-staging.com";
- }
- else
- {
- substitution["GRID"] = llformat("%s.lindenlab.com", current_grid.c_str());
- }
+ // Staging grid has its own naming scheme.
+ substitution["GRID"] = "secondlife-staging.com";
+ }
+ else
+ {
+ substitution["GRID"] = "secondlife.com";
+ }
+
// expand all of the substitution strings and escape the url
std::string expanded_url = url;
LLStringUtil::format(expanded_url, substitution);
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 6746a3a902..8abb49fba8 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -113,7 +113,7 @@ LLWorld::LLWorld() :
}
-void LLWorld::destroyClass()
+void LLWorld::resetClass()
{
mHoleWaterObjects.clear();
gObjectList.destroy();
@@ -135,7 +135,6 @@ void LLWorld::destroyClass()
LLDrawable::incrementVisible();
LLSceneMonitor::deleteSingleton();
- LLWorld::deleteSingleton();
}
@@ -1200,6 +1199,16 @@ public:
return;
}
+ if (gDisconnected)
+ {
+ return;
+ }
+
+ if (!LLWorld::instanceExists())
+ {
+ return;
+ }
+
if (!input["body"].has("agent-id") ||
!input["body"].has("sim-ip-and-port") ||
!input["body"].has("seed-capability"))
@@ -1208,8 +1217,13 @@ public:
return;
}
- LLHost sim(input["body"]["sim-ip-and-port"].asString());
-
+ LLHost sim(input["body"]["sim-ip-and-port"].asString());
+ if (sim.isInvalid())
+ {
+ LL_WARNS() << "Got EstablishAgentCommunication with invalid host" << LL_ENDL;
+ return;
+ }
+
LLViewerRegion* regionp = LLWorld::getInstance()->getRegion(sim);
if (!regionp)
{
@@ -1218,7 +1232,7 @@ public:
return;
}
LL_DEBUGS("CrossingCaps") << "Calling setSeedCapability from LLEstablishAgentCommunication::post. Seed cap == "
- << input["body"]["seed-capability"] << LL_ENDL;
+ << input["body"]["seed-capability"] << " for region " << regionp->getRegionID() << LL_ENDL;
regionp->setSeedCapability(input["body"]["seed-capability"]);
}
};
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index 69f2df4203..5c43cdf4e2 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -64,7 +64,9 @@ class LLWorld : public LLSimpleton<LLWorld>
public:
LLWorld();
- void destroyClass();
+ // Clear any objects, regions
+ // Prepares class to be reused or destroyed
+ void resetClass();
LLViewerRegion* addRegion(const U64 &region_handle, const LLHost &host);
// safe to call if already present, does the "right thing" if
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index bc0d89f4ad..e142a40f1d 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -361,10 +361,12 @@ static LLCullResult* sCull = NULL;
void validate_framebuffer_object();
-
-bool addDeferredAttachments(LLRenderTarget& target)
+// Add color attachments for deferred rendering
+// target -- RenderTarget to add attachments to
+// for_impostor -- whether or not these render targets are for an impostor (if true, avoids implicit sRGB conversions)
+bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false)
{
- return target.addColorAttachment(GL_SRGB8_ALPHA8) && //specular
+ return target.addColorAttachment(for_impostor ? GL_RGBA : GL_SRGB8_ALPHA8) && //specular
target.addColorAttachment(GL_RGB10_A2); //normal+z
}
@@ -10996,14 +10998,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar)
if (!avatar->mImpostor.isComplete())
{
+ avatar->mImpostor.allocate(resX, resY, GL_RGBA, TRUE, FALSE);
+
if (LLPipeline::sRenderDeferred)
{
- avatar->mImpostor.allocate(resX,resY,GL_SRGB8_ALPHA8,TRUE,FALSE);
- addDeferredAttachments(avatar->mImpostor);
- }
- else
- {
- avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE);
+ addDeferredAttachments(avatar->mImpostor, true);
}
gGL.getTexUnit(0)->bind(&avatar->mImpostor);
diff --git a/indra/newview/skins/default/xui/de/strings.xml b/indra/newview/skins/default/xui/de/strings.xml
index f021e03dc7..ba26f721fe 100644
--- a/indra/newview/skins/default/xui/de/strings.xml
+++ b/indra/newview/skins/default/xui/de/strings.xml
@@ -5101,7 +5101,7 @@ Bitte überprüfen Sie http://status.secondlifegrid.net, um herauszufinden, ob e
<string name="PremiumMembership">
Premium
</string>
- <string name="Premium PlusMembership">
+ <string name="Premium_PlusMembership">
Premium Plus
</string>
<string name="DeleteItems">
diff --git a/indra/newview/skins/default/xui/en/control_table_contents_media.xml b/indra/newview/skins/default/xui/en/control_table_contents_media.xml
index ce5d3556b6..43e8d730cd 100644
--- a/indra/newview/skins/default/xui/en/control_table_contents_media.xml
+++ b/indra/newview/skins/default/xui/en/control_table_contents_media.xml
@@ -73,4 +73,14 @@
name="lst_action"
value="Start Gesture" />
</rows>
+ <rows
+ name="script_trigger_lbutton"
+ value="script_trigger_lbutton">
+ <columns
+ column="lst_action"
+ font="SansSerif"
+ halign="left"
+ name="lst_action"
+ value="Interact (Script LMB)" />
+ </rows>
</contents>
diff --git a/indra/newview/skins/default/xui/en/floater_associate_listing.xml b/indra/newview/skins/default/xui/en/floater_associate_listing.xml
index e019ed58dd..0f7ed24103 100644
--- a/indra/newview/skins/default/xui/en/floater_associate_listing.xml
+++ b/indra/newview/skins/default/xui/en/floater_associate_listing.xml
@@ -20,9 +20,10 @@
name="message">
Listing ID:
</text>
+ <!--listing_id is a positive S32-->
<line_editor
type="string"
- length="1"
+ max_length_bytes="10"
follows="top|right"
font="SansSerif"
height="20"
diff --git a/indra/newview/skins/default/xui/en/floater_mfa.xml b/indra/newview/skins/default/xui/en/floater_mfa.xml
new file mode 100644
index 0000000000..a649cc6d47
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_mfa.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ title="MFA Token Requred"
+ legacy_header_height="18"
+ can_minimize="false"
+ can_close="false"
+ height="110"
+ layout="topleft"
+ name="mfa_challenge"
+ help_topic="mfa_challenge"
+ width="550">
+ <text
+ type="string"
+ word_wrap="true"
+ length="1"
+ follows="top|left"
+ height="15"
+ layout="topleft"
+ left="10"
+ name="token_prompt_text"
+ top="20">
+ token prompt
+ </text>
+ <line_editor
+ follows="left|top|right"
+ height="19"
+ layout="topleft"
+ bottom_delta="40"
+ name="token_edit"
+ width="100" />
+ <button
+ follows="top|left"
+ height="20"
+ label="Continue"
+ layout="topleft"
+ left="10"
+ name="continue_btn"
+ bottom_delta="30"
+ width="64" />
+ <button
+ follows="top|left"
+ height="20"
+ label="Cancel"
+ layout="topleft"
+ left_pad="5"
+ name="cancel_btn"
+ bottom_delta="0"
+ width="64" />
+</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 1bfa459310..e499ddbc2f 100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -34,7 +34,7 @@
<string name="mesh_status_missing_lod">Missing required level of detail.</string>
<string name="mesh_status_invalid_material_list">LOD materials are not a subset of reference model.</string>
<string name="phys_status_vertex_limit_exceeded">Some physical hulls exceed vertex limitations.</string>
- <string name="phys_status_degenerate_triangles">The physics mesh contains degenerate triangles. Use Analyze/Simplify to resolve.</string>
+ <string name="phys_status_degenerate_triangles">The physics mesh is too dense or contains degenerate triangles. Use Analyze/Simplify to resolve.</string>
<string name="layer_all">All</string> <!-- Text to display in physics layer combo box for "all layers" -->
<string name="decomposing">Analyzing...</string>
<string name="simplifying">Simplifying...</string>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 7b16374b72..aa93601669 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -2309,6 +2309,7 @@ Please try again later.
<notification
icon="notifytip.tga"
name="LandmarkCreated"
+ log_to_chat="false"
type="notifytip">
You have added "[LANDMARK_NAME]" to your [FOLDER_NAME] folder.
</notification>
@@ -9633,18 +9634,6 @@ Do you wish to continue?
yestext="OK"/>
</notification>
- <global name="UnsupportedShaderRequirements">
-You do not appear to meet the hardware requirements for [APP_NAME]. [APP_NAME] requires OpenGL 2.0 or later shader support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system.
-
-If you continue to have problems, please visit the [SUPPORT_SITE].
- </global>
-
- <global name="UnsupportedGLRequirements">
-You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system.
-
-If you continue to have problems, please visit the [SUPPORT_SITE].
- </global>
-
<global name="UnsupportedIntelDriver">
The installed Intel graphics driver for [GPUNAME], version [VERSION], is significantly out of date and is known to cause excessive rates of program crashes. You are strongly advised to update to a current Intel driver
@@ -11809,4 +11798,25 @@ Unpacking: [UNPACK_TIME]s [USIZE]KB
<tag>fail</tag>
</notification>
+ <notification
+ icon="alertmodal.tga"
+ label="Prompt for MFA Token"
+ name="PromptMFAToken"
+ type="alertmodal">
+ [MESSAGE]
+ <tag>confirm</tag>
+ <form name="form">
+ <input name="token" type="text" width="400" />
+ <button
+ default="true"
+ index="0"
+ name="continue"
+ text="Continue"/>
+ <button
+ index="1"
+ name="cancel"
+ text="Cancel"/>
+ </form>
+ </notification>
+
</notifications>
diff --git a/indra/newview/skins/default/xui/en/panel_hide_beacon.xml b/indra/newview/skins/default/xui/en/panel_hide_beacon.xml
new file mode 100644
index 0000000000..7cab285f77
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/panel_hide_beacon.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<panel
+ height="25"
+ layout="topleft"
+ name="panel_hide_beacon"
+ mouse_opaque="false"
+ visible="true"
+ width="133">
+ <button
+ follows="left|bottom"
+ height="19"
+ label="Hide beacon"
+ layout="topleft"
+ left="10"
+ name="hide_beacon_btn"
+ tool_tip="Stop tracking and hide beacon"
+ top="2"
+ visible="false"
+ width="113" />
+</panel>
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index 2ea20570b1..42a34d171a 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -28,7 +28,7 @@
height="15"
increment="0.025"
initial_value="0.5"
- label="Master volume"
+ label="All volume"
label_width="120"
layout="topleft"
left="0"
@@ -386,7 +386,7 @@
left="25"
name="voice_chat_settings"
width="200"
- top_pad="7">
+ top_pad="16">
Voice Chat Settings
</text>
<text
diff --git a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
index f5c559fe1d..a3348f28c7 100644
--- a/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
+++ b/indra/newview/skins/default/xui/en/panel_toolbar_view.xml
@@ -95,7 +95,7 @@
tab_stop="false"
name="state_management_buttons_container"
visible="false"
- width="200"/>
+ width="350"/>
</layout_panel>
<layout_panel name="right_toolbar_panel"
auto_resize="false"
diff --git a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
index 2034409111..b4eb1ade94 100644
--- a/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
+++ b/indra/newview/skins/default/xui/en/panel_volume_pulldown.xml
@@ -19,7 +19,7 @@
height="15"
increment="0.025"
initial_value="0.5"
- label="Master"
+ label="All"
label_width="60"
left="10"
width="160"
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index f26ee06e6b..acb3a720b9 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -133,6 +133,7 @@ http://secondlife.com/viewer-access-faq</string>
Please check to make sure you entered the right
* Username (like bobsmith12 or steller.sunshine)
* Password
+ * Second Factor Token (if enabled)
Also, please make sure your Caps Lock key is off.</string>
<string name="LoginFailedPasswordChanged">As a security precaution your password has been changed.
Please go to your account page at http://secondlife.com/password
@@ -192,7 +193,8 @@ Please try logging in again in a minute.</string>
Please try logging in again in a minute.</string>
<string name="LoginFailedLoggingOutSession">The system has begun logging out your last session.
Please try logging in again in a minute.</string>
-
+ <string name="LoginFailedAuthenticationMFARequired">To continue logging in, enter a new token from your multifactor authentication app.
+If you feel this is an error, please contact support@secondlife.com</string>
<!-- Disconnection -->
<string name="AgentLostConnection">This region may be experiencing trouble. Please check your connection to the Internet.</string>
@@ -3962,7 +3964,7 @@ Please check http://status.secondlifegrid.net to see if there is a known problem
<!-- SL Membership -->
<string name="BaseMembership">Base</string>
<string name="PremiumMembership">Premium</string>
- <string name="Premium PlusMembership">Premium Plus</string>
+ <string name="Premium_PlusMembership">Premium Plus</string>
<string name="InternalMembership">Internal</string> <!-- No need to translate -->
<string name="MembershipUpgradeText">Upgrade to Premium</string>
diff --git a/indra/newview/skins/default/xui/fr/strings.xml b/indra/newview/skins/default/xui/fr/strings.xml
index 9fde703d6c..f7545f08d2 100644
--- a/indra/newview/skins/default/xui/fr/strings.xml
+++ b/indra/newview/skins/default/xui/fr/strings.xml
@@ -5102,7 +5102,7 @@ Veuillez vous reporter à http://status.secondlifegrid.net afin de déterminer s
<string name="PremiumMembership">
Premium
</string>
- <string name="Premium PlusMembership">
+ <string name="Premium_PlusMembership">
Premium Plus
</string>
<string name="DeleteItems">
diff --git a/indra/newview/skins/default/xui/it/strings.xml b/indra/newview/skins/default/xui/it/strings.xml
index 3049828f46..7690e02692 100644
--- a/indra/newview/skins/default/xui/it/strings.xml
+++ b/indra/newview/skins/default/xui/it/strings.xml
@@ -5017,7 +5017,7 @@ Consulta la pagina http://status.secondlifegrid.net per determinare se il proble
<string name="PremiumMembership">
Premium
</string>
- <string name="Premium PlusMembership">
+ <string name="Premium_PlusMembership">
Premium Plus
</string>
<string name="DeleteItems">
diff --git a/indra/newview/skins/default/xui/ja/strings.xml b/indra/newview/skins/default/xui/ja/strings.xml
index dcd6e65d34..b4bc36a800 100644
--- a/indra/newview/skins/default/xui/ja/strings.xml
+++ b/indra/newview/skins/default/xui/ja/strings.xml
@@ -5100,7 +5100,7 @@ www.secondlife.com から最新バージョンをダウンロードしてくだ
<string name="PremiumMembership">
プレミアム
</string>
- <string name="Premium PlusMembership">
+ <string name="Premium_PlusMembership">
プレミアムプラス
</string>
<string name="DeleteItems">
diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml
index 43a87b2b18..ee2dcfe9cc 100644
--- a/indra/newview/skins/default/xui/ru/strings.xml
+++ b/indra/newview/skins/default/xui/ru/strings.xml
@@ -5096,7 +5096,7 @@ support@secondlife.com.
<string name="PremiumMembership">
Премиум
</string>
- <string name="Premium PlusMembership">
+ <string name="Premium_PlusMembership">
Премиум Плюс
</string>
<string name="DeleteItems">
diff --git a/indra/newview/tests/lllogininstance_test.cpp b/indra/newview/tests/lllogininstance_test.cpp
index 8d1956957c..a52c3dcef9 100644
--- a/indra/newview/tests/lllogininstance_test.cpp
+++ b/indra/newview/tests/lllogininstance_test.cpp
@@ -186,6 +186,10 @@ std::string LLGridManager::getAppSLURLBase(const std::string& grid_name)
{
return "myappslurl";
}
+std::string LLGridManager::getGridId(const std::string& grid)
+{
+ return std::string();
+}
//-----------------------------------------------------------------------------
#include "../llviewercontrol.h"
@@ -218,6 +222,7 @@ bool llHashedUniqueID(unsigned char* id)
//-----------------------------------------------------------------------------
#include "../llappviewer.h"
void LLAppViewer::forceQuit(void) {}
+bool LLAppViewer::isUpdaterMissing() { return true; }
LLAppViewer * LLAppViewer::sInstance = 0;
//-----------------------------------------------------------------------------
@@ -226,6 +231,8 @@ LLAppViewer * LLAppViewer::sInstance = 0;
static std::string gTOSType;
static LLEventPump * gTOSReplyPump = NULL;
+LLPointer<LLSecAPIHandler> gSecAPIHandler;
+
//static
LLFloater* LLFloaterReg::showInstance(const std::string& name, const LLSD& key, BOOL focus)
{
@@ -343,6 +350,7 @@ namespace tut
gSavedSettings.declareString("ClientSettingsFile", "test_settings.xml", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareString("NextLoginLocation", "", "", LLControlVariable::PERSIST_NO);
gSavedSettings.declareBOOL("LoginLastLocation", FALSE, "", LLControlVariable::PERSIST_NO);
+ gSavedSettings.declareBOOL("CmdLineSkipUpdater", TRUE, "", LLControlVariable::PERSIST_NO);
LLSD authenticator = LLSD::emptyMap();
LLSD identifier = LLSD::emptyMap();
diff --git a/indra/newview/tests/llsecapi_test.cpp b/indra/newview/tests/llsecapi_test.cpp
index 37fbbb449b..7d2a9a436f 100644
--- a/indra/newview/tests/llsecapi_test.cpp
+++ b/indra/newview/tests/llsecapi_test.cpp
@@ -62,6 +62,7 @@ LLPointer<LLCertificateStore> LLSecAPIBasicHandler::getCertificateStore(const st
void LLSecAPIBasicHandler::setProtectedData(const std::string& data_type, const std::string& data_id, const LLSD& data) {}
void LLSecAPIBasicHandler::addToProtectedMap(const std::string& data_type, const std::string& data_id, const std::string& map_elem, const LLSD& data) {}
void LLSecAPIBasicHandler::removeFromProtectedMap(const std::string& data_type, const std::string& data_id, const std::string& map_elem) {}
+void LLSecAPIBasicHandler::syncProtectedMap() {}
LLSD LLSecAPIBasicHandler::getProtectedData(const std::string& data_type, const std::string& data_id) { return LLSD(); }
void LLSecAPIBasicHandler::deleteProtectedData(const std::string& data_type, const std::string& data_id) {}
LLPointer<LLCredential> LLSecAPIBasicHandler::createCredential(const std::string& grid, const LLSD& identifier, const LLSD& authenticator) { return NULL; }
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 76160b73ba..de5ac5ed3d 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -527,6 +527,7 @@ class WindowsManifest(ViewerManifest):
# See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx
self.path("msvcp140.dll")
self.path("vcruntime140.dll")
+ self.path_optional("vcruntime140_1.dll")
# SLVoice executable
with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')):
@@ -604,6 +605,7 @@ class WindowsManifest(ViewerManifest):
'sharedlibs', 'Release')):
self.path("msvcp140.dll")
self.path("vcruntime140.dll")
+ self.path_optional("vcruntime140_1.dll")
# CEF files common to all configurations
with self.prefix(src=os.path.join(pkgdir, 'resources')):