diff options
Diffstat (limited to 'linden/indra')
69 files changed, 2765 insertions, 1908 deletions
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake index a0bb951..afcecfc 100644 --- a/linden/indra/cmake/00-Common.cmake +++ b/linden/indra/cmake/00-Common.cmake | |||
@@ -216,7 +216,6 @@ else (STANDALONE) | |||
216 | glib-2.0 | 216 | glib-2.0 |
217 | gstreamer-0.10 | 217 | gstreamer-0.10 |
218 | gtk-2.0 | 218 | gtk-2.0 |
219 | llfreetype2 | ||
220 | pango-1.0 | 219 | pango-1.0 |
221 | ) | 220 | ) |
222 | endif (STANDALONE) | 221 | endif (STANDALONE) |
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index bf08879..2435e4d 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h | |||
@@ -46,6 +46,6 @@ const char * const IMP_VIEWER_NAME = "Imprudence"; | |||
46 | const S32 IMP_VERSION_MAJOR = 1; | 46 | const S32 IMP_VERSION_MAJOR = 1; |
47 | const S32 IMP_VERSION_MINOR = 2; | 47 | const S32 IMP_VERSION_MINOR = 2; |
48 | const S32 IMP_VERSION_PATCH = 0; | 48 | const S32 IMP_VERSION_PATCH = 0; |
49 | const char * const IMP_VERSION_TEST = "beta 2"; | 49 | const char * const IMP_VERSION_TEST = ""; |
50 | 50 | ||
51 | #endif | 51 | #endif |
diff --git a/linden/indra/llmath/llcalc.cpp b/linden/indra/llmath/llcalc.cpp index 526a116..74f9544 100644 --- a/linden/indra/llmath/llcalc.cpp +++ b/linden/indra/llmath/llcalc.cpp | |||
@@ -11,8 +11,14 @@ | |||
11 | 11 | ||
12 | #include "llcalc.h" | 12 | #include "llcalc.h" |
13 | 13 | ||
14 | #include <boost/version.hpp> | ||
15 | #if BOOST_VERSION >= 103600 | ||
16 | #include <boost/spirit/include/classic_core.hpp> | ||
17 | #include <boost/spirit/include/classic_error_handling.hpp> | ||
18 | #else | ||
14 | #include <boost/spirit/core.hpp> | 19 | #include <boost/spirit/core.hpp> |
15 | #include <boost/spirit/error_handling.hpp> | 20 | #include <boost/spirit/error_handling.hpp> |
21 | #endif | ||
16 | 22 | ||
17 | #include "llcalcparser.h" | 23 | #include "llcalcparser.h" |
18 | #include "llmath.h" | 24 | #include "llmath.h" |
diff --git a/linden/indra/llmath/llcalcparser.cpp b/linden/indra/llmath/llcalcparser.cpp index 1546c09..df2bc09 100644 --- a/linden/indra/llmath/llcalcparser.cpp +++ b/linden/indra/llmath/llcalcparser.cpp | |||
@@ -11,6 +11,13 @@ | |||
11 | 11 | ||
12 | #include "llcalcparser.h" | 12 | #include "llcalcparser.h" |
13 | 13 | ||
14 | #include <boost/version.hpp> | ||
15 | #if BOOST_VERSION >= 103600 | ||
16 | using namespace boost::spirit::classic; | ||
17 | #else | ||
18 | using namespace boost::spirit; | ||
19 | #endif | ||
20 | |||
14 | F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const | 21 | F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string::iterator& end) const |
15 | { | 22 | { |
16 | LLCalc::calc_map_t::iterator iter; | 23 | LLCalc::calc_map_t::iterator iter; |
@@ -28,7 +35,7 @@ F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string:: | |||
28 | else | 35 | else |
29 | { | 36 | { |
30 | // This should never happen! | 37 | // This should never happen! |
31 | boost::spirit::throw_(end, std::string("Missing constants table")); | 38 | throw_(end, std::string("Missing constants table")); |
32 | } | 39 | } |
33 | 40 | ||
34 | if (mVariables) | 41 | if (mVariables) |
@@ -40,6 +47,6 @@ F32 LLCalcParser::lookup(const std::string::iterator& start, const std::string:: | |||
40 | } | 47 | } |
41 | } | 48 | } |
42 | 49 | ||
43 | boost::spirit::throw_(end, std::string("Unknown symbol " + name)); | 50 | throw_(end, std::string("Unknown symbol " + name)); |
44 | return 0.f; | 51 | return 0.f; |
45 | } | 52 | } |
diff --git a/linden/indra/llmath/llcalcparser.h b/linden/indra/llmath/llcalcparser.h index c405b62..d8acc1f 100644 --- a/linden/indra/llmath/llcalcparser.h +++ b/linden/indra/llmath/llcalcparser.h | |||
@@ -10,24 +10,37 @@ | |||
10 | #ifndef LL_CALCPARSER_H | 10 | #ifndef LL_CALCPARSER_H |
11 | #define LL_CALCPARSER_H | 11 | #define LL_CALCPARSER_H |
12 | 12 | ||
13 | #include <boost/version.hpp> | ||
14 | #if BOOST_VERSION >= 103600 | ||
15 | #include <boost/spirit/include/classic_attribute.hpp> | ||
16 | #include <boost/spirit/include/classic_core.hpp> | ||
17 | #include <boost/spirit/include/classic_error_handling.hpp> | ||
18 | #include <boost/spirit/include/classic_position_iterator.hpp> | ||
19 | #include <boost/spirit/include/phoenix1_binders.hpp> | ||
20 | #include <boost/spirit/include/classic_symbols.hpp> | ||
21 | using namespace boost::spirit::classic; | ||
22 | #else | ||
13 | #include <boost/spirit/attribute.hpp> | 23 | #include <boost/spirit/attribute.hpp> |
14 | #include <boost/spirit/core.hpp> | 24 | #include <boost/spirit/core.hpp> |
15 | #include <boost/spirit/error_handling.hpp> | 25 | #include <boost/spirit/error_handling.hpp> |
16 | #include <boost/spirit/iterator/position_iterator.hpp> | 26 | #include <boost/spirit/iterator/position_iterator.hpp> |
17 | #include <boost/spirit/phoenix/binders.hpp> | 27 | #include <boost/spirit/phoenix/binders.hpp> |
18 | //#include <boost/spirit/symbols/symbols.hpp> | 28 | #include <boost/spirit/symbols/symbols.hpp> |
29 | using namespace boost::spirit; | ||
30 | #endif | ||
31 | |||
19 | #include <map> | 32 | #include <map> |
20 | #include <string> | 33 | #include <string> |
21 | 34 | ||
22 | #include "llcalc.h" | 35 | #include "llcalc.h" |
23 | #include "llmath.h" | 36 | #include "llmath.h" |
24 | 37 | ||
25 | struct LLCalcParser : boost::spirit::grammar<LLCalcParser> | 38 | struct LLCalcParser : grammar<LLCalcParser> |
26 | { | 39 | { |
27 | LLCalcParser(F32& result, LLCalc::calc_map_t* constants, LLCalc::calc_map_t* vars) : | 40 | LLCalcParser(F32& result, LLCalc::calc_map_t* constants, LLCalc::calc_map_t* vars) : |
28 | mResult(result), mConstants(constants), mVariables(vars) {}; | 41 | mResult(result), mConstants(constants), mVariables(vars) {}; |
29 | 42 | ||
30 | struct value_closure : boost::spirit::closure<value_closure, F32> | 43 | struct value_closure : closure<value_closure, F32> |
31 | { | 44 | { |
32 | member1 value; | 45 | member1 value; |
33 | }; | 46 | }; |
@@ -36,21 +49,20 @@ struct LLCalcParser : boost::spirit::grammar<LLCalcParser> | |||
36 | struct definition | 49 | struct definition |
37 | { | 50 | { |
38 | // Rule declarations | 51 | // Rule declarations |
39 | boost::spirit::rule<ScannerT> statement, identifier; | 52 | rule<ScannerT> statement, identifier; |
40 | boost::spirit::rule<ScannerT, value_closure::context_t> expression, term, | 53 | rule<ScannerT, value_closure::context_t> expression, term, |
41 | power, | 54 | power, |
42 | unary_expr, | 55 | unary_expr, |
43 | factor, | 56 | factor, |
44 | /*unary_func, | 57 | unary_func, |
45 | /binary_func,*/ | 58 | binary_func, |
46 | group; | 59 | group; |
47 | 60 | ||
48 | // start() should return the starting symbol | 61 | // start() should return the starting symbol |
49 | boost::spirit::rule<ScannerT> const& start() const { return statement; } | 62 | rule<ScannerT> const& start() const { return statement; } |
50 | 63 | ||
51 | definition(LLCalcParser const& self) | 64 | definition(LLCalcParser const& self) |
52 | { | 65 | { |
53 | using namespace boost::spirit; | ||
54 | using namespace phoenix; | 66 | using namespace phoenix; |
55 | 67 | ||
56 | assertion<std::string> assert_domain("Domain error"); | 68 | assertion<std::string> assert_domain("Domain error"); |
@@ -64,30 +76,30 @@ struct LLCalcParser : boost::spirit::grammar<LLCalcParser> | |||
64 | group = | 76 | group = |
65 | '(' >> expression[group.value = arg1] >> assert_syntax(ch_p(')')) | 77 | '(' >> expression[group.value = arg1] >> assert_syntax(ch_p(')')) |
66 | ; | 78 | ; |
67 | 79 | ||
68 | /*unary_func = | 80 | unary_func = |
69 | ((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&sin)(DEG_TO_RAD * arg1)]) | | 81 | ((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sin)(self,arg1)]) | |
70 | (str_p("COS") >> '(' >> expression[unary_func.value = bind(&cos)(DEG_TO_RAD * arg1)]) | | 82 | (str_p("COS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_cos)(self,arg1)]) | |
71 | (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&tan)(DEG_TO_RAD * arg1)]) | | 83 | (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_tan)(self,arg1)]) | |
72 | (str_p("ASIN") >> '(' >> expression[unary_func.value = (bind(&asin)(arg1)) * RAD_TO_DEG]) | | 84 | (str_p("ASIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_asin)(self,arg1)]) | |
73 | (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&acos)(arg1) * RAD_TO_DEG]) | | 85 | (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_acos)(self,arg1)]) | |
74 | (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&atan)(arg1) * RAD_TO_DEG]) | | 86 | (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_atan)(self,arg1)]) | |
75 | (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&sqrt)(arg1)]) | | 87 | (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sqrt)(self,arg1)]) | |
76 | (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&log)(arg1)]) | | 88 | (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_log)(self,arg1)]) | |
77 | (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&exp)(arg1)]) | | 89 | (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_exp)(self,arg1)]) | |
78 | (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&fabs)(arg1)]) | 90 | (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_fabs)(self,arg1)]) |
79 | ) >> assert_syntax(ch_p(')')) | 91 | ) >> assert_syntax(ch_p(')')) |
80 | ; | 92 | ; |
81 | 93 | ||
82 | binary_func = | 94 | binary_func = |
83 | ((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >> | 95 | ((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >> |
84 | expression[binary_func.value = bind(&atan2)(binary_func.value, arg1) * RAD_TO_DEG]) | | 96 | expression[binary_func.value = bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) | |
85 | (str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >> | 97 | (str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >> |
86 | expression[binary_func.value = bind(&LLCalcParser::min)(self, binary_func.value, arg1)]) | | 98 | expression[binary_func.value = bind(&LLCalcParser::min)(self, binary_func.value, arg1)]) | |
87 | (str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >> | 99 | (str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >> |
88 | expression[binary_func.value = bind(&LLCalcParser::max)(self, binary_func.value, arg1)]) | 100 | expression[binary_func.value = bind(&LLCalcParser::max)(self, binary_func.value, arg1)]) |
89 | ) >> assert_syntax(ch_p(')')) | 101 | ) >> assert_syntax(ch_p(')')) |
90 | ;*/ | 102 | ; |
91 | 103 | ||
92 | // *TODO: Localisation of the decimal point? | 104 | // *TODO: Localisation of the decimal point? |
93 | // Problem, LLLineEditor::postvalidateFloat accepts a comma when appropriate | 105 | // Problem, LLLineEditor::postvalidateFloat accepts a comma when appropriate |
@@ -96,8 +108,8 @@ struct LLCalcParser : boost::spirit::grammar<LLCalcParser> | |||
96 | factor = | 108 | factor = |
97 | (ureal_p[factor.value = arg1] | | 109 | (ureal_p[factor.value = arg1] | |
98 | group[factor.value = arg1] | | 110 | group[factor.value = arg1] | |
99 | /*unary_func[factor.value = arg1] | | 111 | unary_func[factor.value = arg1] | |
100 | binary_func[factor.value = arg1] |*/ | 112 | binary_func[factor.value = arg1] | |
101 | // Lookup throws an Unknown Symbol error if it is unknown, while this works fine, | 113 | // Lookup throws an Unknown Symbol error if it is unknown, while this works fine, |
102 | // would be "neater" to handle symbol lookup from here with an assertive parser. | 114 | // would be "neater" to handle symbol lookup from here with an assertive parser. |
103 | // constants_p[factor.value = arg1]| | 115 | // constants_p[factor.value = arg1]| |
@@ -144,6 +156,22 @@ private: | |||
144 | F32 max(const F32& a, const F32& b) const { return llmax(a, b); } | 156 | F32 max(const F32& a, const F32& b) const { return llmax(a, b); } |
145 | 157 | ||
146 | bool checkNaN(const F32& a) const { return !llisnan(a); } | 158 | bool checkNaN(const F32& a) const { return !llisnan(a); } |
159 | |||
160 | //FIX* non ambigious function fix making SIN() work for calc -Cryogenic Blitz | ||
161 | F32 _sin(const F32& a) const { return sin(DEG_TO_RAD * a); } | ||
162 | F32 _cos(const F32& a) const { return cos(DEG_TO_RAD * a); } | ||
163 | F32 _tan(const F32& a) const { return tan(DEG_TO_RAD * a); } | ||
164 | F32 _asin(const F32& a) const { return asin(a * RAD_TO_DEG); } | ||
165 | F32 _acos(const F32& a) const { return acos(a * RAD_TO_DEG); } | ||
166 | F32 _atan(const F32& a) const { return atan(a * RAD_TO_DEG); } | ||
167 | F32 _sqrt(const F32& a) const { return sqrt(a); } | ||
168 | F32 _log(const F32& a) const { return log(a); } | ||
169 | F32 _exp(const F32& a) const { return exp(a); } | ||
170 | F32 _fabs(const F32& a) const { return fabs(a) * RAD_TO_DEG; } | ||
171 | |||
172 | F32 _atan2(const F32& a,const F32& b) const { return atan2(a,b); } | ||
173 | |||
174 | |||
147 | 175 | ||
148 | LLCalc::calc_map_t* mConstants; | 176 | LLCalc::calc_map_t* mConstants; |
149 | LLCalc::calc_map_t* mVariables; | 177 | LLCalc::calc_map_t* mVariables; |
diff --git a/linden/indra/llmedia/llmediaimplllmozlib.cpp b/linden/indra/llmedia/llmediaimplllmozlib.cpp index 7222d19..5b4b02e 100644 --- a/linden/indra/llmedia/llmediaimplllmozlib.cpp +++ b/linden/indra/llmedia/llmediaimplllmozlib.cpp | |||
@@ -50,9 +50,9 @@ | |||
50 | #include "GL/gl.h" | 50 | #include "GL/gl.h" |
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #if defined(LL_LINUX) || defined(WIN32) | 53 | |
54 | #include <locale.h> | 54 | #include <locale.h> |
55 | #endif // defined(LL_LINUX) || defined(WIN32) | 55 | |
56 | 56 | ||
57 | #include <iostream> | 57 | #include <iostream> |
58 | 58 | ||
@@ -90,23 +90,23 @@ LLMediaImplLLMozLib::LLMediaImplLLMozLib() : | |||
90 | // (static) super-initialization - called once at application startup | 90 | // (static) super-initialization - called once at application startup |
91 | bool LLMediaImplLLMozLib::startup( LLMediaManagerData* init_data ) | 91 | bool LLMediaImplLLMozLib::startup( LLMediaManagerData* init_data ) |
92 | { | 92 | { |
93 | #if defined(LL_LINUX) || defined(WIN32) | 93 | |
94 | // Yuck, Mozilla's GTK callbacks play with the locale - push/pop | 94 | // Yuck, Mozilla's GTK callbacks play with the locale - push/pop |
95 | // the locale to protect it, as exotic/non-C locales | 95 | // the locale to protect it, as exotic/non-C locales |
96 | // causes our code lots of general critical weirdness | 96 | // causes our code lots of general critical weirdness |
97 | // and crashness. (SL-35450) | 97 | // and crashness. (SL-35450) |
98 | static std::string saved_locale; | 98 | static std::string saved_locale; |
99 | saved_locale = setlocale(LC_ALL, NULL); | 99 | saved_locale = setlocale(LC_ALL, NULL); |
100 | #endif // defined(LL_LINUX) || defined(WIN32) | 100 | |
101 | 101 | ||
102 | bool result = LLMozLib::getInstance()->init( init_data->getBrowserApplicationDir(), | 102 | bool result = LLMozLib::getInstance()->init( init_data->getBrowserApplicationDir(), |
103 | init_data->getBrowserComponentDir(), | 103 | init_data->getBrowserComponentDir(), |
104 | init_data->getBrowserProfileDir(), | 104 | init_data->getBrowserProfileDir(), |
105 | init_data->getBrowserParentWindow() ); | 105 | init_data->getBrowserParentWindow() ); |
106 | 106 | ||
107 | #if defined(LL_LINUX) || defined(WIN32) | 107 | |
108 | setlocale(LC_ALL, saved_locale.c_str() ); | 108 | setlocale(LC_ALL, saved_locale.c_str() ); |
109 | #endif // defined(LL_LINUX) || defined(WIN32) | 109 | |
110 | 110 | ||
111 | return result; | 111 | return result; |
112 | } | 112 | } |
diff --git a/linden/indra/llrender/llfont.cpp b/linden/indra/llrender/llfont.cpp index 9245803..dd33128 100644 --- a/linden/indra/llrender/llfont.cpp +++ b/linden/indra/llrender/llfont.cpp | |||
@@ -38,8 +38,7 @@ | |||
38 | #if !defined(LL_LINUX) || defined(LL_STANDALONE) | 38 | #if !defined(LL_LINUX) || defined(LL_STANDALONE) |
39 | # include <ft2build.h> | 39 | # include <ft2build.h> |
40 | #else | 40 | #else |
41 | // I had to do some work to avoid the system-installed FreeType headers... --ryan. | 41 | # include "ft2build.h" |
42 | # include "llfreetype2/freetype/ft2build.h" | ||
43 | #endif | 42 | #endif |
44 | 43 | ||
45 | // For some reason, this won't work if it's not wrapped in the ifdef | 44 | // For some reason, this won't work if it's not wrapped in the ifdef |
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt index 0e2ddf2..1668587 100644 --- a/linden/indra/newview/CMakeLists.txt +++ b/linden/indra/newview/CMakeLists.txt | |||
@@ -450,6 +450,7 @@ set(viewer_SOURCE_FILES | |||
450 | llworldmapview.cpp | 450 | llworldmapview.cpp |
451 | llxmlrpctransaction.cpp | 451 | llxmlrpctransaction.cpp |
452 | noise.cpp | 452 | noise.cpp |
453 | panelradar.cpp | ||
453 | pipeline.cpp | 454 | pipeline.cpp |
454 | primbackup.cpp | 455 | primbackup.cpp |
455 | rlvhandler.cpp | 456 | rlvhandler.cpp |
@@ -872,6 +873,7 @@ set(viewer_HEADER_FILES | |||
872 | llxmlrpctransaction.h | 873 | llxmlrpctransaction.h |
873 | macmain.h | 874 | macmain.h |
874 | noise.h | 875 | noise.h |
876 | panelradar.h | ||
875 | pipeline.h | 877 | pipeline.h |
876 | primbackup.h | 878 | primbackup.h |
877 | randgauss.h | 879 | randgauss.h |
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index 14a0102..2657d6f 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Localized versions of Info.plist keys */ | 1 | /* Localized versions of Info.plist keys */ |
2 | 2 | ||
3 | CFBundleName = "Imprudence"; | 3 | CFBundleName = "Imprudence"; |
4 | CFBundleShortVersionString = "Imprudence version 1.2.0 beta 2"; | 4 | CFBundleShortVersionString = "Imprudence version 1.2.0"; |
5 | CFBundleGetInfoString = "Imprudence version 1.2.0 beta 2"; | 5 | CFBundleGetInfoString = "Imprudence version 1.2.0"; |
diff --git a/linden/indra/newview/Info-Imprudence.plist b/linden/indra/newview/Info-Imprudence.plist index e44dcbe..42164c6 100644 --- a/linden/indra/newview/Info-Imprudence.plist +++ b/linden/indra/newview/Info-Imprudence.plist | |||
@@ -32,7 +32,7 @@ | |||
32 | </dict> | 32 | </dict> |
33 | </array> | 33 | </array> |
34 | <key>CFBundleVersion</key> | 34 | <key>CFBundleVersion</key> |
35 | <string>1.2.0 beta 2</string> | 35 | <string>1.2.0</string> |
36 | <key>CSResourcesFileMapped</key> | 36 | <key>CSResourcesFileMapped</key> |
37 | <true/> | 37 | <true/> |
38 | </dict> | 38 | </dict> |
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 18c80eb..9087d9f 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -3213,27 +3213,16 @@ | |||
3213 | <key>Value</key> | 3213 | <key>Value</key> |
3214 | <integer>1</integer> | 3214 | <integer>1</integer> |
3215 | </map> | 3215 | </map> |
3216 | <key>DoubleClickAutoPilot</key> | 3216 | <key>DoubleClickAction</key> |
3217 | <map> | 3217 | <map> |
3218 | <key>Comment</key> | 3218 | <key>Comment</key> |
3219 | <string>Enable double-click auto pilot</string> | 3219 | <string>What to do when you double-click. Either "None" or "Go".</string> |
3220 | <key>Persist</key> | 3220 | <key>Persist</key> |
3221 | <integer>1</integer> | 3221 | <integer>1</integer> |
3222 | <key>Type</key> | 3222 | <key>Type</key> |
3223 | <string>Boolean</string> | 3223 | <string>String</string> |
3224 | <key>Value</key> | ||
3225 | <integer>0</integer> | ||
3226 | </map> | ||
3227 | <key>DoubleClickTeleport</key> | ||
3228 | <map> | ||
3229 | <key>Comment</key> | ||
3230 | <string>Enable double-click teleport</string> | ||
3231 | <key>Persist</key> | ||
3232 | <integer>1</integer> | ||
3233 | <key>Type</key> | ||
3234 | <string>Boolean</string> | ||
3235 | <key>Value</key> | 3224 | <key>Value</key> |
3236 | <integer>1</integer> | 3225 | <string>None</string> |
3237 | </map> | 3226 | </map> |
3238 | <key>DragAndDropToolTipDelay</key> | 3227 | <key>DragAndDropToolTipDelay</key> |
3239 | <map> | 3228 | <map> |
@@ -4791,6 +4780,17 @@ | |||
4791 | <key>Value</key> | 4780 | <key>Value</key> |
4792 | <integer>1024</integer> | 4781 | <integer>1024</integer> |
4793 | </map> | 4782 | </map> |
4783 | <key>GoAction</key> | ||
4784 | <map> | ||
4785 | <key>Comment</key> | ||
4786 | <string>How to move for "Go Here" or double-click move. Either "Autopilot" or "Teleport".</string> | ||
4787 | <key>Persist</key> | ||
4788 | <integer>1</integer> | ||
4789 | <key>Type</key> | ||
4790 | <string>String</string> | ||
4791 | <key>Value</key> | ||
4792 | <string>Autopilot</string> | ||
4793 | </map> | ||
4794 | <key>GridCrossSections</key> | 4794 | <key>GridCrossSections</key> |
4795 | <map> | 4795 | <map> |
4796 | <key>Comment</key> | 4796 | <key>Comment</key> |
@@ -8979,6 +8979,17 @@ | |||
8979 | <key>Value</key> | 8979 | <key>Value</key> |
8980 | <integer>0</integer> | 8980 | <integer>0</integer> |
8981 | </map> | 8981 | </map> |
8982 | <key>ShowMiniMapRadar</key> | ||
8983 | <map> | ||
8984 | <key>Comment</key> | ||
8985 | <string>Reveal the minimap radar</string> | ||
8986 | <key>Persist</key> | ||
8987 | <integer>1</integer> | ||
8988 | <key>Type</key> | ||
8989 | <string>Boolean</string> | ||
8990 | <key>Value</key> | ||
8991 | <integer>1</integer> | ||
8992 | </map> | ||
8982 | <key>ShowMovementControls</key> | 8993 | <key>ShowMovementControls</key> |
8983 | <map> | 8994 | <map> |
8984 | <key>Comment</key> | 8995 | <key>Comment</key> |
@@ -10911,7 +10922,7 @@ | |||
10911 | <key>Type</key> | 10922 | <key>Type</key> |
10912 | <string>F32</string> | 10923 | <string>F32</string> |
10913 | <key>Value</key> | 10924 | <key>Value</key> |
10914 | <real>1.0</real> | 10925 | <real>1.002</real> |
10915 | </map> | 10926 | </map> |
10916 | <key>UISndAlert</key> | 10927 | <key>UISndAlert</key> |
10917 | <map> | 10928 | <map> |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index b3321fc..800264d 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -7893,7 +7893,7 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) | |||
7893 | return; | 7893 | return; |
7894 | } | 7894 | } |
7895 | 7895 | ||
7896 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.0c | 7896 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
7897 | // NOTE-RLVa: This function is called from inside RlvHandler as well, hence the rather heavy modifications | 7897 | // NOTE-RLVa: This function is called from inside RlvHandler as well, hence the rather heavy modifications |
7898 | std::list<U32> rlvAttachments; | 7898 | std::list<U32> rlvAttachments; |
7899 | // TODO-RLVa: Once we have the improved "removeWearable" logic implemented we can just get rid of the whole "rlvCompFolders" hassle | 7899 | // TODO-RLVa: Once we have the improved "removeWearable" logic implemented we can just get rid of the whole "rlvCompFolders" hassle |
@@ -7911,7 +7911,7 @@ void LLAgent::userRemoveAllAttachments( void* userdata ) | |||
7911 | { | 7911 | { |
7912 | if (rlv_handler_t::isEnabled()) | 7912 | if (rlv_handler_t::isEnabled()) |
7913 | { | 7913 | { |
7914 | if (!gRlvHandler.isDetachable(curiter->first)) | 7914 | if (gRlvHandler.isLockedAttachment(curiter->first, RLV_LOCK_REMOVE)) |
7915 | continue; | 7915 | continue; |
7916 | 7916 | ||
7917 | // Check if we're being called in response to an RLV command (that would be @detach=force) | 7917 | // Check if we're being called in response to an RLV command (that would be @detach=force) |
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 74fb563..52c4b8d 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp | |||
@@ -4067,7 +4067,7 @@ void LLAppViewer::handleLoginComplete() | |||
4067 | writeDebugInfo(); | 4067 | writeDebugInfo(); |
4068 | 4068 | ||
4069 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | 4069 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e |
4070 | // TODO-RLVa: find some way to initialize the lookup table when we need them *and* support toggling RLVa at runtime | 4070 | // NOTE: this function isn't called in Imprudence so any changes need to go in idle_startup() instead |
4071 | gRlvHandler.initLookupTables(); | 4071 | gRlvHandler.initLookupTables(); |
4072 | 4072 | ||
4073 | if (rlv_handler_t::isEnabled()) | 4073 | if (rlv_handler_t::isEnabled()) |
diff --git a/linden/indra/newview/llfloatermap.cpp b/linden/indra/newview/llfloatermap.cpp index 85057ee..b7ef884 100644 --- a/linden/indra/newview/llfloatermap.cpp +++ b/linden/indra/newview/llfloatermap.cpp | |||
@@ -42,46 +42,20 @@ | |||
42 | #include "llregionhandle.h" | 42 | #include "llregionhandle.h" |
43 | #include "llresizebar.h" | 43 | #include "llresizebar.h" |
44 | #include "lluictrlfactory.h" | 44 | #include "lluictrlfactory.h" |
45 | |||
46 | // radar | ||
47 | #include "llchat.h" | ||
48 | #include "llfirstuse.h" | 45 | #include "llfirstuse.h" |
49 | #include "llfloateravatarinfo.h" | 46 | #include "panelradar.h" |
50 | #include "llfloaterchat.h" | 47 | |
51 | #include "llfloaterfriends.h" | ||
52 | #include "llfloatergroupinvite.h" | ||
53 | #include "llfloatergroups.h" | ||
54 | #include "llfloaterreporter.h" | ||
55 | #include "llimview.h" | ||
56 | #include "llmutelist.h" | ||
57 | #include "llparcel.h" | ||
58 | #include "llregionposition.h" | ||
59 | #include "roles_constants.h" | ||
60 | #include "llscrolllistctrl.h" | ||
61 | #include "lltracker.h" | ||
62 | #include "llviewerobjectlist.h" | ||
63 | #include "llviewermenu.h" | ||
64 | #include "llviewermessage.h" | ||
65 | #include "llviewerparcelmgr.h" | ||
66 | #include "llviewerregion.h" | ||
67 | #include "llviewerwindow.h" | ||
68 | #include "llvoavatar.h" | ||
69 | #include "llworld.h" | ||
70 | 48 | ||
71 | LLFloaterMap::LLFloaterMap(const LLSD& key) | 49 | LLFloaterMap::LLFloaterMap(const LLSD& key) |
72 | : | 50 | : |
73 | LLFloater(std::string("minimap")), | 51 | LLFloater(std::string("minimap")), |
74 | mPanelMap(NULL), | 52 | mPanelMap(NULL), |
75 | mUpdate(TRUE), | 53 | mPanelRadar(NULL) |
76 | mSelectedAvatar(LLUUID::null) | ||
77 | |||
78 | { | 54 | { |
79 | LLCallbackMap::map_t factory_map; | 55 | LLCallbackMap::map_t factory_map; |
80 | factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); | 56 | factory_map["mini_mapview"] = LLCallbackMap(createPanelMiniMap, this); |
57 | factory_map["RadarPanel"] = LLCallbackMap(createPanelRadar, this); | ||
81 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); | 58 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_mini_map.xml", &factory_map, FALSE); |
82 | |||
83 | mChatAvatars.clear(); | ||
84 | mTypingAvatars.clear(); | ||
85 | } | 59 | } |
86 | 60 | ||
87 | 61 | ||
@@ -93,6 +67,15 @@ void* LLFloaterMap::createPanelMiniMap(void* data) | |||
93 | return self->mPanelMap; | 67 | return self->mPanelMap; |
94 | } | 68 | } |
95 | 69 | ||
70 | // static | ||
71 | void* LLFloaterMap::createPanelRadar(void* data) | ||
72 | { | ||
73 | LLFloaterMap* self = (LLFloaterMap*)data; | ||
74 | self->mPanelRadar = new PanelRadar(); | ||
75 | return self->mPanelRadar; | ||
76 | } | ||
77 | |||
78 | |||
96 | BOOL LLFloaterMap::postBuild() | 79 | BOOL LLFloaterMap::postBuild() |
97 | { | 80 | { |
98 | // Send the drag handle to the back, but make sure close stays on top | 81 | // Send the drag handle to the back, but make sure close stays on top |
@@ -100,30 +83,15 @@ BOOL LLFloaterMap::postBuild() | |||
100 | sendChildToFront(getChild<LLButton>("llfloater_minimize_btn")); | 83 | sendChildToFront(getChild<LLButton>("llfloater_minimize_btn")); |
101 | sendChildToFront(getChild<LLButton>("llfloater_close_btn")); | 84 | sendChildToFront(getChild<LLButton>("llfloater_close_btn")); |
102 | setIsChrome(TRUE); | 85 | setIsChrome(TRUE); |
103 | |||
104 | mRadarList = getChild<LLScrollListCtrl>("RadarList"); | ||
105 | childSetCommitCallback("RadarList", onList, this); | ||
106 | mRadarList->setDoubleClickCallback(onClickIM); | ||
107 | |||
108 | childSetFocusChangedCallback("near_me_range", onRangeChange, this); | ||
109 | |||
110 | childSetAction("im_btn", onClickIM, this); | ||
111 | childSetAction("profile_btn", onClickProfile, this); | ||
112 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); | ||
113 | childSetAction("track_btn", onClickTrack, this); | ||
114 | childSetAction("invite_btn", onClickInvite, this); | ||
115 | childSetAction("add_btn", onClickAddFriend, this); | ||
116 | childSetAction("freeze_btn", onClickFreeze, this); | ||
117 | childSetAction("eject_btn", onClickEject, this); | ||
118 | childSetAction("mute_btn", onClickMute, this); | ||
119 | childSetAction("unmute_btn", onClickUnmute, this); | ||
120 | childSetAction("ar_btn", onClickAR, this); | ||
121 | childSetAction("estate_eject_btn", onClickEjectFromEstate, this); | ||
122 | |||
123 | setDefaultBtn("im_btn"); | ||
124 | 86 | ||
125 | populateRadar(); | 87 | childSetAction("toggle_radar", onToggleRadar, this); |
126 | 88 | ||
89 | if (!gSavedSettings.getBOOL("ShowMiniMapRadar")) | ||
90 | { | ||
91 | // Collapse radar if it's not showing. | ||
92 | adjustLayout( false ); | ||
93 | } | ||
94 | |||
127 | return TRUE; | 95 | return TRUE; |
128 | } | 96 | } |
129 | 97 | ||
@@ -139,6 +107,9 @@ void LLFloaterMap::onOpen() | |||
139 | gFloaterView->adjustToFitScreen(this, FALSE); | 107 | gFloaterView->adjustToFitScreen(this, FALSE); |
140 | 108 | ||
141 | gSavedSettings.setBOOL("ShowMiniMap", TRUE); | 109 | gSavedSettings.setBOOL("ShowMiniMap", TRUE); |
110 | |||
111 | bool showing_radar = gSavedSettings.getBOOL("ShowMiniMapRadar"); | ||
112 | setRadarVisible( showing_radar ); | ||
142 | } | 113 | } |
143 | 114 | ||
144 | 115 | ||
@@ -190,828 +161,101 @@ void LLFloaterMap::open() | |||
190 | } | 161 | } |
191 | // [/RLVa:KB] | 162 | // [/RLVa:KB] |
192 | 163 | ||
193 | // TODO: make this detachable | ||
194 | // TODO: make this expand/collapse | ||
195 | |||
196 | /* | ||
197 | * Imprudence Radar | ||
198 | * @brief inworld radar integrated with the minimap | ||
199 | * by McCabe Maxsted | ||
200 | * Estate tab portion by Dale Glass | ||
201 | */ | ||
202 | |||
203 | //static | ||
204 | bool LLFloaterMap::isImpDev(LLUUID agent_id) | ||
205 | { | ||
206 | // We use strings here as avatar keys change across grids. | ||
207 | // Feel free to add/remove yourself. | ||
208 | std::string agent_name = getSelectedName(agent_id); | ||
209 | if (agent_name == "McCabe Maxsted" || | ||
210 | agent_name == "Jacek Antonelli" || | ||
211 | agent_name == "Armin Weatherwax") | ||
212 | { | ||
213 | return true; | ||
214 | } | ||
215 | return false; | ||
216 | } | ||
217 | |||
218 | //static | ||
219 | void LLFloaterMap::updateRadar() | ||
220 | { | ||
221 | LLFloaterMap::getInstance()->populateRadar(); | ||
222 | } | ||
223 | |||
224 | void LLFloaterMap::populateRadar() | ||
225 | { | ||
226 | if (!mUpdate || !LLFloaterMap::getInstance()->getVisible()) | ||
227 | { | ||
228 | return; | ||
229 | } | ||
230 | |||
231 | if (visibleItemsSelected()) | ||
232 | { | ||
233 | mSelectedAvatar = mRadarList->getFirstSelected()->getUUID(); | ||
234 | } | ||
235 | else | ||
236 | { | ||
237 | mSelectedAvatar.setNull(); | ||
238 | } | ||
239 | |||
240 | S32 scroll_pos = mRadarList->getScrollPos(); | ||
241 | |||
242 | // clear count | ||
243 | std::stringstream avatar_count; | ||
244 | avatar_count.str(""); | ||
245 | |||
246 | // find what avatars you can see | ||
247 | F32 range = gSavedSettings.getF32("NearMeRange"); | ||
248 | LLVector3d current_pos = gAgent.getPositionGlobal(); | ||
249 | std::vector<LLUUID> avatar_ids; | ||
250 | std::vector<LLVector3d> positions; | ||
251 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); | ||
252 | |||
253 | LLSD element; | ||
254 | |||
255 | mRadarList->deleteAllItems(); | ||
256 | |||
257 | if (!avatar_ids.empty()) | ||
258 | { | ||
259 | for (U32 i=0; i<avatar_ids.size(); i++) | ||
260 | { | ||
261 | if (avatar_ids[i] == gAgent.getID() || | ||
262 | avatar_ids[i].isNull()) | ||
263 | { | ||
264 | continue; | ||
265 | } | ||
266 | |||
267 | // Add to list only if we get their name | ||
268 | std::string fullname = getSelectedName(avatar_ids[i]); | ||
269 | if (!fullname.empty()) | ||
270 | { | ||
271 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); | ||
272 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); | ||
273 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 | ||
274 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
275 | { | ||
276 | fullname = gRlvHandler.getAnonym(fullname); | ||
277 | notify_chat = false; | ||
278 | notify_sim = false; | ||
279 | } | ||
280 | // [/RLVa:KB] | ||
281 | |||
282 | // check if they're in certain ranges and notify user if we've enabled that | ||
283 | LLVector3d temp = positions[i] - current_pos; | ||
284 | F32 distance = llround((F32)temp.magVec(), 0.1f); | ||
285 | /*char dist[32]; | ||
286 | sprintf(dist, "%.1f", distance); | ||
287 | std::string dist_string = dist;*/ | ||
288 | std::string dist_string = llformat("%.1f", distance); | ||
289 | |||
290 | if (notify_chat) | ||
291 | { | ||
292 | if (distance < 20.0f) | ||
293 | { | ||
294 | if (!isInChatList(avatar_ids[i])) | ||
295 | { | ||
296 | addToChatList(avatar_ids[i], dist_string); | ||
297 | } | ||
298 | } | ||
299 | else | ||
300 | { | ||
301 | if (isInChatList(avatar_ids[i])) | ||
302 | { | ||
303 | removeFromChatList(avatar_ids[i]); | ||
304 | } | ||
305 | } | ||
306 | updateChatList(avatar_ids); | ||
307 | } | ||
308 | else if (!mChatAvatars.empty()) | ||
309 | { | ||
310 | mChatAvatars.clear(); | ||
311 | } | ||
312 | |||
313 | if (notify_sim) | ||
314 | { | ||
315 | if (!isInChatList(avatar_ids[i]) && !getInSimAvList(avatar_ids[i])) | ||
316 | { | ||
317 | LLViewerObject *av_obj = gObjectList.findObject(avatar_ids[i]); | ||
318 | if (av_obj != NULL && av_obj->isAvatar()) | ||
319 | { | ||
320 | LLVOAvatar* avatarp = (LLVOAvatar*)av_obj; | ||
321 | if (avatarp != NULL) | ||
322 | { | ||
323 | if (avatarp->getRegion() == gAgent.getRegion()) | ||
324 | { | ||
325 | addToSimAvList(avatar_ids[i], dist_string); | ||
326 | } | ||
327 | } | ||
328 | } | ||
329 | } | ||
330 | updateSimAvList(avatar_ids); | ||
331 | } | ||
332 | else if (!mSimAvatars.empty()) | ||
333 | { | ||
334 | mSimAvatars.clear(); | ||
335 | } | ||
336 | |||
337 | // only display avatars in range | ||
338 | if (distance <= range) | ||
339 | { | ||
340 | // append typing string | ||
341 | std::string typing = ""; | ||
342 | if (isTyping(avatar_ids[i])) | ||
343 | { | ||
344 | typing = getString("is_typing")+ " "; | ||
345 | } | ||
346 | |||
347 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("is_muted") : ""; | ||
348 | element["id"] = avatar_ids[i]; | ||
349 | element["columns"][0]["column"] = "avatar_name"; | ||
350 | element["columns"][0]["type"] = "text"; | ||
351 | element["columns"][0]["value"] = typing + fullname + " " + mute_text; | ||
352 | element["columns"][1]["column"] = "avatar_distance"; | ||
353 | element["columns"][1]["type"] = "text"; | ||
354 | element["columns"][1]["value"] = dist_string+"m"; | ||
355 | |||
356 | mRadarList->addElement(element, ADD_BOTTOM); | ||
357 | } | ||
358 | } | ||
359 | } | ||
360 | |||
361 | mRadarList->sortItems(); | ||
362 | mRadarList->setScrollPos(scroll_pos); | ||
363 | if (mSelectedAvatar.notNull()) | ||
364 | { | ||
365 | mRadarList->selectByID(mSelectedAvatar); | ||
366 | } | ||
367 | avatar_count << (int)avatar_ids.size(); | ||
368 | } | ||
369 | else | ||
370 | { | ||
371 | mTypingAvatars.clear(); | ||
372 | mRadarList->addCommentText(getString("no_one_near"), ADD_TOP); | ||
373 | avatar_count << "0"; | ||
374 | } | ||
375 | |||
376 | childSetText("lblAvatarCount", avatar_count.str()); | ||
377 | |||
378 | toggleButtons(); | ||
379 | |||
380 | //llinfos << "mSelectedAvatar: " << mSelectedAvatar.asString() << llendl; | ||
381 | } | ||
382 | |||
383 | void LLFloaterMap::updateChatList(std::vector<LLUUID> agent_ids) | ||
384 | { | ||
385 | std::set<LLUUID>::iterator it; | ||
386 | std::vector<LLUUID>::iterator result; | ||
387 | for (it = mChatAvatars.begin(); it != mChatAvatars.end(); ) | ||
388 | { | ||
389 | result = find(agent_ids.begin(), agent_ids.end(), *it); | ||
390 | if (result == agent_ids.end()) | ||
391 | { | ||
392 | mChatAvatars.erase(it++); | ||
393 | } | ||
394 | else | ||
395 | { | ||
396 | it++; | ||
397 | } | ||
398 | } | ||
399 | } | ||
400 | |||
401 | bool LLFloaterMap::isInChatList(LLUUID agent_id) | ||
402 | { | ||
403 | if (mChatAvatars.count(agent_id) > 0) | ||
404 | { | ||
405 | return true; | ||
406 | } | ||
407 | return false; | ||
408 | } | ||
409 | |||
410 | void LLFloaterMap::addToChatList(LLUUID agent_id, std::string distance) | ||
411 | { | ||
412 | mChatAvatars.insert(agent_id); | ||
413 | LLChat chat; | ||
414 | |||
415 | LLUIString notify = getString("entering_chat_range"); | ||
416 | notify.setArg("[NAME]", getSelectedName(agent_id)); | ||
417 | notify.setArg("[DISTANCE]", distance); | ||
418 | |||
419 | chat.mText = notify; | ||
420 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
421 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
422 | } | ||
423 | |||
424 | void LLFloaterMap::removeFromChatList(LLUUID agent_id) | ||
425 | { | ||
426 | // Do we want to add a notice? | ||
427 | mChatAvatars.erase(agent_id); | ||
428 | } | ||
429 | |||
430 | bool LLFloaterMap::isTyping(LLUUID agent_id) | ||
431 | { | ||
432 | if (mTypingAvatars.count(agent_id) > 0) | ||
433 | { | ||
434 | return true; | ||
435 | } | ||
436 | return false; | ||
437 | } | ||
438 | |||
439 | void LLFloaterMap::updateTypingList(LLUUID agent_id, bool remove) | ||
440 | { | ||
441 | if (remove) | ||
442 | { | ||
443 | if (isTyping(agent_id)) | ||
444 | { | ||
445 | mTypingAvatars.erase(agent_id); | ||
446 | } | ||
447 | } | ||
448 | else | ||
449 | { | ||
450 | mTypingAvatars.insert(agent_id); | ||
451 | } | ||
452 | } | ||
453 | |||
454 | void LLFloaterMap::updateSimAvList(std::vector<LLUUID> agent_ids) | ||
455 | { | ||
456 | std::set<LLUUID>::iterator it; | ||
457 | std::vector<LLUUID>::iterator result; | ||
458 | for (it = mSimAvatars.begin(); it != mSimAvatars.end(); ) | ||
459 | { | ||
460 | result = find(agent_ids.begin(), agent_ids.end(), *it); | ||
461 | if (result == agent_ids.end()) | ||
462 | { | ||
463 | mSimAvatars.erase(it++); | ||
464 | } | ||
465 | else | ||
466 | { | ||
467 | it++; | ||
468 | } | ||
469 | } | ||
470 | } | ||
471 | |||
472 | void LLFloaterMap::addToSimAvList(LLUUID agent_id, std::string distance) | ||
473 | { | ||
474 | mSimAvatars.insert(agent_id); | ||
475 | LLChat chat; | ||
476 | |||
477 | LLUIString notify = getString("entering_sim_range"); | ||
478 | notify.setArg("[NAME]", getSelectedName(agent_id)); | ||
479 | notify.setArg("[DISTANCE]", distance); | ||
480 | |||
481 | chat.mText = notify; | ||
482 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
483 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
484 | } | ||
485 | |||
486 | bool LLFloaterMap::getInSimAvList(LLUUID agent_id) | ||
487 | { | ||
488 | if (mSimAvatars.count(agent_id) > 0) | ||
489 | { | ||
490 | return true; | ||
491 | } | ||
492 | return false; | ||
493 | } | ||
494 | |||
495 | void LLFloaterMap::toggleButtons() | ||
496 | { | ||
497 | BOOL enable = FALSE; | ||
498 | BOOL enable_unmute = FALSE; | ||
499 | BOOL enable_track = FALSE; | ||
500 | BOOL enable_estate = FALSE; | ||
501 | BOOL enable_friend = FALSE; | ||
502 | if (childHasFocus("RadarPanel")) | ||
503 | { | ||
504 | enable = mSelectedAvatar.notNull() ? visibleItemsSelected() : FALSE; | ||
505 | enable_unmute = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : FALSE; | ||
506 | enable_track = gAgent.isGodlike() || is_agent_mappable(mSelectedAvatar); | ||
507 | enable_estate = isKickable(mSelectedAvatar); | ||
508 | enable_friend = !is_agent_friend(mSelectedAvatar); | ||
509 | } | ||
510 | else | ||
511 | { | ||
512 | mRadarList->deselect(); | ||
513 | } | ||
514 | |||
515 | childSetEnabled("im_btn", enable); | ||
516 | childSetEnabled("profile_btn", enable); | ||
517 | childSetEnabled("offer_teleport_btn", enable); | ||
518 | childSetEnabled("track_btn", enable_track); | ||
519 | childSetEnabled("invite_btn", enable); | ||
520 | childSetEnabled("add_btn", enable); | ||
521 | childSetEnabled("freeze_btn", enable_estate); | ||
522 | childSetEnabled("eject_btn", enable_estate); | ||
523 | childSetEnabled("mute_btn", enable); | ||
524 | childSetEnabled("ar_btn", enable); | ||
525 | childSetEnabled("estate_eject_btn", enable_estate); | ||
526 | |||
527 | if (enable_unmute) | ||
528 | { | ||
529 | childSetVisible("mute_btn", false); | ||
530 | childSetEnabled("unmute_btn", true); | ||
531 | childSetVisible("unmute_btn", true); | ||
532 | } | ||
533 | else | ||
534 | { | ||
535 | childSetVisible("mute_btn", true); | ||
536 | childSetVisible("unmute_btn", false); | ||
537 | } | ||
538 | |||
539 | // [RLVa:KB] - Imprudence-1.2.0 | ||
540 | // Bit clumsy, but this way the RLV stuff is in its own separate block and keeps the code above clean - Kitty | ||
541 | if ( (rlv_handler_t::isEnabled()) && (mSelectedAvatar.notNull()) ) | ||
542 | { | ||
543 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
544 | { | ||
545 | childSetEnabled("im_btn", FALSE); | ||
546 | childSetEnabled("profile_btn", FALSE); | ||
547 | childSetEnabled("invite_btn", FALSE); | ||
548 | childSetEnabled("add_btn", FALSE); | ||
549 | childSetEnabled("mute_btn", FALSE); | ||
550 | childSetEnabled("unmute_btn", FALSE); | ||
551 | } | ||
552 | |||
553 | // Even though the avie is in the same sim (so they already know where we are) the tp would just get blocked by different code | ||
554 | // so it's actually less confusing to the user if we just disable the teleport button here so they'll at least have a visual cue | ||
555 | BOOL rlv_enable_tp = (!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, mSelectedAvatar)); | ||
556 | if ( (rlv_enable_tp) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
557 | { | ||
558 | const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(mSelectedAvatar); | ||
559 | if ( ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) | ||
560 | rlv_enable_tp = FALSE; | ||
561 | } | ||
562 | childSetEnabled("offer_teleport_btn", rlv_enable_tp); | ||
563 | } | ||
564 | // [/RLVa:KB] | ||
565 | } | ||
566 | |||
567 | BOOL LLFloaterMap::isKickable(const LLUUID &agent_id) | ||
568 | { | ||
569 | if (agent_id.notNull()) | ||
570 | { | ||
571 | LLViewerObject* av_obj = gObjectList.findObject(agent_id); | ||
572 | if (av_obj != NULL && av_obj->isAvatar()) | ||
573 | { | ||
574 | LLVOAvatar* avatar = (LLVOAvatar*)av_obj; | ||
575 | LLViewerRegion* region = avatar->getRegion(); | ||
576 | if (region) | ||
577 | { | ||
578 | const LLVector3& pos = avatar->getPositionRegion(); | ||
579 | const LLVector3d& pos_global = avatar->getPositionGlobal(); | ||
580 | if (LLWorld::getInstance()->positionRegionValidGlobal(pos_global)) | ||
581 | { | ||
582 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global)->getParcel(); | ||
583 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
584 | |||
585 | BOOL new_value = (region != NULL); | ||
586 | |||
587 | if (new_value) | ||
588 | { | ||
589 | new_value = region->isOwnedSelf(pos); | ||
590 | if (!new_value || region->isOwnedGroup(pos)) | ||
591 | { | ||
592 | new_value = LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_ADMIN); | ||
593 | } | ||
594 | } | ||
595 | return new_value; | ||
596 | } | ||
597 | } | ||
598 | } | ||
599 | } | ||
600 | return FALSE; | ||
601 | } | ||
602 | |||
603 | // static | ||
604 | void LLFloaterMap::onList(LLUICtrl* ctrl, void* user_data) | ||
605 | { | ||
606 | LLFloaterMap* self = (LLFloaterMap*)user_data; | ||
607 | if (self) | ||
608 | { | ||
609 | self->toggleButtons(); | ||
610 | } | ||
611 | } | ||
612 | |||
613 | BOOL LLFloaterMap::visibleItemsSelected() const | ||
614 | { | ||
615 | if (mRadarList->getFirstSelectedIndex() >= 0) | ||
616 | { | ||
617 | return TRUE; | ||
618 | } | ||
619 | return FALSE; | ||
620 | } | ||
621 | |||
622 | // static | ||
623 | void LLFloaterMap::onRangeChange(LLFocusableElement* focus, void* user_data) | ||
624 | { | ||
625 | LLFloaterMap* self = (LLFloaterMap*)user_data; | ||
626 | if (self) | ||
627 | { | ||
628 | self->mUpdate = !(self->childHasFocus("near_me_range")); | ||
629 | } | ||
630 | } | ||
631 | |||
632 | // static | ||
633 | LLUUID LLFloaterMap::getSelected() | ||
634 | { | ||
635 | return LLFloaterMap::getInstance()->mSelectedAvatar; | ||
636 | } | ||
637 | |||
638 | // | ||
639 | // Avatar tab | ||
640 | // | ||
641 | |||
642 | // static | ||
643 | void LLFloaterMap::onClickIM(void* user_data) | ||
644 | { | ||
645 | LLFloaterMap* self = (LLFloaterMap*) user_data; | ||
646 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
647 | if (item != NULL) | ||
648 | { | ||
649 | LLUUID agent_id = item->getUUID(); | ||
650 | gIMMgr->setFloaterOpen(TRUE); | ||
651 | gIMMgr->addSession(getSelectedName(agent_id), IM_NOTHING_SPECIAL, agent_id); | ||
652 | } | ||
653 | } | ||
654 | |||
655 | // static | ||
656 | void LLFloaterMap::onClickProfile(void* user_data) | ||
657 | { | ||
658 | LLFloaterMap* self = (LLFloaterMap*) user_data; | ||
659 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
660 | if (item != NULL) | ||
661 | { | ||
662 | LLUUID agent_id = item->getUUID(); | ||
663 | LLFloaterAvatarInfo::show(agent_id); | ||
664 | } | ||
665 | } | ||
666 | 164 | ||
667 | // static | 165 | PanelRadar* LLFloaterMap::getRadar() |
668 | void LLFloaterMap::onClickOfferTeleport(void* user_data) | ||
669 | { | 166 | { |
670 | LLFloaterMap* self = (LLFloaterMap*) user_data; | 167 | return mPanelRadar; |
671 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
672 | if (item != NULL) | ||
673 | { | ||
674 | LLUUID agent_id = item->getUUID(); | ||
675 | handle_lure(agent_id); | ||
676 | } | ||
677 | } | 168 | } |
678 | 169 | ||
679 | // static | ||
680 | void LLFloaterMap::onClickTrack(void* user_data) | ||
681 | { | ||
682 | LLFloaterMap* self = (LLFloaterMap*) user_data; | ||
683 | LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); | ||
684 | |||
685 | if (LLTracker::TRACKING_AVATAR == tracking_status) | ||
686 | { | ||
687 | LLTracker::stopTracking(NULL); | ||
688 | } | ||
689 | else | ||
690 | { | ||
691 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
692 | if (item != NULL) | ||
693 | { | ||
694 | LLUUID agent_id = item->getUUID(); | ||
695 | LLTracker::trackAvatar(agent_id, getSelectedName(agent_id)); | ||
696 | } | ||
697 | } | ||
698 | } | ||
699 | |||
700 | // static | ||
701 | void LLFloaterMap::onClickInvite(void* user_data) | ||
702 | { | ||
703 | LLFloaterMap* self = (LLFloaterMap*) user_data; | ||
704 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
705 | if (item != NULL) | ||
706 | { | ||
707 | LLUUID agent_id = item->getUUID(); | ||
708 | LLFloaterGroupPicker* widget; | ||
709 | widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); | ||
710 | if (widget) | ||
711 | { | ||
712 | widget->center(); | ||
713 | widget->setPowersMask(GP_MEMBER_INVITE); | ||
714 | widget->setSelectCallback(callback_invite_to_group, (void *)&agent_id); | ||
715 | } | ||
716 | } | ||
717 | } | ||
718 | |||
719 | // static | ||
720 | void LLFloaterMap::callback_invite_to_group(LLUUID group_id, void *user_data) | ||
721 | { | ||
722 | std::vector<LLUUID> agent_ids; | ||
723 | agent_ids.push_back(*(LLUUID *)user_data); | ||
724 | |||
725 | LLFloaterGroupInvite::showForGroup(group_id, &agent_ids); | ||
726 | } | ||
727 | 170 | ||
728 | // static | 171 | // static |
729 | void LLFloaterMap::onClickAddFriend(void* user_data) | 172 | void LLFloaterMap::onToggleRadar(void *user_data) |
730 | { | 173 | { |
731 | LLFloaterMap* self = (LLFloaterMap*) user_data; | 174 | LLFloaterMap* self = (LLFloaterMap*) user_data; |
732 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | 175 | self->toggleRadarVisible(); |
733 | if (item != NULL) | ||
734 | { | ||
735 | LLUUID agent_id = item->getUUID(); | ||
736 | LLPanelFriends::requestFriendshipDialog(agent_id, getSelectedName(agent_id)); | ||
737 | } | ||
738 | } | 176 | } |
739 | 177 | ||
740 | // | ||
741 | // Estate tab | ||
742 | // | ||
743 | 178 | ||
744 | //static | 179 | void LLFloaterMap::toggleRadarVisible() |
745 | std::string LLFloaterMap::getSelectedName(const LLUUID &agent_id) | ||
746 | { | 180 | { |
747 | std::string agent_name; | 181 | bool show_radar = gSavedSettings.getBOOL("ShowMiniMapRadar"); |
748 | if(gCacheName->getFullName(agent_id, agent_name) && agent_name != " ") | 182 | show_radar = !show_radar; |
749 | { | 183 | setRadarVisible( show_radar ); |
750 | return agent_name; | ||
751 | } | ||
752 | return LLStringUtil::null; | ||
753 | } | 184 | } |
754 | 185 | ||
755 | //static | ||
756 | void LLFloaterMap::callbackFreeze(S32 option, void *user_data) | ||
757 | { | ||
758 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
759 | |||
760 | if ( option == 0 ) | ||
761 | { | ||
762 | sendFreeze(self->mSelectedAvatar, true); | ||
763 | } | ||
764 | else if ( option == 1 ) | ||
765 | { | ||
766 | sendFreeze(self->mSelectedAvatar, false); | ||
767 | } | ||
768 | } | ||
769 | 186 | ||
770 | //static | 187 | void LLFloaterMap::setRadarVisible( bool show_radar ) |
771 | void LLFloaterMap::callbackEject(S32 option, void *user_data) | ||
772 | { | 188 | { |
773 | LLFloaterMap *self = (LLFloaterMap*)user_data; | 189 | bool old_show_radar = gSavedSettings.getBOOL("ShowMiniMapRadar"); |
774 | |||
775 | if ( option == 0 ) | ||
776 | { | ||
777 | sendEject(self->mSelectedAvatar, false); | ||
778 | } | ||
779 | else if ( option == 1 ) | ||
780 | { | ||
781 | sendEject(self->mSelectedAvatar, true); | ||
782 | } | ||
783 | } | ||
784 | 190 | ||
785 | //static | 191 | gSavedSettings.setBOOL("ShowMiniMapRadar", show_radar); |
786 | void LLFloaterMap::callbackEjectFromEstate(S32 option, void *user_data) | 192 | setRadarButtonState( show_radar ); |
787 | { | 193 | mPanelRadar->setVisible( show_radar ); |
788 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
789 | 194 | ||
790 | if ( option == 0 ) | 195 | // Adjust the minimap window's size if visibility is changing |
196 | if (show_radar != old_show_radar) | ||
791 | { | 197 | { |
792 | cmdEstateEject(self->mSelectedAvatar); | 198 | adjustLayout( show_radar ); |
793 | } | ||
794 | else if ( option == 1 ) | ||
795 | { | ||
796 | cmdEstateBan(self->mSelectedAvatar); | ||
797 | } | 199 | } |
798 | } | 200 | } |
799 | 201 | ||
800 | void LLFloaterMap::onClickFreeze(void *user_data) | ||
801 | { | ||
802 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
803 | LLStringUtil::format_map_t args; | ||
804 | LLSD payload; | ||
805 | args["[AVATAR_NAME]"] = getSelectedName(self->mSelectedAvatar); | ||
806 | gViewerWindow->alertXml("FreezeAvatarFullname", args, callbackFreeze, user_data); | ||
807 | } | ||
808 | 202 | ||
809 | //static | 203 | void LLFloaterMap::setRadarButtonState( bool showing_radar ) |
810 | void LLFloaterMap::onClickEject(void *user_data) | ||
811 | { | 204 | { |
812 | LLFloaterMap *self = (LLFloaterMap*)user_data; | 205 | LLButton* toggle = getChild<LLButton>("toggle_radar"); |
813 | LLStringUtil::format_map_t args; | 206 | if (toggle) |
814 | LLSD payload; | ||
815 | args["AVATAR_NAME"] = getSelectedName(self->mSelectedAvatar); | ||
816 | gViewerWindow->alertXml("EjectAvatarFullName", args, callbackEject, user_data); | ||
817 | } | ||
818 | |||
819 | //static | ||
820 | void LLFloaterMap::onClickMute(void *user_data) | ||
821 | { | ||
822 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
823 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
824 | if (item != NULL) | ||
825 | { | 207 | { |
826 | LLUUID agent_id = item->getUUID(); | 208 | toggle->setToggleState(showing_radar); |
827 | std::string agent_name = getSelectedName(agent_id); | 209 | if (showing_radar) |
828 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
829 | { | 210 | { |
830 | //LLMute mute(agent_id, agent_name, LLMute::AGENT); | 211 | // Expanded, so show image to offer to collapse upwards. |
831 | //LLMuteList::getInstance()->remove(mute); | 212 | toggle->setImageOverlay("arrow_up.tga"); |
832 | //LLFloaterMute::getInstance()->selectMute(agent_id); | ||
833 | } | 213 | } |
834 | else | 214 | else |
835 | { | 215 | { |
836 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | 216 | // Collapsed, so show image to offer to expand downwards. |
837 | LLMuteList::getInstance()->add(mute); | 217 | toggle->setImageOverlay("arrow_down.tga"); |
838 | } | 218 | } |
839 | } | 219 | } |
840 | } | 220 | } |
841 | 221 | ||
842 | //static | ||
843 | void LLFloaterMap::onClickUnmute(void *user_data) | ||
844 | { | ||
845 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
846 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
847 | if (item != NULL) | ||
848 | { | ||
849 | LLUUID agent_id = item->getUUID(); | ||
850 | std::string agent_name = getSelectedName(agent_id); | ||
851 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
852 | { | ||
853 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
854 | LLMuteList::getInstance()->remove(mute); | ||
855 | //LLFloaterMute::getInstance()->selectMute(agent_id); | ||
856 | } | ||
857 | else | ||
858 | { | ||
859 | //LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
860 | //LLMuteList::getInstance()->add(mute); | ||
861 | } | ||
862 | } | ||
863 | } | ||
864 | |||
865 | //static | ||
866 | void LLFloaterMap::onClickEjectFromEstate(void *user_data) | ||
867 | { | ||
868 | LLFloaterMap *self = (LLFloaterMap*)user_data; | ||
869 | LLStringUtil::format_map_t args; | ||
870 | LLSD payload; | ||
871 | args["EVIL_USER"] = getSelectedName(self->mSelectedAvatar); | ||
872 | gViewerWindow->alertXml("EstateKickUser", args, callbackEjectFromEstate, user_data); | ||
873 | } | ||
874 | 222 | ||
875 | //static | 223 | void LLFloaterMap::adjustLayout( bool expand ) |
876 | void LLFloaterMap::onClickAR(void *user_data) | ||
877 | { | 224 | { |
878 | LLFloaterMap *self = (LLFloaterMap*)user_data; | 225 | S32 radar_height = mPanelRadar->getRect().getHeight(); |
879 | LLUUID agent_id = self->mSelectedAvatar; | 226 | S32 height = getRect().getHeight(); |
880 | 227 | LLRect map_rect = mPanelMap->getRect(); | |
881 | if (agent_id.notNull()) | 228 | S32 map_bottom = map_rect.mBottom; |
882 | { | ||
883 | LLFloaterReporter::showFromObject(agent_id); | ||
884 | } | ||
885 | } | ||
886 | 229 | ||
887 | // static | 230 | S32 min_width, min_height; |
888 | void LLFloaterMap::cmdEstateEject(const LLUUID &avatar) | 231 | getResizeLimits( &min_width, &min_height ); |
889 | { | ||
890 | sendEstateMessage("teleporthomeuser", avatar); | ||
891 | } | ||
892 | 232 | ||
893 | // static | 233 | S32 adjust = radar_height; |
894 | void LLFloaterMap::cmdEstateBan(const LLUUID &avatar) | 234 | if (!expand) |
895 | { | ||
896 | sendEstateMessage("teleporthomeuser", avatar); // Kick first, just to be sure | ||
897 | sendEstateBan(avatar); | ||
898 | } | ||
899 | |||
900 | // static | ||
901 | void LLFloaterMap::sendFreeze(const LLUUID& avatar_id, bool freeze) | ||
902 | { | ||
903 | U32 flags = 0x0; | ||
904 | if (!freeze) | ||
905 | { | 235 | { |
906 | // unfreeze | 236 | adjust = -adjust; |
907 | flags |= 0x1; | ||
908 | } | 237 | } |
238 | |||
239 | height += adjust; | ||
240 | min_height += adjust; | ||
241 | map_bottom += adjust; | ||
909 | 242 | ||
910 | LLMessageSystem* msg = gMessageSystem; | 243 | map_rect.set( map_rect.mLeft, map_rect.mTop, |
911 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | 244 | map_rect.mRight, map_bottom ); |
245 | mPanelMap->setRect(map_rect); | ||
912 | 246 | ||
913 | if (avatar) | 247 | setResizeLimits( min_width, min_height ); |
914 | { | 248 | reshape( getRect().getWidth(), height, false ); |
915 | msg->newMessage("FreezeUser"); | ||
916 | msg->nextBlock("AgentData"); | ||
917 | msg->addUUID("AgentID", gAgent.getID()); | ||
918 | msg->addUUID("SessionID", gAgent.getSessionID()); | ||
919 | msg->nextBlock("Data"); | ||
920 | msg->addUUID("TargetID", avatar_id ); | ||
921 | msg->addU32("Flags", flags ); | ||
922 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
923 | } | ||
924 | } | ||
925 | 249 | ||
926 | // static | 250 | LLRect temp_rect = getRect(); |
927 | void LLFloaterMap::sendEject(const LLUUID& avatar_id, bool ban) | 251 | temp_rect.translate( 0, -adjust ); |
928 | { | 252 | setRect( temp_rect ); |
929 | LLMessageSystem* msg = gMessageSystem; | ||
930 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
931 | 253 | ||
932 | if (avatar) | 254 | LLButton* toggle = getChild<LLButton>("toggle_radar"); |
255 | if (toggle) | ||
933 | { | 256 | { |
934 | U32 flags = 0x0; | 257 | temp_rect = toggle->getRect(); |
935 | if ( ban ) | 258 | temp_rect.translate( 0, adjust ); |
936 | { | 259 | toggle->setRect( temp_rect ); |
937 | // eject and add to ban list | ||
938 | flags |= 0x1; | ||
939 | } | ||
940 | |||
941 | msg->newMessage("EjectUser"); | ||
942 | msg->nextBlock("AgentData"); | ||
943 | msg->addUUID("AgentID", gAgent.getID() ); | ||
944 | msg->addUUID("SessionID", gAgent.getSessionID() ); | ||
945 | msg->nextBlock("Data"); | ||
946 | msg->addUUID("TargetID", avatar_id ); | ||
947 | msg->addU32("Flags", flags ); | ||
948 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
949 | } | 260 | } |
950 | } | 261 | } |
951 | |||
952 | // static | ||
953 | void LLFloaterMap::sendEstateMessage(const char* request, const LLUUID &target) | ||
954 | { | ||
955 | |||
956 | LLMessageSystem* msg = gMessageSystem; | ||
957 | LLUUID invoice; | ||
958 | |||
959 | // This seems to provide an ID so that the sim can say which request it's | ||
960 | // replying to. I think this can be ignored for now. | ||
961 | invoice.generate(); | ||
962 | |||
963 | llinfos << "Sending estate request '" << request << "'" << llendl; | ||
964 | msg->newMessage("EstateOwnerMessage"); | ||
965 | msg->nextBlockFast(_PREHASH_AgentData); | ||
966 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
967 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
968 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
969 | msg->nextBlock("MethodData"); | ||
970 | msg->addString("Method", request); | ||
971 | msg->addUUID("Invoice", invoice); | ||
972 | |||
973 | // Agent id | ||
974 | msg->nextBlock("ParamList"); | ||
975 | msg->addString("Parameter", gAgent.getID().asString().c_str()); | ||
976 | |||
977 | // Target | ||
978 | msg->nextBlock("ParamList"); | ||
979 | msg->addString("Parameter", target.asString().c_str()); | ||
980 | |||
981 | msg->sendReliable(gAgent.getRegion()->getHost()); | ||
982 | } | ||
983 | |||
984 | // static | ||
985 | void LLFloaterMap::sendEstateBan(const LLUUID& agent) | ||
986 | { | ||
987 | LLUUID invoice; | ||
988 | U32 flags = ESTATE_ACCESS_BANNED_AGENT_ADD; | ||
989 | |||
990 | invoice.generate(); | ||
991 | |||
992 | LLMessageSystem* msg = gMessageSystem; | ||
993 | msg->newMessage("EstateOwnerMessage"); | ||
994 | msg->nextBlockFast(_PREHASH_AgentData); | ||
995 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
996 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
997 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
998 | |||
999 | msg->nextBlock("MethodData"); | ||
1000 | msg->addString("Method", "estateaccessdelta"); | ||
1001 | msg->addUUID("Invoice", invoice); | ||
1002 | |||
1003 | char buf[MAX_STRING]; /* Flawfinder: ignore*/ | ||
1004 | gAgent.getID().toString(buf); | ||
1005 | msg->nextBlock("ParamList"); | ||
1006 | msg->addString("Parameter", buf); | ||
1007 | |||
1008 | snprintf(buf, MAX_STRING, "%u", flags); /* Flawfinder: ignore */ | ||
1009 | msg->nextBlock("ParamList"); | ||
1010 | msg->addString("Parameter", buf); | ||
1011 | |||
1012 | agent.toString(buf); | ||
1013 | msg->nextBlock("ParamList"); | ||
1014 | msg->addString("Parameter", buf); | ||
1015 | |||
1016 | gAgent.sendReliableMessage(); | ||
1017 | } | ||
diff --git a/linden/indra/newview/llfloatermap.h b/linden/indra/newview/llfloatermap.h index c457b9f..5b0497f 100644 --- a/linden/indra/newview/llfloatermap.h +++ b/linden/indra/newview/llfloatermap.h | |||
@@ -34,7 +34,7 @@ | |||
34 | #define LL_LLFLOATERMAP_H | 34 | #define LL_LLFLOATERMAP_H |
35 | 35 | ||
36 | #include "llfloater.h" | 36 | #include "llfloater.h" |
37 | #include "llscrolllistctrl.h" | 37 | #include "panelradar.h" |
38 | 38 | ||
39 | class LLNetMap; | 39 | class LLNetMap; |
40 | 40 | ||
@@ -47,85 +47,32 @@ public: | |||
47 | virtual ~LLFloaterMap(); | 47 | virtual ~LLFloaterMap(); |
48 | 48 | ||
49 | static void* createPanelMiniMap(void* data); | 49 | static void* createPanelMiniMap(void* data); |
50 | 50 | static void* createPanelRadar(void* data); | |
51 | static void updateRadar(); | ||
52 | static LLUUID getSelected(); | ||
53 | // returns true if agent_id belongs to a developer listed in llfloatermap.cpp | ||
54 | static bool isImpDev(LLUUID agent_id); | ||
55 | |||
56 | bool isTyping(LLUUID agent_id); | ||
57 | void updateTypingList(LLUUID agent_id, bool remove); | ||
58 | 51 | ||
59 | BOOL postBuild(); | 52 | BOOL postBuild(); |
60 | 53 | ||
61 | /*virtual*/ void draw(); | 54 | /*virtual*/ void draw(); |
62 | /*virtual*/ void onOpen(); | 55 | /*virtual*/ void onOpen(); |
63 | /*virtual*/ void onClose(bool app_quitting); | 56 | /*virtual*/ void onClose(bool app_quitting); |
64 | /*virtual*/ BOOL canClose(); | 57 | /*virtual*/ BOOL canClose(); |
65 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c) | 58 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-05 (RLVa-1.0.0c) |
66 | /*virtual*/ void open(); | 59 | /*virtual*/ void open(); |
67 | // [/RLVa:KB] | 60 | // [/RLVa:KB] |
68 | 61 | ||
62 | PanelRadar* getRadar(); | ||
69 | 63 | ||
70 | private: | 64 | private: |
71 | 65 | ||
72 | LLFloaterMap(const LLSD& key = LLSD()); | 66 | LLFloaterMap(const LLSD& key = LLSD()); |
73 | 67 | ||
74 | LLNetMap* mPanelMap; | 68 | LLNetMap* mPanelMap; |
75 | LLScrollListCtrl* mRadarList; | 69 | PanelRadar* mPanelRadar; |
76 | LLUUID mSelectedAvatar; | ||
77 | |||
78 | // TODO: move all this info into its own object. It's stupid | ||
79 | // and bug-prone to keep it all in separate containers, but | ||
80 | // I want to get this out for 1.2 -- McCabe | ||
81 | std::set<LLUUID> mChatAvatars; | ||
82 | std::set<LLUUID> mTypingAvatars; | ||
83 | std::set<LLUUID> mSimAvatars; | ||
84 | bool mUpdate; | ||
85 | |||
86 | static void onList(LLUICtrl* ctrl, void* user_data); | ||
87 | static void onRangeChange(LLFocusableElement* focus, void* user_data); | ||
88 | BOOL visibleItemsSelected() const; | ||
89 | BOOL isKickable(const LLUUID &agent_id); | ||
90 | void toggleButtons(); | ||
91 | void populateRadar(); | ||
92 | |||
93 | void updateChatList(std::vector<LLUUID> agent_ids); | ||
94 | bool isInChatList(LLUUID agent_id); | ||
95 | void addToChatList(LLUUID agent_id, std::string distance); | ||
96 | void removeFromChatList(LLUUID agent_id); | ||
97 | |||
98 | bool getInSimAvList(LLUUID agent_id); | ||
99 | void addToSimAvList(LLUUID agent_id, std::string distance); | ||
100 | void updateSimAvList(std::vector<LLUUID> agent_ids); | ||
101 | |||
102 | static void onClickProfile(void* user_data); | ||
103 | static void onClickIM(void* user_data); | ||
104 | static void onClickAddFriend(void* user_data); | ||
105 | static void onClickOfferTeleport(void* user_data); | ||
106 | static void onClickTrack(void* user_data); | ||
107 | static void onClickInvite(void* user_data); | ||
108 | static void callback_invite_to_group(LLUUID group_id, void *user_data); | ||
109 | |||
110 | static std::string getSelectedName(const LLUUID &agent_id); | ||
111 | static void onClickFreeze(void *user_data); | ||
112 | static void onClickEject(void *user_data); | ||
113 | static void onClickMute(void *user_data); | ||
114 | static void onClickUnmute(void *user_data); | ||
115 | static void onClickAR(void *user_data); | ||
116 | static void onClickEjectFromEstate(void *user_data); | ||
117 | |||
118 | static void callbackFreeze(S32 option, void *user_data); | ||
119 | static void callbackEject(S32 option, void *user_data); | ||
120 | static void callbackAR(void *user_data); | ||
121 | static void callbackEjectFromEstate(S32 option, void *user_data); | ||
122 | 70 | ||
123 | static void sendFreeze(const LLUUID &avatar, bool); | 71 | static void onToggleRadar(void *user_data); |
124 | static void sendEject(const LLUUID &avatar, bool); | 72 | void toggleRadarVisible(); |
125 | static void cmdEstateEject(const LLUUID &avatar); | 73 | void setRadarVisible( bool show_radar ); |
126 | static void cmdEstateBan(const LLUUID &avatar); | 74 | void setRadarButtonState(bool showing_radar); |
127 | static void sendEstateBan(const LLUUID& agent); | 75 | void adjustLayout( bool expand ); |
128 | static void sendEstateMessage(const char* request, const LLUUID &target); | ||
129 | }; | 76 | }; |
130 | 77 | ||
131 | #endif // LL_LLFLOATERMAP_H | 78 | #endif // LL_LLFLOATERMAP_H |
diff --git a/linden/indra/newview/llfloateropenobject.cpp b/linden/indra/newview/llfloateropenobject.cpp index d7fdece..fc483dd 100644 --- a/linden/indra/newview/llfloateropenobject.cpp +++ b/linden/indra/newview/llfloateropenobject.cpp | |||
@@ -208,18 +208,7 @@ void LLFloaterOpenObject::onClickMoveToInventory(void* data) | |||
208 | void LLFloaterOpenObject::onClickMoveAndWear(void* data) | 208 | void LLFloaterOpenObject::onClickMoveAndWear(void* data) |
209 | { | 209 | { |
210 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; | 210 | LLFloaterOpenObject* self = (LLFloaterOpenObject*)data; |
211 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Deprecated: RLVa-0.2.2a | 211 | self->moveToInventory(true); |
212 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
213 | { | ||
214 | // TODO-RLVa: once we have "Add to Outfit" and "Replace Outfit" working we don't need this anymore | ||
215 | self->moveToInventory(false); | ||
216 | } | ||
217 | else | ||
218 | { | ||
219 | self->moveToInventory(true); | ||
220 | } | ||
221 | // [/RLVa:KB] | ||
222 | // self->moveToInventory(true); | ||
223 | self->close(); | 212 | self->close(); |
224 | } | 213 | } |
225 | 214 | ||
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp index 9257349..fbb90a9 100644 --- a/linden/indra/newview/llfloaterworldmap.cpp +++ b/linden/indra/newview/llfloaterworldmap.cpp | |||
@@ -779,7 +779,7 @@ void LLFloaterWorldMap::updateLocation() | |||
779 | void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord) | 779 | void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord) |
780 | { | 780 | { |
781 | LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name); | 781 | LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name); |
782 | z_coord = llclamp(z_coord, 0, 1000); | 782 | z_coord = llclamp(z_coord, 0, 4096); |
783 | if (sim_info) | 783 | if (sim_info) |
784 | { | 784 | { |
785 | LLVector3 local_pos; | 785 | LLVector3 local_pos; |
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index 5a4fad7..1e86301 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -489,6 +489,20 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
489 | items.push_back(std::string("Open")); | 489 | items.push_back(std::string("Open")); |
490 | items.push_back(std::string("Properties")); | 490 | items.push_back(std::string("Properties")); |
491 | 491 | ||
492 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c | ||
493 | if (rlv_handler_t::isEnabled()) | ||
494 | { | ||
495 | LLInventoryObject* pItem = (mInventoryPanel->getModel()) ? mInventoryPanel->getModel()->getObject(mUUID) : NULL; | ||
496 | if ( (pItem) && | ||
497 | ( ((LLAssetType::AT_NOTECARD == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE))) || | ||
498 | ((LLAssetType::AT_LSL_TEXT == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT))) || | ||
499 | ((LLAssetType::AT_NOTECARD == pItem->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) ) | ||
500 | { | ||
501 | disabled_items.push_back(std::string("Open")); | ||
502 | } | ||
503 | } | ||
504 | // [/RLVa:KB] | ||
505 | |||
492 | getClipboardEntries(true, items, disabled_items, flags); | 506 | getClipboardEntries(true, items, disabled_items, flags); |
493 | } | 507 | } |
494 | hideContextEntries(menu, items, disabled_items); | 508 | hideContextEntries(menu, items, disabled_items); |
@@ -2472,6 +2486,13 @@ void open_texture(const LLUUID& item_id, | |||
2472 | const LLUUID& source_id, | 2486 | const LLUUID& source_id, |
2473 | BOOL take_focus) | 2487 | BOOL take_focus) |
2474 | { | 2488 | { |
2489 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Added: RLVa-1.0.5c | ||
2490 | if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE)) | ||
2491 | { | ||
2492 | return; | ||
2493 | } | ||
2494 | // [/RLVa:KB] | ||
2495 | |||
2475 | // See if we can bring an exiting preview to the front | 2496 | // See if we can bring an exiting preview to the front |
2476 | if( !LLPreview::show( item_id, take_focus ) ) | 2497 | if( !LLPreview::show( item_id, take_focus ) ) |
2477 | { | 2498 | { |
@@ -3305,11 +3326,11 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model | |||
3305 | item = (LLViewerInventoryItem*)gInventory.getItem(object_id); | 3326 | item = (LLViewerInventoryItem*)gInventory.getItem(object_id); |
3306 | if(item && gInventory.isObjectDescendentOf(object_id, gAgent.getInventoryRootID())) | 3327 | if(item && gInventory.isObjectDescendentOf(object_id, gAgent.getInventoryRootID())) |
3307 | { | 3328 | { |
3308 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 3329 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
3309 | // User picked "Wear" so either nothing is locked, or we need to look up the specific attach point from its name | 3330 | // User picked "Wear" so either nothing is locked, or we need to look up the specific attach point from its name |
3310 | // (NOTE: rez_attachment will take care of deciding whether or not we *can* attach) | 3331 | // (NOTE: rez_attachment will take care of deciding whether or not we *can* attach) |
3311 | rez_attachment(item, | 3332 | rez_attachment(item, |
3312 | ((!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment()) || (RlvSettings::getEnableWear())) | 3333 | ((!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) || (RlvSettings::getEnableWear())) |
3313 | ? NULL : gRlvHandler.getAttachPoint(item, true)); | 3334 | ? NULL : gRlvHandler.getAttachPoint(item, true)); |
3314 | // [/RLVa:KB] | 3335 | // [/RLVa:KB] |
3315 | // rez_attachment(item, NULL); | 3336 | // rez_attachment(item, NULL); |
@@ -3332,9 +3353,9 @@ void LLObjectBridge::performAction(LLFolderView* folder, LLInventoryModel* model | |||
3332 | { | 3353 | { |
3333 | LLInventoryItem* item = gInventory.getItem(mUUID); | 3354 | LLInventoryItem* item = gInventory.getItem(mUUID); |
3334 | 3355 | ||
3335 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 3356 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
3336 | // Fall-through: if there's a "Detach from yourself" code path we missed then we'll still disallow the detach here | 3357 | // Fall-through: if there's a "Detach from yourself" code path we missed then we'll still disallow the detach here |
3337 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(item)) ) | 3358 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(item, RLV_LOCK_REMOVE)) ) |
3338 | { | 3359 | { |
3339 | return; | 3360 | return; |
3340 | } | 3361 | } |
@@ -3504,9 +3525,12 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3504 | { | 3525 | { |
3505 | items.push_back(std::string("Detach From Yourself")); | 3526 | items.push_back(std::string("Detach From Yourself")); |
3506 | 3527 | ||
3507 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 3528 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
3508 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(item)) ) | 3529 | if ( (rlv_handler_t::isEnabled()) && |
3530 | (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) && (gRlvHandler.isLockedAttachment(item, RLV_LOCK_REMOVE)) ) | ||
3531 | { | ||
3509 | disabled_items.push_back(std::string("Detach From Yourself")); | 3532 | disabled_items.push_back(std::string("Detach From Yourself")); |
3533 | } | ||
3510 | // [/RLVa:KB] | 3534 | // [/RLVa:KB] |
3511 | } | 3535 | } |
3512 | else | 3536 | else |
@@ -3519,13 +3543,16 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3519 | items.push_back(std::string("RestoreToWorld Separator")); | 3543 | items.push_back(std::string("RestoreToWorld Separator")); |
3520 | items.push_back(std::string("Restore to Last Position")); | 3544 | items.push_back(std::string("Restore to Last Position")); |
3521 | 3545 | ||
3522 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0c | 3546 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
3523 | // Only enable "Wear" if there is an attach point name *and* there isn't a worn attachment there that's currently locked | 3547 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
3524 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment()) ) | ||
3525 | { | 3548 | { |
3526 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); | 3549 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); // The item's name should specify |
3527 | if ( (!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt)) ) | 3550 | if ( (!pAttachPt) || // an attachment point that |
3551 | (gRlvHandler.isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) || // doesn't have an undetachable object | ||
3552 | (gRlvHandler.isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) // and that can be attached to | ||
3553 | { | ||
3528 | disabled_items.push_back(std::string("Object Wear")); | 3554 | disabled_items.push_back(std::string("Object Wear")); |
3555 | } | ||
3529 | } | 3556 | } |
3530 | // [/RLVa:KB] | 3557 | // [/RLVa:KB] |
3531 | 3558 | ||
@@ -3628,6 +3655,13 @@ LLUIImagePtr LLLSLTextBridge::getIcon() const | |||
3628 | 3655 | ||
3629 | void LLLSLTextBridge::openItem() | 3656 | void LLLSLTextBridge::openItem() |
3630 | { | 3657 | { |
3658 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c | ||
3659 | if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) | ||
3660 | { | ||
3661 | return; | ||
3662 | } | ||
3663 | // [/RLVa:KB] | ||
3664 | |||
3631 | // See if we can bring an exiting preview to the front | 3665 | // See if we can bring an exiting preview to the front |
3632 | if(!LLPreview::show(mUUID)) | 3666 | if(!LLPreview::show(mUUID)) |
3633 | { | 3667 | { |
@@ -4069,15 +4103,26 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) | |||
4069 | is_gesture); | 4103 | is_gesture); |
4070 | S32 gest_count = gest_item_array.count(); | 4104 | S32 gest_count = gest_item_array.count(); |
4071 | 4105 | ||
4072 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | 4106 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
4073 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) && (!RlvSettings::getEnableWear()) ) | 4107 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
4074 | { | 4108 | { |
4075 | // Filter anything that doesn't specify an attachment point (or that specifies one that's currently locked) | 4109 | // Filter anything that we shouldn't be attaching |
4076 | for (S32 idxObj = obj_item_array.count() - 1; idxObj >= 0; idxObj--) | 4110 | for (S32 idxObj = obj_item_array.count() - 1; idxObj >= 0; idxObj--) |
4077 | { | 4111 | { |
4078 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(obj_item_array.get(idxObj).get(), true); | 4112 | if (!RlvSettings::getEnableWear()) |
4079 | if ( ((!pAttachPt) || (!gRlvHandler.isDetachable(pAttachPt))) ) | 4113 | { |
4080 | obj_item_array.remove(idxObj); | 4114 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(obj_item_array.get(idxObj).get(), true); |
4115 | if ( (!pAttachPt) || // Item should specify attachpt that | ||
4116 | (gRlvHandler.isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) || // doesn't have an undetachable object | ||
4117 | (gRlvHandler.isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) // and that is attachable | ||
4118 | { | ||
4119 | obj_item_array.remove(idxObj); | ||
4120 | } | ||
4121 | } | ||
4122 | else | ||
4123 | { | ||
4124 | gRlvHandler.onWearAttachment(obj_item_array.get(idxObj)->getUUID()); | ||
4125 | } | ||
4081 | } | 4126 | } |
4082 | obj_count = obj_item_array.count(); | 4127 | obj_count = obj_item_array.count(); |
4083 | } | 4128 | } |
@@ -4260,15 +4305,26 @@ void wear_attachments_on_avatar(const std::set<LLUUID>& item_ids, BOOL remove) | |||
4260 | { | 4305 | { |
4261 | if ( (gInventory.isObjectDescendentOf(*it, gAgent.getInventoryRootID())) ) | 4306 | if ( (gInventory.isObjectDescendentOf(*it, gAgent.getInventoryRootID())) ) |
4262 | { | 4307 | { |
4263 | // items.put(item); | 4308 | // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-15 (RLVa-1.0.5e) | Modified: RLVa-1.0.5e |
4264 | // [RLVa:KB] - Checked: 2009-09-11 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c | 4309 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
4265 | LLViewerJointAttachment* pAttachPt = NULL; | ||
4266 | if ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment()) || | ||
4267 | (((pAttachPt = gRlvHandler.getAttachPoint(item, true)) != NULL) && (gRlvHandler.isDetachable(pAttachPt))) ) | ||
4268 | { | 4310 | { |
4269 | items.put(item); | 4311 | if (!RlvSettings::getEnableWear()) |
4312 | { | ||
4313 | LLViewerJointAttachment* pAttachPt = NULL; | ||
4314 | if ( ((pAttachPt = gRlvHandler.getAttachPoint(item, true)) == NULL) || // Item should specify attachpt that | ||
4315 | (gRlvHandler.isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) || // doesn't have an undetachable object | ||
4316 | (gRlvHandler.isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) // and that is attachable | ||
4317 | { | ||
4318 | continue; | ||
4319 | } | ||
4320 | } | ||
4321 | else | ||
4322 | { | ||
4323 | gRlvHandler.onWearAttachment(item->getUUID()); | ||
4324 | } | ||
4270 | } | 4325 | } |
4271 | // [/RLVa:KB] | 4326 | // [/RLVa:KB] |
4327 | items.put(item); | ||
4272 | } | 4328 | } |
4273 | else if ( (item->isComplete()) ) | 4329 | else if ( (item->isComplete()) ) |
4274 | { | 4330 | { |
@@ -4328,9 +4384,9 @@ void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOO | |||
4328 | msg->addUUIDFast(_PREHASH_CompoundMsgID, compound_msg_id ); | 4384 | msg->addUUIDFast(_PREHASH_CompoundMsgID, compound_msg_id ); |
4329 | msg->addU8Fast(_PREHASH_TotalObjects, count ); | 4385 | msg->addU8Fast(_PREHASH_TotalObjects, count ); |
4330 | // msg->addBOOLFast(_PREHASH_FirstDetachAll, remove ); | 4386 | // msg->addBOOLFast(_PREHASH_FirstDetachAll, remove ); |
4331 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.2a | 4387 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
4332 | // This really should just *always* be FALSE since TRUE can result in loss of the current asset state | 4388 | // This really should just *always* be FALSE since TRUE can result in loss of the current asset state |
4333 | msg->addBOOLFast(_PREHASH_FirstDetachAll, remove && (!gRlvHandler.hasLockedAttachment()) ); | 4389 | msg->addBOOLFast(_PREHASH_FirstDetachAll, remove && (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ); |
4334 | // [/RLVa:KB] | 4390 | // [/RLVa:KB] |
4335 | } | 4391 | } |
4336 | 4392 | ||
@@ -4339,9 +4395,9 @@ void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOO | |||
4339 | msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() ); | 4395 | msg->addUUIDFast(_PREHASH_ItemID, item->getUUID() ); |
4340 | msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); | 4396 | msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); |
4341 | // msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point | 4397 | // msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point |
4342 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Added: RLVa-0.2.2a | 4398 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
4343 | msg->addU8Fast(_PREHASH_AttachmentPt, | 4399 | msg->addU8Fast(_PREHASH_AttachmentPt, |
4344 | ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment()) ) | 4400 | ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
4345 | ? 0 | 4401 | ? 0 |
4346 | : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); | 4402 | : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); |
4347 | // [/RLVa:KB] | 4403 | // [/RLVa:KB] |
@@ -4447,13 +4503,12 @@ void remove_inventory_category_from_avatar_step2( BOOL proceed, void* userdata) | |||
4447 | { | 4503 | { |
4448 | for(i = 0; i < obj_count; ++i) | 4504 | for(i = 0; i < obj_count; ++i) |
4449 | { | 4505 | { |
4450 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.2a | 4506 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
4451 | // TODO-RLVa: is there a reason why LL doesn't bother checking to see if you're actually wearing the object? | 4507 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) |
4452 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | ||
4453 | { | 4508 | { |
4454 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | 4509 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); |
4455 | if ( (!pAvatar) || (!pAvatar->isWearingAttachment(obj_item_array.get(i)->getUUID())) || | 4510 | if ( (!pAvatar) || (!pAvatar->isWearingAttachment(obj_item_array.get(i)->getUUID())) || |
4456 | (!gRlvHandler.isDetachable(obj_item_array.get(i).get())) ) // Why does LLPointer have a cast to BOOL aka S32??? | 4511 | (gRlvHandler.isLockedAttachment(obj_item_array.get(i).get(), RLV_LOCK_REMOVE)) ) |
4457 | { | 4512 | { |
4458 | continue; | 4513 | continue; |
4459 | } | 4514 | } |
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 73f19d5..6ebf98e 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -47,6 +47,7 @@ | |||
47 | #include "llviewercontrol.h" | 47 | #include "llviewercontrol.h" |
48 | #include "llfloateravatarinfo.h" | 48 | #include "llfloateravatarinfo.h" |
49 | #include "llfloatermap.h" | 49 | #include "llfloatermap.h" |
50 | #include "panelradar.h" | ||
50 | #include "llfloaterworldmap.h" | 51 | #include "llfloaterworldmap.h" |
51 | #include "llframetimer.h" | 52 | #include "llframetimer.h" |
52 | #include "llmutelist.h" | 53 | #include "llmutelist.h" |
@@ -359,7 +360,7 @@ void LLNetMap::draw() | |||
359 | pos_map = globalPosToView(positions[i], rotate_map); | 360 | pos_map = globalPosToView(positions[i], rotate_map); |
360 | 361 | ||
361 | // Save this entry to draw last | 362 | // Save this entry to draw last |
362 | if (LLFloaterMap::getSelected() == avatar_ids[i]) | 363 | if (LLFloaterMap::getInstance()->getRadar()->getSelected() == avatar_ids[i]) |
363 | { | 364 | { |
364 | selected = i; | 365 | selected = i; |
365 | continue; | 366 | continue; |
@@ -371,7 +372,7 @@ void LLNetMap::draw() | |||
371 | { | 372 | { |
372 | glyph_color = muted_color; | 373 | glyph_color = muted_color; |
373 | } | 374 | } |
374 | else if (LLFloaterMap::isImpDev(avatar_ids[i])) | 375 | else if (PanelRadar::isImpDev(avatar_ids[i])) |
375 | { | 376 | { |
376 | glyph_color = imp_dev_color; | 377 | glyph_color = imp_dev_color; |
377 | } | 378 | } |
@@ -515,7 +516,7 @@ void LLNetMap::draw() | |||
515 | 516 | ||
516 | LLView::draw(); | 517 | LLView::draw(); |
517 | 518 | ||
518 | LLFloaterMap::updateRadar(); | 519 | LLFloaterMap::getInstance()->getRadar()->populateRadar(); |
519 | } | 520 | } |
520 | 521 | ||
521 | void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) | 522 | void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent) |
diff --git a/linden/indra/newview/llnotify.cpp b/linden/indra/newview/llnotify.cpp index 6820622..6da3b97 100644 --- a/linden/indra/newview/llnotify.cpp +++ b/linden/indra/newview/llnotify.cpp | |||
@@ -54,6 +54,7 @@ | |||
54 | #include "llfloaterchat.h" // for add_chat_history() | 54 | #include "llfloaterchat.h" // for add_chat_history() |
55 | #include "lloverlaybar.h" // for gOverlayBar | 55 | #include "lloverlaybar.h" // for gOverlayBar |
56 | #include "lluictrlfactory.h" | 56 | #include "lluictrlfactory.h" |
57 | #include "llversionviewer.h" | ||
57 | 58 | ||
58 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b | 59 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-07-10 (RLVa-1.0.0e) | Added: RLVa-0.2.0b |
59 | #include "rlvhandler.h" | 60 | #include "rlvhandler.h" |
@@ -546,6 +547,7 @@ void LLNotifyBox::format(std::string& msg, const LLStringUtil::format_map_t& arg | |||
546 | // XUI:translate! | 547 | // XUI:translate! |
547 | LLStringUtil::format_map_t targs = args; | 548 | LLStringUtil::format_map_t targs = args; |
548 | targs["[SECOND_LIFE]"] = "Second Life"; | 549 | targs["[SECOND_LIFE]"] = "Second Life"; |
550 | targs["[VIEWER]"] = IMP_VIEWER_NAME; | ||
549 | LLStringUtil::format(msg, targs); | 551 | LLStringUtil::format(msg, targs); |
550 | } | 552 | } |
551 | 553 | ||
diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index d576a20..33cebec 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp | |||
@@ -157,10 +157,10 @@ void LLPanelContents::onClickNewScript(void *userdata) | |||
157 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); | 157 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); |
158 | if(object) | 158 | if(object) |
159 | { | 159 | { |
160 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 160 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) |
161 | if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()] | 161 | if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()] |
162 | { | 162 | { |
163 | if (!gRlvHandler.isDetachable(object)) | 163 | if (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) |
164 | { | 164 | { |
165 | return; // Disallow creating new scripts in a locked attachment | 165 | return; // Disallow creating new scripts in a locked attachment |
166 | } | 166 | } |
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 51cac4b..adb4cfc 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp | |||
@@ -165,5 +165,5 @@ void LLPanelGeneral::cancel() | |||
165 | void LLPanelGeneral::onClickResetUISize(void* user_data) | 165 | void LLPanelGeneral::onClickResetUISize(void* user_data) |
166 | { | 166 | { |
167 | LLPanelGeneral* self = (LLPanelGeneral*)user_data; | 167 | LLPanelGeneral* self = (LLPanelGeneral*)user_data; |
168 | self->childSetValue("ui_scale_slider", 1.0f); | 168 | self->childSetValue("ui_scale_slider", 1.002f); |
169 | } | 169 | } |
diff --git a/linden/indra/newview/llpanelinput.cpp b/linden/indra/newview/llpanelinput.cpp index 63d22b2..4b94435 100644 --- a/linden/indra/newview/llpanelinput.cpp +++ b/linden/indra/newview/llpanelinput.cpp | |||
@@ -71,6 +71,9 @@ BOOL LLPanelInput::postBuild() | |||
71 | fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView()); | 71 | fov_slider->setMinValue(LLViewerCamera::getInstance()->getMinView()); |
72 | fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView()); | 72 | fov_slider->setMaxValue(LLViewerCamera::getInstance()->getMaxView()); |
73 | fov_slider->setValue(LLViewerCamera::getInstance()->getView()); | 73 | fov_slider->setValue(LLViewerCamera::getInstance()->getView()); |
74 | |||
75 | childSetValue("double_click_action", gSavedSettings.getString("DoubleClickAction")); | ||
76 | childSetValue("go_action", gSavedSettings.getString("GoAction")); | ||
74 | 77 | ||
75 | return TRUE; | 78 | return TRUE; |
76 | } | 79 | } |
@@ -93,6 +96,10 @@ void LLPanelInput::apply() | |||
93 | gSavedSettings.setBOOL("AppearanceCameraMovement", childGetValue("appearance_camera_movement")); | 96 | gSavedSettings.setBOOL("AppearanceCameraMovement", childGetValue("appearance_camera_movement")); |
94 | gSavedSettings.setF32("CameraAngle", mPreAdjustFOV); | 97 | gSavedSettings.setF32("CameraAngle", mPreAdjustFOV); |
95 | gSavedSettings.setBOOL("FirstPersonAvatarVisible", childGetValue("first_person_avatar_visible")); | 98 | gSavedSettings.setBOOL("FirstPersonAvatarVisible", childGetValue("first_person_avatar_visible")); |
99 | |||
100 | gSavedSettings.setString("DoubleClickAction", childGetValue("double_click_action")); | ||
101 | gSavedSettings.setString("GoAction", childGetValue("go_action")); | ||
102 | |||
96 | } | 103 | } |
97 | 104 | ||
98 | void LLPanelInput::cancel() | 105 | void LLPanelInput::cancel() |
diff --git a/linden/indra/newview/llpanelinventory.cpp b/linden/indra/newview/llpanelinventory.cpp index bc7c60f..2b78281 100644 --- a/linden/indra/newview/llpanelinventory.cpp +++ b/linden/indra/newview/llpanelinventory.cpp | |||
@@ -372,9 +372,9 @@ void LLTaskInvFVBridge::previewItem() | |||
372 | 372 | ||
373 | BOOL LLTaskInvFVBridge::isItemRenameable() const | 373 | BOOL LLTaskInvFVBridge::isItemRenameable() const |
374 | { | 374 | { |
375 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 375 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
376 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 376 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
377 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 377 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
378 | { | 378 | { |
379 | return FALSE; | 379 | return FALSE; |
380 | } | 380 | } |
@@ -398,8 +398,8 @@ BOOL LLTaskInvFVBridge::isItemRenameable() const | |||
398 | BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) | 398 | BOOL LLTaskInvFVBridge::renameItem(const std::string& new_name) |
399 | { | 399 | { |
400 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 400 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
401 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 401 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
402 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 402 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
403 | { | 403 | { |
404 | return TRUE; // Fallback code [see LLTaskInvFVBridge::isItemRenameable()] | 404 | return TRUE; // Fallback code [see LLTaskInvFVBridge::isItemRenameable()] |
405 | } | 405 | } |
@@ -430,13 +430,13 @@ BOOL LLTaskInvFVBridge::isItemMovable() | |||
430 | // return TRUE; | 430 | // return TRUE; |
431 | //} | 431 | //} |
432 | //return FALSE; | 432 | //return FALSE; |
433 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | 433 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
434 | if (rlv_handler_t::isEnabled()) | 434 | if (rlv_handler_t::isEnabled()) |
435 | { | 435 | { |
436 | LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID()); | 436 | LLViewerObject* pObj = gObjectList.findObject(mPanel->getTaskUUID()); |
437 | if (pObj) | 437 | if (pObj) |
438 | { | 438 | { |
439 | if (!gRlvHandler.isDetachable(pObj)) | 439 | if (gRlvHandler.isLockedAttachment(pObj, RLV_LOCK_REMOVE)) |
440 | { | 440 | { |
441 | return FALSE; | 441 | return FALSE; |
442 | } | 442 | } |
@@ -455,10 +455,10 @@ BOOL LLTaskInvFVBridge::isItemMovable() | |||
455 | BOOL LLTaskInvFVBridge::isItemRemovable() | 455 | BOOL LLTaskInvFVBridge::isItemRemovable() |
456 | { | 456 | { |
457 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 457 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
458 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0g | 458 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
459 | if ( (object) && (rlv_handler_t::isEnabled()) ) | 459 | if ( (object) && (rlv_handler_t::isEnabled()) ) |
460 | { | 460 | { |
461 | if (!gRlvHandler.isDetachable(object)) | 461 | if (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) |
462 | { | 462 | { |
463 | return FALSE; | 463 | return FALSE; |
464 | } | 464 | } |
@@ -618,9 +618,9 @@ BOOL LLTaskInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const | |||
618 | const LLPermissions& perm = inv->getPermissions(); | 618 | const LLPermissions& perm = inv->getPermissions(); |
619 | bool can_copy = gAgent.allowOperation(PERM_COPY, perm, | 619 | bool can_copy = gAgent.allowOperation(PERM_COPY, perm, |
620 | GP_OBJECT_MANIPULATE); | 620 | GP_OBJECT_MANIPULATE); |
621 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 621 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
622 | // Kind of redundant due to the note below, but in case that ever gets fixed | 622 | // Kind of redundant due to the note below, but in case that ever gets fixed |
623 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 623 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
624 | { | 624 | { |
625 | return FALSE; | 625 | return FALSE; |
626 | } | 626 | } |
@@ -747,12 +747,16 @@ void LLTaskInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
747 | { | 747 | { |
748 | disabled_items.push_back(std::string("Task Open")); | 748 | disabled_items.push_back(std::string("Task Open")); |
749 | } | 749 | } |
750 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 750 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c |
751 | else if ( (rlv_handler_t::isEnabled()) && | 751 | else if (rlv_handler_t::isEnabled()) |
752 | ((LLAssetType::AT_LSL_TEXT == item->getType()) || (LLAssetType::AT_NOTECARD == item->getType())) && | ||
753 | (!gRlvHandler.isDetachable(gObjectList.findObject(mPanel->getTaskUUID()))) ) | ||
754 | { | 752 | { |
755 | disabled_items.push_back(std::string("Task Open")); | 753 | bool fLocked = gRlvHandler.isLockedAttachment(gObjectList.findObject(mPanel->getTaskUUID()), RLV_LOCK_REMOVE); |
754 | if ( ((LLAssetType::AT_LSL_TEXT == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (fLocked))) || | ||
755 | ((LLAssetType::AT_NOTECARD == item->getType()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (fLocked))) || | ||
756 | ((LLAssetType::AT_NOTECARD == item->getType()) && (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE))) ) | ||
757 | { | ||
758 | disabled_items.push_back(std::string("Task Open")); | ||
759 | } | ||
756 | } | 760 | } |
757 | // [/RLVa:KB] | 761 | // [/RLVa:KB] |
758 | } | 762 | } |
@@ -979,6 +983,13 @@ LLUIImagePtr LLTaskTextureBridge::getIcon() const | |||
979 | 983 | ||
980 | void LLTaskTextureBridge::openItem() | 984 | void LLTaskTextureBridge::openItem() |
981 | { | 985 | { |
986 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Added: RLVa-1.0.5c | ||
987 | if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE)) | ||
988 | { | ||
989 | return; | ||
990 | } | ||
991 | // [/RLVa:KB] | ||
992 | |||
982 | llinfos << "LLTaskTextureBridge::openItem()" << llendl; | 993 | llinfos << "LLTaskTextureBridge::openItem()" << llendl; |
983 | if(!LLPreview::show(mUUID)) | 994 | if(!LLPreview::show(mUUID)) |
984 | { | 995 | { |
@@ -1260,9 +1271,10 @@ LLTaskLSLBridge::LLTaskLSLBridge( | |||
1260 | 1271 | ||
1261 | void LLTaskLSLBridge::openItem() | 1272 | void LLTaskLSLBridge::openItem() |
1262 | { | 1273 | { |
1263 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1274 | // [RLVa:KB] - Checked: 2009-10-13 (RLVa-1.0.5c) | Modified: RLVa-1.0.5c |
1264 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); | 1275 | LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); |
1265 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 1276 | if ( (rlv_handler_t::isEnabled()) && |
1277 | ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWSCRIPT)) || (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE))) ) | ||
1266 | { | 1278 | { |
1267 | return; | 1279 | return; |
1268 | } | 1280 | } |
@@ -1388,8 +1400,9 @@ void LLTaskNotecardBridge::openItem() | |||
1388 | { | 1400 | { |
1389 | return; | 1401 | return; |
1390 | } | 1402 | } |
1391 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1403 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
1392 | if ( (rlv_handler_t::isEnabled()) && ((gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (!gRlvHandler.isDetachable(object))) ) | 1404 | if ( (rlv_handler_t::isEnabled()) && |
1405 | ( (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWNOTE)) || (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) ) | ||
1393 | { | 1406 | { |
1394 | return; | 1407 | return; |
1395 | } | 1408 | } |
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp index feb85a7..63f76dc 100644 --- a/linden/indra/newview/llpanellogin.cpp +++ b/linden/indra/newview/llpanellogin.cpp | |||
@@ -626,7 +626,16 @@ void LLPanelLogin::addServer(const std::string& server) | |||
626 | i++; | 626 | i++; |
627 | } | 627 | } |
628 | } | 628 | } |
629 | grids->setCurrentByIndex(0); | 629 | |
630 | // when you first login select the default, otherwise last connected | ||
631 | if (gDisconnected) | ||
632 | { | ||
633 | grids->setSimple(gHippoGridManager->getCurrentGrid()->getGridNick()); | ||
634 | } | ||
635 | else | ||
636 | { | ||
637 | grids->setSimple(defaultGrid); | ||
638 | } | ||
630 | 639 | ||
631 | //LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); | 640 | //LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); |
632 | //combo->add(server, LLSD(domain_name) ); | 641 | //combo->add(server, LLSD(domain_name) ); |
@@ -767,13 +776,13 @@ void LLPanelLogin::refreshLoginPage() | |||
767 | if (!sInstance) return; | 776 | if (!sInstance) return; |
768 | 777 | ||
769 | sInstance->childSetVisible("create_new_account_text", | 778 | sInstance->childSetVisible("create_new_account_text", |
770 | !gHippoGridManager->getConnectedGrid()->getRegisterUrl().empty()); | 779 | !gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()); |
771 | sInstance->childSetVisible("forgot_password_text", | 780 | sInstance->childSetVisible("forgot_password_text", |
772 | !gHippoGridManager->getConnectedGrid()->getPasswordUrl().empty()); | 781 | !gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty()); |
773 | 782 | ||
774 | // kick off a request to grab the url manually | 783 | // kick off a request to grab the url manually |
775 | gResponsePtr = LLIamHereLogin::build(sInstance); | 784 | gResponsePtr = LLIamHereLogin::build(sInstance); |
776 | std::string login_page = gHippoGridManager->getConnectedGrid()->getLoginPage(); | 785 | std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); |
777 | if (!login_page.empty()) { | 786 | if (!login_page.empty()) { |
778 | LLHTTPClient::head(login_page, gResponsePtr); | 787 | LLHTTPClient::head(login_page, gResponsePtr); |
779 | } else { | 788 | } else { |
@@ -787,7 +796,7 @@ void LLPanelLogin::loadLoginPage() | |||
787 | if (!sInstance) return; | 796 | if (!sInstance) return; |
788 | 797 | ||
789 | 798 | ||
790 | std::string login_page = gHippoGridManager->getConnectedGrid()->getLoginPage(); | 799 | std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); |
791 | if (login_page.empty()) { | 800 | if (login_page.empty()) { |
792 | sInstance->setSiteIsAlive(false); | 801 | sInstance->setSiteIsAlive(false); |
793 | return; | 802 | return; |
diff --git a/linden/indra/newview/llpreviewscript.cpp b/linden/indra/newview/llpreviewscript.cpp index 4b8a151..082b95c 100644 --- a/linden/indra/newview/llpreviewscript.cpp +++ b/linden/indra/newview/llpreviewscript.cpp | |||
@@ -2001,8 +2001,8 @@ void LLLiveLSLEditor::onRunningCheckboxClicked( LLUICtrl*, void* userdata ) | |||
2001 | LLCheckBoxCtrl* runningCheckbox = self->getChild<LLCheckBoxCtrl>("running"); | 2001 | LLCheckBoxCtrl* runningCheckbox = self->getChild<LLCheckBoxCtrl>("running"); |
2002 | BOOL running = runningCheckbox->get(); | 2002 | BOOL running = runningCheckbox->get(); |
2003 | //self->mRunningCheckbox->get(); | 2003 | //self->mRunningCheckbox->get(); |
2004 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 2004 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
2005 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 2005 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
2006 | { | 2006 | { |
2007 | return; | 2007 | return; |
2008 | } | 2008 | } |
@@ -2032,8 +2032,8 @@ void LLLiveLSLEditor::onReset(void *userdata) | |||
2032 | LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata; | 2032 | LLLiveLSLEditor* self = (LLLiveLSLEditor*) userdata; |
2033 | 2033 | ||
2034 | LLViewerObject* object = gObjectList.findObject( self->mObjectID ); | 2034 | LLViewerObject* object = gObjectList.findObject( self->mObjectID ); |
2035 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 2035 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
2036 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(object)) ) | 2036 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(object, RLV_LOCK_REMOVE)) ) |
2037 | { | 2037 | { |
2038 | return; | 2038 | return; |
2039 | } | 2039 | } |
@@ -2460,8 +2460,8 @@ void LLLiveLSLEditor::onSave(void* userdata, BOOL close_after_save) | |||
2460 | { | 2460 | { |
2461 | LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; | 2461 | LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; |
2462 | 2462 | ||
2463 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 2463 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
2464 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(gObjectList.findObject(self->mObjectID))) ) | 2464 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(gObjectList.findObject(self->mObjectID), RLV_LOCK_REMOVE)) ) |
2465 | { | 2465 | { |
2466 | return; | 2466 | return; |
2467 | } | 2467 | } |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index b862d61..4d35242 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -2656,6 +2656,23 @@ bool idle_startup() | |||
2656 | #endif | 2656 | #endif |
2657 | 2657 | ||
2658 | 2658 | ||
2659 | // [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-08-05 (RLVa-1.0.1e) | Modified: RLVa-1.0.1e | ||
2660 | // RELEASE-RLVa: this should go in LLAppViewer::handleLoginComplete() but Imprudence doesn't call that function | ||
2661 | gRlvHandler.initLookupTables(); | ||
2662 | |||
2663 | if (rlv_handler_t::isEnabled()) | ||
2664 | { | ||
2665 | RlvCurrentlyWorn::fetchWorn(); | ||
2666 | rlv_handler_t::fetchSharedInventory(); | ||
2667 | |||
2668 | #ifdef RLV_EXTENSION_STARTLOCATION | ||
2669 | RlvSettings::updateLoginLastLocation(); | ||
2670 | #endif // RLV_EXTENSION_STARTLOCATION | ||
2671 | |||
2672 | gRlvHandler.processRetainedCommands(); | ||
2673 | } | ||
2674 | // [/RLVa:KB] | ||
2675 | |||
2659 | return TRUE; | 2676 | return TRUE; |
2660 | } | 2677 | } |
2661 | 2678 | ||
diff --git a/linden/indra/newview/lltooldraganddrop.cpp b/linden/indra/newview/lltooldraganddrop.cpp index c24dd78..aa5bfad 100644 --- a/linden/indra/newview/lltooldraganddrop.cpp +++ b/linden/indra/newview/lltooldraganddrop.cpp | |||
@@ -1974,7 +1974,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL | |||
1974 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1974 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
1975 | if (rlv_handler_t::isEnabled()) | 1975 | if (rlv_handler_t::isEnabled()) |
1976 | { | 1976 | { |
1977 | if (!gRlvHandler.isDetachable(obj)) | 1977 | if (gRlvHandler.isLockedAttachment(obj, RLV_LOCK_REMOVE)) |
1978 | { | 1978 | { |
1979 | return ACCEPT_NO_LOCKED; // Disallow inventory drops on a locked attachment | 1979 | return ACCEPT_NO_LOCKED; // Disallow inventory drops on a locked attachment |
1980 | } | 1980 | } |
@@ -2118,10 +2118,12 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv( | |||
2118 | return ACCEPT_NO; | 2118 | return ACCEPT_NO; |
2119 | } | 2119 | } |
2120 | 2120 | ||
2121 | // [RLVa:KB] - Checked: 2009-09-08 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c | 2121 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5 |
2122 | LLViewerJointAttachment* pAttachPt = NULL; | 2122 | LLViewerJointAttachment* pAttachPt = NULL; |
2123 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) && (!RlvSettings::getEnableWear()) && | 2123 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) && (!RlvSettings::getEnableWear()) && |
2124 | ( ((pAttachPt = gRlvHandler.getAttachPoint(item, true)) == NULL) || (!gRlvHandler.isDetachable(pAttachPt)) ) ) | 2124 | ( ((pAttachPt = gRlvHandler.getAttachPoint(item, true)) == NULL) || // Item should specify an attachpt that |
2125 | (gRlvHandler.isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) || // doesn't have an undetachable object | ||
2126 | (gRlvHandler.isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) ) // and that is attachable | ||
2125 | { | 2127 | { |
2126 | return ACCEPT_NO_LOCKED; | 2128 | return ACCEPT_NO_LOCKED; |
2127 | } | 2129 | } |
diff --git a/linden/indra/newview/lltoolpie.cpp b/linden/indra/newview/lltoolpie.cpp index f6c2eef..6bc36a5 100644 --- a/linden/indra/newview/lltoolpie.cpp +++ b/linden/indra/newview/lltoolpie.cpp | |||
@@ -694,12 +694,19 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
694 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; | 694 | llinfos << "LLToolPie handleDoubleClick (becoming mouseDown)" << llendl; |
695 | } | 695 | } |
696 | 696 | ||
697 | if (gSavedSettings.getBOOL("DoubleClickAutoPilot") || gSavedSettings.getBOOL("DoubleClickTeleport")) | 697 | std::string action = gSavedSettings.getString("DoubleClickAction"); |
698 | LLStringUtil::toLower(action); | ||
699 | |||
700 | if (action == "none") | ||
701 | { | ||
702 | return FALSE; | ||
703 | } | ||
704 | else if (action == "go") | ||
698 | { | 705 | { |
699 | if (mPick.mPickType == LLPickInfo::PICK_LAND | 706 | if (mPick.mPickType == LLPickInfo::PICK_LAND |
700 | && !mPick.mPosGlobal.isExactlyZero()) | 707 | && !mPick.mPosGlobal.isExactlyZero()) |
701 | { | 708 | { |
702 | handle_go_to(); | 709 | handle_go_to_confirm(); |
703 | return TRUE; | 710 | return TRUE; |
704 | } | 711 | } |
705 | else if (mPick.mObjectID.notNull() | 712 | else if (mPick.mObjectID.notNull() |
@@ -709,36 +716,16 @@ BOOL LLToolPie::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
709 | if(mPick.getObject().notNull() && mPick.getObject()->isHUDAttachment()) | 716 | if(mPick.getObject().notNull() && mPick.getObject()->isHUDAttachment()) |
710 | return FALSE; | 717 | return FALSE; |
711 | 718 | ||
712 | handle_go_to(); | 719 | handle_go_to_confirm(); |
713 | return TRUE; | 720 | return TRUE; |
714 | } | 721 | } |
715 | } | 722 | } |
716 | 723 | else | |
717 | return FALSE; | ||
718 | |||
719 | /* JC - don't do go-there, because then double-clicking on physical | ||
720 | objects gets you into trouble. | ||
721 | |||
722 | // If double-click on object or land, go there. | ||
723 | LLViewerObject *object = gViewerWindow->getLastPick().getObject(); | ||
724 | if (object) | ||
725 | { | ||
726 | if (object->isAvatar()) | ||
727 | { | ||
728 | LLFloaterAvatarInfo::showFromAvatar(object->getID()); | ||
729 | } | ||
730 | else | ||
731 | { | ||
732 | handle_go_to(NULL); | ||
733 | } | ||
734 | } | ||
735 | else if (!gLastHitPosGlobal.isExactlyZero()) | ||
736 | { | 724 | { |
737 | handle_go_to(NULL); | 725 | llwarns << "Unhandled DoubleClickAction setting: " << action << llendl; |
738 | } | 726 | } |
739 | 727 | ||
740 | return TRUE; | 728 | return FALSE; |
741 | */ | ||
742 | } | 729 | } |
743 | 730 | ||
744 | 731 | ||
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 3975290..388ba73 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp | |||
@@ -720,8 +720,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
720 | } | 720 | } |
721 | 721 | ||
722 | // if(gUseWireframe) | 722 | // if(gUseWireframe) |
723 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 723 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
724 | if ( (gUseWireframe) && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment()) ) ) | 724 | if ( (gUseWireframe) && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) ) |
725 | // [/RLVa:KB] | 725 | // [/RLVa:KB] |
726 | { | 726 | { |
727 | glClearColor(0.5f, 0.5f, 0.5f, 0.f); | 727 | glClearColor(0.5f, 0.5f, 0.5f, 0.f); |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index b129bff..cebd6fd 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -2190,8 +2190,9 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t | |||
2190 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; | 2190 | LLVOAvatar::attachment_map_t::iterator curiter = iter++; |
2191 | LLViewerJointAttachment* attachment = curiter->second; | 2191 | LLViewerJointAttachment* attachment = curiter->second; |
2192 | // if (attachment->getObject()) | 2192 | // if (attachment->getObject()) |
2193 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0c | 2193 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
2194 | if ( (attachment->getObject()) && ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(curiter->first)) ) ) | 2194 | if ( (attachment->getObject()) && |
2195 | ((!rlv_handler_t::isEnabled()) || (!gRlvHandler.isLockedAttachment(curiter->first, RLV_LOCK_REMOVE))) ) | ||
2195 | // [/RLVa:KB] | 2196 | // [/RLVa:KB] |
2196 | { | 2197 | { |
2197 | new_value = true; | 2198 | new_value = true; |
@@ -2428,26 +2429,45 @@ class LLObjectImportUpload : public view_listener_t | |||
2428 | } | 2429 | } |
2429 | }; | 2430 | }; |
2430 | 2431 | ||
2431 | bool handle_go_to() | 2432 | bool handle_go_to_confirm() |
2432 | { | 2433 | { |
2433 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 2434 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
2434 | if ( (rlv_handler_t::isEnabled()) && gAgent.forwardGrabbed() && (gRlvHandler.hasLockedAttachment()) ) | 2435 | if ( (rlv_handler_t::isEnabled()) && (gAgent.forwardGrabbed()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) |
2435 | { | 2436 | { |
2436 | return true; | 2437 | return true; |
2437 | } | 2438 | } |
2438 | // [/RLVa:KB] | 2439 | // [/RLVa:KB] |
2439 | 2440 | ||
2440 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) | 2441 | std::string action = gSavedSettings.getString("GoAction"); |
2442 | LLStringUtil::toLower(action); | ||
2443 | |||
2444 | if (action == "teleport") | ||
2441 | { | 2445 | { |
2442 | gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance()); | 2446 | gViewerWindow->alertXml("ConfirmDoubleClickTP", handle_go_to_callback, (void*)LLToolPie::getInstance()); |
2443 | } | 2447 | } |
2444 | else if (gSavedSettings.getBOOL("DoubleClickAutoPilot")) | 2448 | else if (action == "autopilot") |
2445 | { | 2449 | { |
2446 | gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance()); | 2450 | gViewerWindow->alertXml("ConfirmAutoPilot", handle_go_to_callback, (void*)LLToolPie::getInstance()); |
2447 | } | 2451 | } |
2448 | return true; | 2452 | return true; |
2449 | } | 2453 | } |
2450 | 2454 | ||
2455 | |||
2456 | bool handle_go_to() | ||
2457 | { | ||
2458 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | ||
2459 | if ( (rlv_handler_t::isEnabled()) && (gAgent.forwardGrabbed()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) | ||
2460 | { | ||
2461 | return true; | ||
2462 | } | ||
2463 | // [/RLVa:KB] | ||
2464 | |||
2465 | handle_go_to_callback( 0, (void*)LLToolPie::getInstance() ); | ||
2466 | |||
2467 | return true; | ||
2468 | } | ||
2469 | |||
2470 | |||
2451 | //static | 2471 | //static |
2452 | void handle_go_to_callback(S32 option, void *userdata) | 2472 | void handle_go_to_callback(S32 option, void *userdata) |
2453 | { | 2473 | { |
@@ -2459,13 +2479,17 @@ void handle_go_to_callback(S32 option, void *userdata) | |||
2459 | std::vector<std::string> strings; | 2479 | std::vector<std::string> strings; |
2460 | std::string val; | 2480 | std::string val; |
2461 | LLVector3d pos = pie->getPick().mPosGlobal; | 2481 | LLVector3d pos = pie->getPick().mPosGlobal; |
2462 | if (gSavedSettings.getBOOL("DoubleClickTeleport")) | 2482 | |
2483 | std::string action = gSavedSettings.getString("GoAction"); | ||
2484 | LLStringUtil::toLower(action); | ||
2485 | |||
2486 | if (action == "teleport") | ||
2463 | { | 2487 | { |
2464 | LLVector3d hips_offset(0.0f, 0.0f, 1.2f); | 2488 | LLVector3d hips_offset(0.0f, 0.0f, 1.2f); |
2465 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); | 2489 | gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); |
2466 | gAgent.teleportViaLocation(pos + hips_offset); | 2490 | gAgent.teleportViaLocation(pos + hips_offset); |
2467 | } | 2491 | } |
2468 | else | 2492 | else if (action == "autopilot") |
2469 | { | 2493 | { |
2470 | // JAMESDEBUG try simulator autopilot | 2494 | // JAMESDEBUG try simulator autopilot |
2471 | std::vector<std::string> strings; | 2495 | std::vector<std::string> strings; |
@@ -2493,6 +2517,10 @@ void handle_go_to_callback(S32 option, void *userdata) | |||
2493 | // Could be first use | 2517 | // Could be first use |
2494 | LLFirstUse::useGoTo(); | 2518 | LLFirstUse::useGoTo(); |
2495 | } | 2519 | } |
2520 | else | ||
2521 | { | ||
2522 | llwarns << "Unhandled GoAction setting: " << action << llendl; | ||
2523 | } | ||
2496 | } | 2524 | } |
2497 | } | 2525 | } |
2498 | 2526 | ||
@@ -4710,8 +4738,8 @@ class LLToolsReleaseKeys : public view_listener_t | |||
4710 | { | 4738 | { |
4711 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4739 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4712 | { | 4740 | { |
4713 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 4741 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
4714 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | 4742 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) |
4715 | { | 4743 | { |
4716 | return true; | 4744 | return true; |
4717 | } | 4745 | } |
@@ -4727,9 +4755,9 @@ class LLToolsEnableReleaseKeys : public view_listener_t | |||
4727 | { | 4755 | { |
4728 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 4756 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
4729 | { | 4757 | { |
4730 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 4758 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
4731 | gMenuHolder->findControl(userdata["control"].asString())->setValue( | 4759 | gMenuHolder->findControl(userdata["control"].asString())->setValue( |
4732 | gAgent.anyControlGrabbed() && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment() ) ) ); | 4760 | gAgent.anyControlGrabbed() && ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE) ) ) ); |
4733 | // [/RLVa:KB] | 4761 | // [/RLVa:KB] |
4734 | //gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); | 4762 | //gMenuHolder->findControl(userdata["control"].asString())->setValue( gAgent.anyControlGrabbed() ); |
4735 | return true; | 4763 | return true; |
@@ -6100,11 +6128,13 @@ private: | |||
6100 | if (index > 0) | 6128 | if (index > 0) |
6101 | attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); | 6129 | attachment_point = get_if_there(gAgent.getAvatarObject()->mAttachmentPoints, index, (LLViewerJointAttachment*)NULL); |
6102 | 6130 | ||
6103 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6131 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6104 | if ( (rlv_handler_t::isEnabled()) && | 6132 | if ( (rlv_handler_t::isEnabled()) && |
6105 | ( ((index == 0) && (gRlvHandler.hasLockedAttachment())) || // Can't wear on default attach point | 6133 | ( ((index == 0) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY))) || // Can't wear on default attach point |
6106 | ((index > 0) && (!gRlvHandler.isDetachable(attachment_point))) || // Can't replace locked attachment | 6134 | ((index > 0) && // or replace a locked attachment |
6107 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" | 6135 | ((gRlvHandler.isLockedAttachment(attachment_point->getObject(), RLV_LOCK_REMOVE)) || |
6136 | (gRlvHandler.isLockedAttachment(attachment_point, RLV_LOCK_ADD)) ) ) || // or wear on a non-attachable attach point | ||
6137 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) ) // Attach on rezzed object == "Take" | ||
6108 | { | 6138 | { |
6109 | setObjectSelection(NULL); // Clear the selection or it'll get stuck | 6139 | setObjectSelection(NULL); // Clear the selection or it'll get stuck |
6110 | return true; | 6140 | return true; |
@@ -6218,15 +6248,15 @@ class LLAttachmentDrop : public view_listener_t | |||
6218 | return true; | 6248 | return true; |
6219 | } | 6249 | } |
6220 | 6250 | ||
6221 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6251 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6222 | if (rlv_handler_t::isEnabled()) | 6252 | if (rlv_handler_t::isEnabled()) |
6223 | { | 6253 | { |
6224 | if (gRlvHandler.hasLockedAttachment()) | 6254 | if (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) |
6225 | { | 6255 | { |
6226 | // NOTE: copy/paste of the code in enable_detach() | 6256 | // NOTE: copy/paste of the code in enable_detach() |
6227 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | 6257 | LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection(); |
6228 | RlvSelectHasLockedAttach functor; | 6258 | RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE); |
6229 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | 6259 | if ( (hSelection->isAttachment()) && (hSelection->getFirstRootNode(&functor, FALSE)) ) |
6230 | return true; | 6260 | return true; |
6231 | } | 6261 | } |
6232 | else if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) | 6262 | else if (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) |
@@ -6254,8 +6284,8 @@ void handle_detach_from_avatar(void* user_data) | |||
6254 | 6284 | ||
6255 | if (attached_object) | 6285 | if (attached_object) |
6256 | { | 6286 | { |
6257 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0d | 6287 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6258 | if ( (rlv_handler_t::isEnabled()) && (!gRlvHandler.isDetachable(attached_object)) ) | 6288 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.isLockedAttachment(attached_object, RLV_LOCK_REMOVE)) ) |
6259 | { | 6289 | { |
6260 | return; | 6290 | return; |
6261 | } | 6291 | } |
@@ -6343,12 +6373,12 @@ class LLAttachmentDetach : public view_listener_t | |||
6343 | return true; | 6373 | return true; |
6344 | } | 6374 | } |
6345 | 6375 | ||
6346 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6376 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5 |
6347 | // NOTE: copy/paste of the code in enable_detach() | 6377 | // NOTE: copy/paste of the code in enable_detach() |
6348 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | 6378 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) |
6349 | { | 6379 | { |
6350 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | 6380 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); |
6351 | RlvSelectHasLockedAttach functor; | 6381 | RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE); |
6352 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | 6382 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) |
6353 | return FALSE; | 6383 | return FALSE; |
6354 | } | 6384 | } |
@@ -6460,16 +6490,16 @@ BOOL enable_detach(void*) | |||
6460 | // ...if it's you, good to detach | 6490 | // ...if it's you, good to detach |
6461 | if (avatar->getID() == gAgent.getID()) | 6491 | if (avatar->getID() == gAgent.getID()) |
6462 | { | 6492 | { |
6463 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6493 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5 |
6464 | // NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent() | 6494 | // NOTE: this code is reused as-is in LLAttachmentDetach::handleEvent() and LLAttachmentDrop::handleEvent() |
6465 | // so any changes here should be reflected there as well (I think it's in a number of other places as well by now) | 6495 | // so any changes here should be reflected there as well |
6466 | 6496 | ||
6467 | // RELEASE-RLVa: LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with | 6497 | // RELEASE-RLVa: LLSelectMgr::sendDetach() and LLSelectMgr::sendDropAttachment() call sendListToRegions with |
6468 | // SEND_ONLY_ROOTS so we only need to examine the roots which saves us time | 6498 | // SEND_ONLY_ROOTS so we only need to examine the roots which saves us time |
6469 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | 6499 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) |
6470 | { | 6500 | { |
6471 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); | 6501 | LLObjectSelectionHandle hSelect = LLSelectMgr::getInstance()->getSelection(); |
6472 | RlvSelectHasLockedAttach functor; | 6502 | RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE); |
6473 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) | 6503 | if ( (hSelect->isAttachment()) && (hSelect->getFirstRootNode(&functor, FALSE)) ) |
6474 | return FALSE; | 6504 | return FALSE; |
6475 | } | 6505 | } |
@@ -6496,7 +6526,7 @@ class LLAttachmentEnableDetach : public view_listener_t | |||
6496 | // Used to tell if the selected object can be attached to your avatar. | 6526 | // Used to tell if the selected object can be attached to your avatar. |
6497 | BOOL object_selected_and_point_valid(void *user_data) | 6527 | BOOL object_selected_and_point_valid(void *user_data) |
6498 | { | 6528 | { |
6499 | // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) | 6529 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5 |
6500 | if (rlv_handler_t::isEnabled()) | 6530 | if (rlv_handler_t::isEnabled()) |
6501 | { | 6531 | { |
6502 | // RELEASE-RLVa: look at the caller graph for this function on every new release | 6532 | // RELEASE-RLVa: look at the caller graph for this function on every new release |
@@ -6506,9 +6536,11 @@ BOOL object_selected_and_point_valid(void *user_data) | |||
6506 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] | 6536 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / right-click / "Attach >" [user_data == pAttachPt] |
6507 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt] | 6537 | // - enabler set up in LLVOAvatar::buildCharacter() => Rezzed prim / Edit menu / "Attach Object" [user_data == pAttachPt] |
6508 | LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; | 6538 | LLViewerJointAttachment* pAttachPt = (LLViewerJointAttachment*)user_data; |
6509 | if ( ((!pAttachPt) && (gRlvHandler.hasLockedAttachment())) || // Don't allow attach to default attach point | 6539 | if ( ( (!pAttachPt) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) || // Don't allow attach to default attach point |
6510 | ((pAttachPt) && (!gRlvHandler.isDetachable(pAttachPt))) || // Don't allow replacing of locked attachment | 6540 | ( (pAttachPt) && // Don't allow replacing of a locked attachment |
6511 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" | 6541 | ( (gRlvHandler.isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) || |
6542 | (gRlvHandler.isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) ) || // or wear on a non-attachable attach point | ||
6543 | (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) ) // Attaching a rezzed object == "Take" | ||
6512 | { | 6544 | { |
6513 | return FALSE; | 6545 | return FALSE; |
6514 | } | 6546 | } |
@@ -6585,7 +6617,7 @@ BOOL object_attached(void *user_data) | |||
6585 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6617 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) |
6586 | return ( | 6618 | return ( |
6587 | (attachment->getObject() != NULL) && | 6619 | (attachment->getObject() != NULL) && |
6588 | ( (!rlv_handler_t::isEnabled()) || (gRlvHandler.isDetachable(attachment->getObject())) ) | 6620 | ( (!rlv_handler_t::isEnabled()) || (!gRlvHandler.isLockedAttachment(attachment->getObject(), RLV_LOCK_REMOVE)) ) |
6589 | ); | 6621 | ); |
6590 | // [/RLVa:KB] | 6622 | // [/RLVa:KB] |
6591 | // return attachment->getObject() != NULL; | 6623 | // return attachment->getObject() != NULL; |
@@ -6737,12 +6769,13 @@ class LLToolsSelectedScriptAction : public view_listener_t | |||
6737 | { | 6769 | { |
6738 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6770 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
6739 | { | 6771 | { |
6740 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6772 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6741 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | 6773 | // We'll allow resetting the scripts of objects on a non-attachable attach point since they wouldn't be able to circumvent anything |
6774 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) | ||
6742 | { | 6775 | { |
6743 | LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); | 6776 | LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection(); |
6744 | RlvSelectHasLockedAttach functor; | 6777 | RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE); |
6745 | if ( (selectHandle->isAttachment()) && (selectHandle->getFirstNode(&functor)) ) | 6778 | if ( (hSelection->isAttachment()) && (hSelection->getFirstNode(&functor)) ) |
6746 | return true; | 6779 | return true; |
6747 | } | 6780 | } |
6748 | // [/RLVa:KB] | 6781 | // [/RLVa:KB] |
@@ -6831,9 +6864,9 @@ void handle_dump_image_list(void*) | |||
6831 | 6864 | ||
6832 | void handle_test_male(void*) | 6865 | void handle_test_male(void*) |
6833 | { | 6866 | { |
6834 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6867 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6835 | if ( (rlv_handler_t::isEnabled()) && | 6868 | if ( (rlv_handler_t::isEnabled()) && |
6836 | ( (gRlvHandler.hasLockedAttachment()) || | 6869 | ( (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) || |
6837 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) | 6870 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) |
6838 | { | 6871 | { |
6839 | return; | 6872 | return; |
@@ -6846,9 +6879,9 @@ void handle_test_male(void*) | |||
6846 | 6879 | ||
6847 | void handle_test_female(void*) | 6880 | void handle_test_female(void*) |
6848 | { | 6881 | { |
6849 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 6882 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6850 | if ( (rlv_handler_t::isEnabled()) && | 6883 | if ( (rlv_handler_t::isEnabled()) && |
6851 | ( (gRlvHandler.hasLockedAttachment()) || | 6884 | ( (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) || |
6852 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) | 6885 | (gRlvHandler.hasBehaviour(RLV_BHVR_ADDOUTFIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_REMOUTFIT)) ) ) |
6853 | { | 6886 | { |
6854 | return; | 6887 | return; |
@@ -6990,16 +7023,16 @@ BOOL enable_more_than_one_selected(void* ) | |||
6990 | 7023 | ||
6991 | static bool is_editable_selected() | 7024 | static bool is_editable_selected() |
6992 | { | 7025 | { |
6993 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-1.0.0c | 7026 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6994 | // RELEASE-RLVa: check that this still isn't called by anything but script actions in the Tools menu | 7027 | // RELEASE-RLVa: check that this still isn't called by anything but script actions in the Tools menu |
6995 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment()) ) | 7028 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_REMOVE)) ) |
6996 | { | 7029 | { |
6997 | LLObjectSelectionHandle selectHandle = LLSelectMgr::getInstance()->getSelection(); | 7030 | LLObjectSelectionHandle hSelection = LLSelectMgr::getInstance()->getSelection(); |
6998 | 7031 | ||
6999 | // NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only | 7032 | // NOTE: this is called for 5 different menu items so we'll trade accuracy for efficiency and only |
7000 | // examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss) | 7033 | // examine root nodes (LLToolsSelectedScriptAction::handleEvent() will catch what we miss) |
7001 | RlvSelectHasLockedAttach functor; | 7034 | RlvSelectHasLockedAttach functor(RLV_LOCK_REMOVE); |
7002 | if ( (selectHandle->isAttachment()) && (selectHandle->getFirstRootNode(&functor)) ) | 7035 | if ( (hSelection->isAttachment()) && (hSelection->getFirstRootNode(&functor)) ) |
7003 | { | 7036 | { |
7004 | return false; | 7037 | return false; |
7005 | } | 7038 | } |
@@ -10452,6 +10485,35 @@ class LLAvatarReportAbuse : public view_listener_t | |||
10452 | 10485 | ||
10453 | 10486 | ||
10454 | 10487 | ||
10488 | //////////////////////////// | ||
10489 | // ALLOW MULTIPLE VIEWERS // | ||
10490 | //////////////////////////// | ||
10491 | |||
10492 | |||
10493 | class LLAdvancedToggleMultipleViewers : public view_listener_t | ||
10494 | { | ||
10495 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10496 | { | ||
10497 | BOOL cur_val = gSavedSettings.getBOOL("AllowMultipleViewers"); | ||
10498 | gSavedSettings.setBOOL("AllowMultipleViewers", !cur_val ); | ||
10499 | return true; | ||
10500 | } | ||
10501 | }; | ||
10502 | |||
10503 | |||
10504 | class LLAdvancedCheckMultipleViewers : public view_listener_t | ||
10505 | { | ||
10506 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10507 | { | ||
10508 | bool new_value = gSavedSettings.getBOOL("AllowMultipleViewers"); | ||
10509 | std::string control_name = userdata["control"].asString(); | ||
10510 | gMenuHolder->findControl(control_name)->setValue(new_value); | ||
10511 | return true; | ||
10512 | } | ||
10513 | }; | ||
10514 | |||
10515 | |||
10516 | |||
10455 | /////////////// | 10517 | /////////////// |
10456 | // RLVa Main // | 10518 | // RLVa Main // |
10457 | /////////////// | 10519 | /////////////// |
@@ -10893,7 +10955,8 @@ void initialize_menus() | |||
10893 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); | 10955 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); |
10894 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); | 10956 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); |
10895 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); | 10957 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); |
10896 | 10958 | addMenu(new LLAdvancedToggleMultipleViewers(), "Advanced.ToggleMultipleViewers"); | |
10959 | addMenu(new LLAdvancedCheckMultipleViewers(), "Advanced.CheckMultipleViewers"); | ||
10897 | 10960 | ||
10898 | // RLVa | 10961 | // RLVa |
10899 | addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); | 10962 | addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); |
diff --git a/linden/indra/newview/llviewermenu.h b/linden/indra/newview/llviewermenu.h index 48e7492..26c65fb 100644 --- a/linden/indra/newview/llviewermenu.h +++ b/linden/indra/newview/llviewermenu.h | |||
@@ -106,6 +106,7 @@ void handle_toggle_flycam(); | |||
106 | bool handle_sit_or_stand(); | 106 | bool handle_sit_or_stand(); |
107 | bool handle_give_money_dialog(); | 107 | bool handle_give_money_dialog(); |
108 | bool handle_object_open(); | 108 | bool handle_object_open(); |
109 | bool handle_go_to_confirm(); | ||
109 | bool handle_go_to(); | 110 | bool handle_go_to(); |
110 | 111 | ||
111 | // Export to XML or Collada | 112 | // Export to XML or Collada |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index d64eecd..54b4730 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -2534,7 +2534,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2534 | 2534 | ||
2535 | if (LLFloaterMap::getInstance()) | 2535 | if (LLFloaterMap::getInstance()) |
2536 | { | 2536 | { |
2537 | LLFloaterMap::getInstance()->updateTypingList(from_id, false); | 2537 | LLFloaterMap::getInstance()->getRadar()->addToTypingList(from_id); |
2538 | } | 2538 | } |
2539 | 2539 | ||
2540 | return; | 2540 | return; |
@@ -2551,10 +2551,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
2551 | 2551 | ||
2552 | if (LLFloaterMap::getInstance()) | 2552 | if (LLFloaterMap::getInstance()) |
2553 | { | 2553 | { |
2554 | if (LLFloaterMap::getInstance()->isTyping(from_id)) | 2554 | LLFloaterMap::getInstance()->getRadar()->removeFromTypingList(from_id); |
2555 | { | ||
2556 | LLFloaterMap::getInstance()->updateTypingList(from_id, true); | ||
2557 | } | ||
2558 | } | 2555 | } |
2559 | 2556 | ||
2560 | return; | 2557 | return; |
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index 5e131b9..296c540 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp | |||
@@ -1377,6 +1377,13 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc) | |||
1377 | 1377 | ||
1378 | void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc ) | 1378 | void LLViewerTextEditor::openEmbeddedTexture( LLInventoryItem* item, llwchar wc ) |
1379 | { | 1379 | { |
1380 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-13 (RLVa-1.0.5c) | Added: RLVa-1.0.5c | ||
1381 | if (gRlvHandler.hasBehaviour(RLV_BHVR_VIEWTEXTURE)) | ||
1382 | { | ||
1383 | return; | ||
1384 | } | ||
1385 | // [/RLVa:KB] | ||
1386 | |||
1380 | // See if we can bring an existing preview to the front | 1387 | // See if we can bring an existing preview to the front |
1381 | // *NOTE: Just for embedded Texture , we should use getAssetUUID(), | 1388 | // *NOTE: Just for embedded Texture , we should use getAssetUUID(), |
1382 | // not getUUID(), because LLPreviewTexture pass in AssetUUID into | 1389 | // not getUUID(), because LLPreviewTexture pass in AssetUUID into |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index d35ad40..225ef2e 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -6048,37 +6048,10 @@ BOOL LLVOAvatar::attachObject(LLViewerObject *viewer_object) | |||
6048 | { | 6048 | { |
6049 | updateAttachmentVisibility(gAgent.getCameraMode()); | 6049 | updateAttachmentVisibility(gAgent.getCameraMode()); |
6050 | 6050 | ||
6051 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | 6051 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
6052 | if (rlv_handler_t::isEnabled()) | 6052 | if (rlv_handler_t::isEnabled()) |
6053 | { | 6053 | { |
6054 | static bool fRlvFullyLoaded = false; | 6054 | gRlvHandler.onAttach(attachment); |
6055 | static LLFrameTimer* pRlvFullyLoadedTimer = NULL; | ||
6056 | |||
6057 | // There's no way to know when we're done reattaching what was attached at log-off but this ugly evil bad hack tries anyway | ||
6058 | if (!fRlvFullyLoaded) | ||
6059 | { | ||
6060 | if (pRlvFullyLoadedTimer) | ||
6061 | { | ||
6062 | if (pRlvFullyLoadedTimer->getElapsedTimeF32() > 30.0f) | ||
6063 | { | ||
6064 | fRlvFullyLoaded = true; | ||
6065 | delete pRlvFullyLoadedTimer; | ||
6066 | pRlvFullyLoadedTimer = NULL; | ||
6067 | } | ||
6068 | else | ||
6069 | { | ||
6070 | pRlvFullyLoadedTimer->reset(); | ||
6071 | } | ||
6072 | } | ||
6073 | else if ( (!pRlvFullyLoadedTimer) && | ||
6074 | ( (0 == mPendingAttachment.size()) || | ||
6075 | ((1 == mPendingAttachment.size()) && (mPendingAttachment[0] == viewer_object)) ) ) | ||
6076 | { | ||
6077 | pRlvFullyLoadedTimer = new LLFrameTimer(); | ||
6078 | } | ||
6079 | } | ||
6080 | |||
6081 | gRlvHandler.onAttach(attachment, fRlvFullyLoaded); | ||
6082 | } | 6055 | } |
6083 | // [/RLVa:KB] | 6056 | // [/RLVa:KB] |
6084 | 6057 | ||
diff --git a/linden/indra/newview/llvovolume.cpp b/linden/indra/newview/llvovolume.cpp index d543a65..607bb42 100644 --- a/linden/indra/newview/llvovolume.cpp +++ b/linden/indra/newview/llvovolume.cpp | |||
@@ -1979,9 +1979,9 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector3& start, const LLVector3& e | |||
1979 | { | 1979 | { |
1980 | if (!mbCanSelect || | 1980 | if (!mbCanSelect || |
1981 | // (gHideSelectedObjects && isSelected()) || | 1981 | // (gHideSelectedObjects && isSelected()) || |
1982 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1982 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
1983 | ( (gHideSelectedObjects && isSelected()) && | 1983 | ( (gHideSelectedObjects && isSelected()) && |
1984 | ((!rlv_handler_t::isEnabled()) || (!isHUDAttachment()) || (gRlvHandler.isDetachable(this))) ) || | 1984 | ((!rlv_handler_t::isEnabled()) || (!isHUDAttachment()) || (!gRlvHandler.isLockedAttachment(this, RLV_LOCK_REMOVE))) ) || |
1985 | // [/RLVa:KB] | 1985 | // [/RLVa:KB] |
1986 | mDrawable->isDead() || | 1986 | mDrawable->isDead() || |
1987 | !gPipeline.hasRenderType(mDrawable->getRenderType())) | 1987 | !gPipeline.hasRenderType(mDrawable->getRenderType())) |
@@ -2128,10 +2128,10 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, | |||
2128 | // { | 2128 | // { |
2129 | // return; | 2129 | // return; |
2130 | // } | 2130 | // } |
2131 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 2131 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
2132 | LLViewerObject* pObj = facep->getViewerObject(); | 2132 | LLViewerObject* pObj = facep->getViewerObject(); |
2133 | if ( (pObj->isSelected() && gHideSelectedObjects) && | 2133 | if ( (pObj->isSelected() && gHideSelectedObjects) && |
2134 | ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (gRlvHandler.isDetachable(pObj))) ) | 2134 | ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (!gRlvHandler.isLockedAttachment(pObj, RLV_LOCK_REMOVE))) ) |
2135 | { | 2135 | { |
2136 | return; | 2136 | return; |
2137 | } | 2137 | } |
diff --git a/linden/indra/newview/panelradar.cpp b/linden/indra/newview/panelradar.cpp new file mode 100644 index 0000000..e85af44 --- /dev/null +++ b/linden/indra/newview/panelradar.cpp | |||
@@ -0,0 +1,935 @@ | |||
1 | /** | ||
2 | * @file panelradar.cpp | ||
3 | * @brief PanelRadar class (list of nearby agents) | ||
4 | * | ||
5 | * Copyright (c) 2009, McCabe Maxsted, Jacek Antonelli, Dale Glass | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided to you | ||
8 | * under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
10 | * this distribution, or online at | ||
11 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
12 | * | ||
13 | * There are special exceptions to the terms and conditions of the GPL as | ||
14 | * it is applied to this Source Code. View the full text of the exception | ||
15 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
16 | * online at | ||
17 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | #include "llviewerprecompiledheaders.h" | ||
29 | |||
30 | #include "panelradar.h" | ||
31 | |||
32 | #include "llagent.h" | ||
33 | #include "llchat.h" | ||
34 | #include "llfloateravatarinfo.h" | ||
35 | #include "llfloaterchat.h" | ||
36 | #include "llfloaterfriends.h" | ||
37 | #include "llfloatergroupinvite.h" | ||
38 | #include "llfloatergroups.h" | ||
39 | #include "llfloaterreporter.h" | ||
40 | #include "llimview.h" | ||
41 | #include "llmutelist.h" | ||
42 | #include "llparcel.h" | ||
43 | #include "llregionposition.h" | ||
44 | #include "roles_constants.h" | ||
45 | #include "llscrolllistctrl.h" | ||
46 | #include "lltracker.h" | ||
47 | #include "lluictrlfactory.h" | ||
48 | #include "llviewerobjectlist.h" | ||
49 | #include "llviewermenu.h" | ||
50 | #include "llviewermessage.h" | ||
51 | #include "llviewerparcelmgr.h" | ||
52 | #include "llviewerregion.h" | ||
53 | #include "llviewerwindow.h" | ||
54 | #include "llvoavatar.h" | ||
55 | #include "llworld.h" | ||
56 | |||
57 | |||
58 | PanelRadar::PanelRadar() | ||
59 | : | ||
60 | LLPanel(), | ||
61 | mSelectedAvatar(LLUUID::null) | ||
62 | { | ||
63 | LLUICtrlFactory::getInstance()->buildPanel(this, "panel_radar.xml"); | ||
64 | |||
65 | mChatAvatars.clear(); | ||
66 | mTypingAvatars.clear(); | ||
67 | mSimAvatars.clear(); | ||
68 | } | ||
69 | |||
70 | |||
71 | BOOL PanelRadar::postBuild() | ||
72 | { | ||
73 | mRadarList = getChild<LLScrollListCtrl>("RadarList"); | ||
74 | childSetCommitCallback("RadarList", onUseRadarList, this); | ||
75 | mRadarList->setDoubleClickCallback(onClickIM); | ||
76 | |||
77 | childSetAction("im_btn", onClickIM, this); | ||
78 | childSetAction("profile_btn", onClickProfile, this); | ||
79 | childSetAction("offer_teleport_btn", onClickOfferTeleport, this); | ||
80 | childSetAction("track_btn", onClickTrack, this); | ||
81 | childSetAction("invite_btn", onClickInvite, this); | ||
82 | childSetAction("add_btn", onClickAddFriend, this); | ||
83 | childSetAction("freeze_btn", onClickFreeze, this); | ||
84 | childSetAction("eject_btn", onClickEject, this); | ||
85 | childSetAction("mute_btn", onClickMute, this); | ||
86 | childSetAction("unmute_btn", onClickUnmute, this); | ||
87 | childSetAction("ar_btn", onClickAR, this); | ||
88 | childSetAction("estate_eject_btn", onClickEjectFromEstate, this); | ||
89 | |||
90 | setDefaultBtn("im_btn"); | ||
91 | |||
92 | populateRadar(); | ||
93 | |||
94 | return TRUE; | ||
95 | } | ||
96 | |||
97 | |||
98 | PanelRadar::~PanelRadar() | ||
99 | { | ||
100 | } | ||
101 | |||
102 | |||
103 | //static | ||
104 | bool PanelRadar::isImpDev(LLUUID agent_id) | ||
105 | { | ||
106 | // We use strings here as avatar keys change across grids. | ||
107 | // Feel free to add/remove yourself. | ||
108 | std::string agent_name = getSelectedName(agent_id); | ||
109 | return (agent_name == "McCabe Maxsted" || | ||
110 | agent_name == "Jacek Antonelli" || | ||
111 | agent_name == "Armin Weatherwax"); | ||
112 | } | ||
113 | |||
114 | |||
115 | void PanelRadar::populateRadar() | ||
116 | { | ||
117 | if (!getVisible()) | ||
118 | { | ||
119 | return; | ||
120 | } | ||
121 | |||
122 | if (visibleItemsSelected()) | ||
123 | { | ||
124 | mSelectedAvatar = mRadarList->getFirstSelected()->getUUID(); | ||
125 | } | ||
126 | else | ||
127 | { | ||
128 | mSelectedAvatar.setNull(); | ||
129 | } | ||
130 | |||
131 | S32 scroll_pos = mRadarList->getScrollPos(); | ||
132 | |||
133 | // clear count | ||
134 | std::stringstream avatar_count; | ||
135 | avatar_count.str(""); | ||
136 | |||
137 | // find what avatars you can see | ||
138 | F32 range = gSavedSettings.getF32("NearMeRange"); | ||
139 | LLVector3d current_pos = gAgent.getPositionGlobal(); | ||
140 | std::vector<LLUUID> avatar_ids; | ||
141 | std::vector<LLVector3d> positions; | ||
142 | LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); | ||
143 | |||
144 | LLSD element; | ||
145 | |||
146 | mRadarList->deleteAllItems(); | ||
147 | |||
148 | if (!avatar_ids.empty()) | ||
149 | { | ||
150 | for (U32 i=0; i<avatar_ids.size(); i++) | ||
151 | { | ||
152 | if (avatar_ids[i] == gAgent.getID() || | ||
153 | avatar_ids[i].isNull()) | ||
154 | { | ||
155 | continue; | ||
156 | } | ||
157 | |||
158 | // Add to list only if we get their name | ||
159 | std::string fullname = getSelectedName(avatar_ids[i]); | ||
160 | if (!fullname.empty()) | ||
161 | { | ||
162 | bool notify_chat = gSavedSettings.getBOOL("MiniMapNotifyChatRange"); | ||
163 | bool notify_sim = gSavedSettings.getBOOL("MiniMapNotifySimRange"); | ||
164 | // [RLVa:KB] - Alternate: Imprudence-1.2.0 | ||
165 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
166 | { | ||
167 | fullname = gRlvHandler.getAnonym(fullname); | ||
168 | notify_chat = false; | ||
169 | notify_sim = false; | ||
170 | } | ||
171 | // [/RLVa:KB] | ||
172 | |||
173 | // check if they're in certain ranges and notify user if we've enabled that | ||
174 | LLVector3d temp = positions[i]; | ||
175 | if (positions[i].mdV[VZ] == 0.0f) // LL only sends height value up to 1024m, try to work around it | ||
176 | { | ||
177 | LLViewerObject *av_obj = gObjectList.findObject(avatar_ids[i]); | ||
178 | if (av_obj != NULL && av_obj->isAvatar()) | ||
179 | { | ||
180 | LLVOAvatar* avatarp = (LLVOAvatar*)av_obj; | ||
181 | if (avatarp != NULL) | ||
182 | { | ||
183 | temp = avatarp->getPositionGlobal(); | ||
184 | } | ||
185 | } | ||
186 | } | ||
187 | F64 distance = dist_vec(temp, current_pos); | ||
188 | // we round for accuracy when avs tp in | ||
189 | std::string dist_string = llformat("%.1f", llround((F32)distance, 0.1f)); | ||
190 | |||
191 | /*llinfos << "Avatar :" << fullname << " Position: " << positions[i] << " Your Position: " | ||
192 | << current_pos << " Distance: " << distance << llendl;*/ | ||
193 | |||
194 | if (notify_chat) | ||
195 | { | ||
196 | if (distance < 20.0f) | ||
197 | { | ||
198 | if (!isInChatList(avatar_ids[i])) | ||
199 | { | ||
200 | addToChatList(avatar_ids[i], dist_string); | ||
201 | } | ||
202 | } | ||
203 | else | ||
204 | { | ||
205 | if (isInChatList(avatar_ids[i])) | ||
206 | { | ||
207 | removeFromChatList(avatar_ids[i]); | ||
208 | } | ||
209 | } | ||
210 | updateChatList(avatar_ids); | ||
211 | } | ||
212 | else if (!mChatAvatars.empty()) | ||
213 | { | ||
214 | mChatAvatars.clear(); | ||
215 | } | ||
216 | |||
217 | if (notify_sim) | ||
218 | { | ||
219 | if (!isInChatList(avatar_ids[i]) && !isInSimAvList(avatar_ids[i])) | ||
220 | { | ||
221 | LLViewerObject *av_obj = gObjectList.findObject(avatar_ids[i]); | ||
222 | if (av_obj != NULL && av_obj->isAvatar()) | ||
223 | { | ||
224 | LLVOAvatar* avatarp = (LLVOAvatar*)av_obj; | ||
225 | if (avatarp != NULL) | ||
226 | { | ||
227 | if (avatarp->getRegion() == gAgent.getRegion()) | ||
228 | { | ||
229 | addToSimAvList(avatar_ids[i], dist_string); | ||
230 | } | ||
231 | } | ||
232 | } | ||
233 | } | ||
234 | updateSimAvList(avatar_ids); | ||
235 | } | ||
236 | else if (!mSimAvatars.empty()) | ||
237 | { | ||
238 | mSimAvatars.clear(); | ||
239 | } | ||
240 | |||
241 | // only display avatars in range | ||
242 | if (distance <= range) | ||
243 | { | ||
244 | // append typing string | ||
245 | std::string typing = ""; | ||
246 | if (isTyping(avatar_ids[i])) | ||
247 | { | ||
248 | typing = getString("is_typing")+ " "; | ||
249 | } | ||
250 | |||
251 | std::string mute_text = LLMuteList::getInstance()->isMuted(avatar_ids[i]) ? getString("is_muted") : ""; | ||
252 | element["id"] = avatar_ids[i]; | ||
253 | element["columns"][0]["column"] = "avatar_name"; | ||
254 | element["columns"][0]["type"] = "text"; | ||
255 | element["columns"][0]["value"] = typing + fullname + " " + mute_text; | ||
256 | element["columns"][1]["column"] = "avatar_distance"; | ||
257 | element["columns"][1]["type"] = "text"; | ||
258 | element["columns"][1]["value"] = dist_string+"m"; | ||
259 | |||
260 | mRadarList->addElement(element, ADD_BOTTOM); | ||
261 | } | ||
262 | } | ||
263 | } | ||
264 | |||
265 | mRadarList->sortItems(); | ||
266 | mRadarList->setScrollPos(scroll_pos); | ||
267 | if (mSelectedAvatar.notNull()) | ||
268 | { | ||
269 | mRadarList->selectByID(mSelectedAvatar); | ||
270 | } | ||
271 | avatar_count << (int)avatar_ids.size(); | ||
272 | } | ||
273 | else | ||
274 | { | ||
275 | mTypingAvatars.clear(); | ||
276 | mRadarList->addCommentText(getString("no_one_near"), ADD_TOP); | ||
277 | avatar_count << "0"; | ||
278 | } | ||
279 | |||
280 | childSetText("lblAvatarCount", avatar_count.str()); | ||
281 | |||
282 | updateButtonStates(); | ||
283 | |||
284 | //llinfos << "mSelectedAvatar: " << mSelectedAvatar.asString() << llendl; | ||
285 | } | ||
286 | |||
287 | |||
288 | void PanelRadar::updateChatList(std::vector<LLUUID> agent_ids) | ||
289 | { | ||
290 | std::set<LLUUID>::iterator it; | ||
291 | std::vector<LLUUID>::iterator result; | ||
292 | for (it = mChatAvatars.begin(); it != mChatAvatars.end(); ) | ||
293 | { | ||
294 | result = find(agent_ids.begin(), agent_ids.end(), *it); | ||
295 | if (result == agent_ids.end()) | ||
296 | { | ||
297 | mChatAvatars.erase(it++); | ||
298 | } | ||
299 | else | ||
300 | { | ||
301 | it++; | ||
302 | } | ||
303 | } | ||
304 | } | ||
305 | |||
306 | |||
307 | bool PanelRadar::isInChatList(LLUUID agent_id) | ||
308 | { | ||
309 | return (mChatAvatars.count(agent_id) > 0); | ||
310 | } | ||
311 | |||
312 | |||
313 | void PanelRadar::addToChatList(LLUUID agent_id, std::string distance) | ||
314 | { | ||
315 | mChatAvatars.insert(agent_id); | ||
316 | LLChat chat; | ||
317 | |||
318 | LLUIString notify = getString("entering_chat_range"); | ||
319 | notify.setArg("[NAME]", getSelectedName(agent_id)); | ||
320 | notify.setArg("[DISTANCE]", distance); | ||
321 | |||
322 | chat.mText = notify; | ||
323 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
324 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
325 | } | ||
326 | |||
327 | |||
328 | void PanelRadar::removeFromChatList(LLUUID agent_id) | ||
329 | { | ||
330 | // Do we want to add a notice? | ||
331 | mChatAvatars.erase(agent_id); | ||
332 | } | ||
333 | |||
334 | |||
335 | bool PanelRadar::isTyping(LLUUID agent_id) | ||
336 | { | ||
337 | return (mTypingAvatars.count(agent_id) > 0); | ||
338 | } | ||
339 | |||
340 | |||
341 | void PanelRadar::addToTypingList(LLUUID agent_id) | ||
342 | { | ||
343 | mTypingAvatars.insert(agent_id); | ||
344 | } | ||
345 | |||
346 | |||
347 | void PanelRadar::removeFromTypingList(LLUUID agent_id) | ||
348 | { | ||
349 | mTypingAvatars.erase(agent_id); | ||
350 | } | ||
351 | |||
352 | |||
353 | void PanelRadar::updateSimAvList(std::vector<LLUUID> agent_ids) | ||
354 | { | ||
355 | std::set<LLUUID>::iterator it; | ||
356 | std::vector<LLUUID>::iterator result; | ||
357 | for (it = mSimAvatars.begin(); it != mSimAvatars.end(); ) | ||
358 | { | ||
359 | result = find(agent_ids.begin(), agent_ids.end(), *it); | ||
360 | if (result == agent_ids.end()) | ||
361 | { | ||
362 | mSimAvatars.erase(it++); | ||
363 | } | ||
364 | else | ||
365 | { | ||
366 | it++; | ||
367 | } | ||
368 | } | ||
369 | } | ||
370 | |||
371 | |||
372 | void PanelRadar::addToSimAvList(LLUUID agent_id, std::string distance) | ||
373 | { | ||
374 | mSimAvatars.insert(agent_id); | ||
375 | LLChat chat; | ||
376 | |||
377 | LLUIString notify = getString("entering_sim_range"); | ||
378 | notify.setArg("[NAME]", getSelectedName(agent_id)); | ||
379 | notify.setArg("[DISTANCE]", distance); | ||
380 | |||
381 | chat.mText = notify; | ||
382 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
383 | LLFloaterChat::addChat(chat, FALSE, FALSE); | ||
384 | } | ||
385 | |||
386 | |||
387 | bool PanelRadar::isInSimAvList(LLUUID agent_id) | ||
388 | { | ||
389 | if (mSimAvatars.count(agent_id) > 0) | ||
390 | { | ||
391 | return true; | ||
392 | } | ||
393 | return false; | ||
394 | } | ||
395 | |||
396 | |||
397 | void PanelRadar::updateButtonStates() | ||
398 | { | ||
399 | bool enable = false; | ||
400 | bool enable_unmute = false; | ||
401 | bool enable_track = false; | ||
402 | bool enable_estate = false; | ||
403 | bool enable_friend = false; | ||
404 | if (hasFocus()) | ||
405 | { | ||
406 | enable = mSelectedAvatar.notNull() ? visibleItemsSelected() : false; | ||
407 | enable_unmute = mSelectedAvatar.notNull() ? LLMuteList::getInstance()->isMuted(mSelectedAvatar) : false; | ||
408 | enable_track = gAgent.isGodlike() || is_agent_mappable(mSelectedAvatar); | ||
409 | enable_estate = isKickable(mSelectedAvatar); | ||
410 | enable_friend = !is_agent_friend(mSelectedAvatar); | ||
411 | } | ||
412 | else | ||
413 | { | ||
414 | mRadarList->deselect(); | ||
415 | } | ||
416 | |||
417 | childSetEnabled("im_btn", enable); | ||
418 | childSetEnabled("profile_btn", enable); | ||
419 | childSetEnabled("offer_teleport_btn", enable); | ||
420 | childSetEnabled("track_btn", enable_track); | ||
421 | childSetEnabled("invite_btn", enable); | ||
422 | childSetEnabled("add_btn", enable); | ||
423 | childSetEnabled("freeze_btn", enable_estate); | ||
424 | childSetEnabled("eject_btn", enable_estate); | ||
425 | childSetEnabled("mute_btn", enable); | ||
426 | childSetEnabled("ar_btn", enable); | ||
427 | childSetEnabled("estate_eject_btn", enable_estate); | ||
428 | |||
429 | if (enable_unmute) | ||
430 | { | ||
431 | childSetVisible("mute_btn", false); | ||
432 | childSetEnabled("unmute_btn", true); | ||
433 | childSetVisible("unmute_btn", true); | ||
434 | } | ||
435 | else | ||
436 | { | ||
437 | childSetVisible("mute_btn", true); | ||
438 | childSetVisible("unmute_btn", false); | ||
439 | } | ||
440 | |||
441 | // [RLVa:KB] - Imprudence-1.2.0 | ||
442 | // Bit clumsy, but this way the RLV stuff is in its own separate | ||
443 | // block and keeps the code above clean - Kitty | ||
444 | if ( (rlv_handler_t::isEnabled()) && (mSelectedAvatar.notNull()) ) | ||
445 | { | ||
446 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) | ||
447 | { | ||
448 | childSetEnabled("im_btn", false); | ||
449 | childSetEnabled("profile_btn", false); | ||
450 | childSetEnabled("invite_btn", false); | ||
451 | childSetEnabled("add_btn", false); | ||
452 | childSetEnabled("mute_btn", false); | ||
453 | childSetEnabled("unmute_btn", false); | ||
454 | } | ||
455 | |||
456 | // Even though the avie is in the same sim (so they already know | ||
457 | // where we are) the tp would just get blocked by different code | ||
458 | // so it's actually less confusing to the user if we just disable | ||
459 | // the teleport button here so they'll at least have a visual cue | ||
460 | BOOL rlv_enable_tp = (!gRlvHandler.hasBehaviour(RLV_BHVR_TPLURE)) || (gRlvHandler.isException(RLV_BHVR_TPLURE, mSelectedAvatar)); | ||
461 | if ( (rlv_enable_tp) && (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ) | ||
462 | { | ||
463 | const LLRelationship* pBuddyInfo = LLAvatarTracker::instance().getBuddyInfo(mSelectedAvatar); | ||
464 | if ( ((!pBuddyInfo) || (!pBuddyInfo->isOnline()) || (!pBuddyInfo->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION))) ) | ||
465 | rlv_enable_tp = FALSE; | ||
466 | } | ||
467 | childSetEnabled("offer_teleport_btn", rlv_enable_tp); | ||
468 | } | ||
469 | // [/RLVa:KB] | ||
470 | } | ||
471 | |||
472 | |||
473 | bool PanelRadar::isKickable(const LLUUID &agent_id) | ||
474 | { | ||
475 | if (agent_id.notNull()) | ||
476 | { | ||
477 | LLViewerObject* av_obj = gObjectList.findObject(agent_id); | ||
478 | if (av_obj != NULL && av_obj->isAvatar()) | ||
479 | { | ||
480 | LLVOAvatar* avatar = (LLVOAvatar*)av_obj; | ||
481 | LLViewerRegion* region = avatar->getRegion(); | ||
482 | if (region) | ||
483 | { | ||
484 | const LLVector3& pos = avatar->getPositionRegion(); | ||
485 | const LLVector3d& pos_global = avatar->getPositionGlobal(); | ||
486 | if (LLWorld::getInstance()->positionRegionValidGlobal(pos_global)) | ||
487 | { | ||
488 | LLParcel* parcel = LLViewerParcelMgr::getInstance()->selectParcelAt(pos_global)->getParcel(); | ||
489 | LLViewerParcelMgr::getInstance()->deselectLand(); | ||
490 | |||
491 | bool new_value = (region != NULL); | ||
492 | |||
493 | if (new_value) | ||
494 | { | ||
495 | new_value = region->isOwnedSelf(pos); | ||
496 | if (!new_value || region->isOwnedGroup(pos)) | ||
497 | { | ||
498 | new_value = LLViewerParcelMgr::getInstance()->isParcelOwnedByAgent(parcel,GP_LAND_ADMIN); | ||
499 | } | ||
500 | } | ||
501 | return new_value; | ||
502 | } | ||
503 | } | ||
504 | } | ||
505 | } | ||
506 | return false; | ||
507 | } | ||
508 | |||
509 | |||
510 | // static | ||
511 | void PanelRadar::onUseRadarList(LLUICtrl* ctrl, void* user_data) | ||
512 | { | ||
513 | PanelRadar* self = (PanelRadar*)user_data; | ||
514 | if (self) | ||
515 | { | ||
516 | self->updateButtonStates(); | ||
517 | } | ||
518 | } | ||
519 | |||
520 | |||
521 | bool PanelRadar::visibleItemsSelected() const | ||
522 | { | ||
523 | return (mRadarList->getFirstSelectedIndex() >= 0); | ||
524 | } | ||
525 | |||
526 | |||
527 | LLUUID PanelRadar::getSelected() | ||
528 | { | ||
529 | return mSelectedAvatar; | ||
530 | } | ||
531 | |||
532 | |||
533 | //static | ||
534 | std::string PanelRadar::getSelectedName(const LLUUID &agent_id) | ||
535 | { | ||
536 | std::string agent_name; | ||
537 | if(gCacheName->getFullName(agent_id, agent_name) && agent_name != " ") | ||
538 | { | ||
539 | return agent_name; | ||
540 | } | ||
541 | return LLStringUtil::null; | ||
542 | } | ||
543 | |||
544 | |||
545 | // | ||
546 | // Avatar tab | ||
547 | // | ||
548 | |||
549 | // static | ||
550 | void PanelRadar::onClickIM(void* user_data) | ||
551 | { | ||
552 | PanelRadar* self = (PanelRadar*) user_data; | ||
553 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
554 | if (item != NULL) | ||
555 | { | ||
556 | LLUUID agent_id = item->getUUID(); | ||
557 | gIMMgr->setFloaterOpen(TRUE); | ||
558 | gIMMgr->addSession(getSelectedName(agent_id), IM_NOTHING_SPECIAL, agent_id); | ||
559 | } | ||
560 | } | ||
561 | |||
562 | |||
563 | // static | ||
564 | void PanelRadar::onClickProfile(void* user_data) | ||
565 | { | ||
566 | PanelRadar* self = (PanelRadar*) user_data; | ||
567 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
568 | if (item != NULL) | ||
569 | { | ||
570 | LLUUID agent_id = item->getUUID(); | ||
571 | LLFloaterAvatarInfo::show(agent_id); | ||
572 | } | ||
573 | } | ||
574 | |||
575 | |||
576 | // static | ||
577 | void PanelRadar::onClickOfferTeleport(void* user_data) | ||
578 | { | ||
579 | PanelRadar* self = (PanelRadar*) user_data; | ||
580 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
581 | if (item != NULL) | ||
582 | { | ||
583 | LLUUID agent_id = item->getUUID(); | ||
584 | handle_lure(agent_id); | ||
585 | } | ||
586 | } | ||
587 | |||
588 | |||
589 | // static | ||
590 | void PanelRadar::onClickTrack(void* user_data) | ||
591 | { | ||
592 | PanelRadar* self = (PanelRadar*) user_data; | ||
593 | LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); | ||
594 | |||
595 | if (LLTracker::TRACKING_AVATAR == tracking_status) | ||
596 | { | ||
597 | LLTracker::stopTracking(NULL); | ||
598 | } | ||
599 | else | ||
600 | { | ||
601 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
602 | if (item != NULL) | ||
603 | { | ||
604 | LLUUID agent_id = item->getUUID(); | ||
605 | LLTracker::trackAvatar(agent_id, getSelectedName(agent_id)); | ||
606 | } | ||
607 | } | ||
608 | } | ||
609 | |||
610 | |||
611 | // static | ||
612 | void PanelRadar::onClickInvite(void* user_data) | ||
613 | { | ||
614 | PanelRadar* self = (PanelRadar*) user_data; | ||
615 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
616 | if (item != NULL) | ||
617 | { | ||
618 | LLUUID agent_id = item->getUUID(); | ||
619 | LLFloaterGroupPicker* widget; | ||
620 | widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); | ||
621 | if (widget) | ||
622 | { | ||
623 | widget->center(); | ||
624 | widget->setPowersMask(GP_MEMBER_INVITE); | ||
625 | widget->setSelectCallback(callback_invite_to_group, (void *)&agent_id); | ||
626 | } | ||
627 | } | ||
628 | } | ||
629 | |||
630 | |||
631 | // static | ||
632 | void PanelRadar::callback_invite_to_group(LLUUID group_id, void *user_data) | ||
633 | { | ||
634 | std::vector<LLUUID> agent_ids; | ||
635 | agent_ids.push_back(*(LLUUID *)user_data); | ||
636 | |||
637 | LLFloaterGroupInvite::showForGroup(group_id, &agent_ids); | ||
638 | } | ||
639 | |||
640 | |||
641 | // static | ||
642 | void PanelRadar::onClickAddFriend(void* user_data) | ||
643 | { | ||
644 | PanelRadar* self = (PanelRadar*) user_data; | ||
645 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
646 | if (item != NULL) | ||
647 | { | ||
648 | LLUUID agent_id = item->getUUID(); | ||
649 | LLPanelFriends::requestFriendshipDialog(agent_id, getSelectedName(agent_id)); | ||
650 | } | ||
651 | } | ||
652 | |||
653 | |||
654 | |||
655 | // | ||
656 | // Estate tab | ||
657 | // | ||
658 | |||
659 | //static | ||
660 | void PanelRadar::callbackFreeze(S32 option, void *user_data) | ||
661 | { | ||
662 | PanelRadar *self = (PanelRadar*)user_data; | ||
663 | |||
664 | if ( option == 0 ) | ||
665 | { | ||
666 | sendFreeze(self->mSelectedAvatar, true); | ||
667 | } | ||
668 | else if ( option == 1 ) | ||
669 | { | ||
670 | sendFreeze(self->mSelectedAvatar, false); | ||
671 | } | ||
672 | } | ||
673 | |||
674 | |||
675 | //static | ||
676 | void PanelRadar::callbackEject(S32 option, void *user_data) | ||
677 | { | ||
678 | PanelRadar *self = (PanelRadar*)user_data; | ||
679 | |||
680 | if ( option == 0 ) | ||
681 | { | ||
682 | sendEject(self->mSelectedAvatar, false); | ||
683 | } | ||
684 | else if ( option == 1 ) | ||
685 | { | ||
686 | sendEject(self->mSelectedAvatar, true); | ||
687 | } | ||
688 | } | ||
689 | |||
690 | |||
691 | //static | ||
692 | void PanelRadar::callbackEjectFromEstate(S32 option, void *user_data) | ||
693 | { | ||
694 | PanelRadar *self = (PanelRadar*)user_data; | ||
695 | |||
696 | if ( option == 0 ) | ||
697 | { | ||
698 | cmdEstateEject(self->mSelectedAvatar); | ||
699 | } | ||
700 | else if ( option == 1 ) | ||
701 | { | ||
702 | cmdEstateBan(self->mSelectedAvatar); | ||
703 | } | ||
704 | } | ||
705 | |||
706 | |||
707 | void PanelRadar::onClickFreeze(void *user_data) | ||
708 | { | ||
709 | PanelRadar *self = (PanelRadar*)user_data; | ||
710 | LLStringUtil::format_map_t args; | ||
711 | LLSD payload; | ||
712 | args["[AVATAR_NAME]"] = getSelectedName(self->mSelectedAvatar); | ||
713 | gViewerWindow->alertXml("FreezeAvatarFullname", args, callbackFreeze, user_data); | ||
714 | } | ||
715 | |||
716 | |||
717 | //static | ||
718 | void PanelRadar::onClickEject(void *user_data) | ||
719 | { | ||
720 | PanelRadar *self = (PanelRadar*)user_data; | ||
721 | LLStringUtil::format_map_t args; | ||
722 | LLSD payload; | ||
723 | args["AVATAR_NAME"] = getSelectedName(self->mSelectedAvatar); | ||
724 | gViewerWindow->alertXml("EjectAvatarFullName", args, callbackEject, user_data); | ||
725 | } | ||
726 | |||
727 | |||
728 | //static | ||
729 | void PanelRadar::onClickMute(void *user_data) | ||
730 | { | ||
731 | PanelRadar *self = (PanelRadar*)user_data; | ||
732 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
733 | if (item != NULL) | ||
734 | { | ||
735 | LLUUID agent_id = item->getUUID(); | ||
736 | std::string agent_name = getSelectedName(agent_id); | ||
737 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
738 | { | ||
739 | //LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
740 | //LLMuteList::getInstance()->remove(mute); | ||
741 | //LLFloaterMute::getInstance()->selectMute(agent_id); | ||
742 | } | ||
743 | else | ||
744 | { | ||
745 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
746 | LLMuteList::getInstance()->add(mute); | ||
747 | } | ||
748 | } | ||
749 | } | ||
750 | |||
751 | |||
752 | //static | ||
753 | void PanelRadar::onClickUnmute(void *user_data) | ||
754 | { | ||
755 | PanelRadar *self = (PanelRadar*)user_data; | ||
756 | LLScrollListItem *item = self->mRadarList->getFirstSelected(); | ||
757 | if (item != NULL) | ||
758 | { | ||
759 | LLUUID agent_id = item->getUUID(); | ||
760 | std::string agent_name = getSelectedName(agent_id); | ||
761 | if (LLMuteList::getInstance()->isMuted(agent_id)) | ||
762 | { | ||
763 | LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
764 | LLMuteList::getInstance()->remove(mute); | ||
765 | //LLFloaterMute::getInstance()->selectMute(agent_id); | ||
766 | } | ||
767 | else | ||
768 | { | ||
769 | //LLMute mute(agent_id, agent_name, LLMute::AGENT); | ||
770 | //LLMuteList::getInstance()->add(mute); | ||
771 | } | ||
772 | } | ||
773 | } | ||
774 | |||
775 | |||
776 | //static | ||
777 | void PanelRadar::onClickEjectFromEstate(void *user_data) | ||
778 | { | ||
779 | PanelRadar *self = (PanelRadar*)user_data; | ||
780 | LLStringUtil::format_map_t args; | ||
781 | LLSD payload; | ||
782 | args["EVIL_USER"] = getSelectedName(self->mSelectedAvatar); | ||
783 | gViewerWindow->alertXml("EstateKickUser", args, callbackEjectFromEstate, user_data); | ||
784 | } | ||
785 | |||
786 | |||
787 | //static | ||
788 | void PanelRadar::onClickAR(void *user_data) | ||
789 | { | ||
790 | PanelRadar *self = (PanelRadar*)user_data; | ||
791 | LLUUID agent_id = self->mSelectedAvatar; | ||
792 | |||
793 | if (agent_id.notNull()) | ||
794 | { | ||
795 | LLFloaterReporter::showFromObject(agent_id); | ||
796 | } | ||
797 | } | ||
798 | |||
799 | |||
800 | // static | ||
801 | void PanelRadar::cmdEstateEject(const LLUUID &avatar) | ||
802 | { | ||
803 | sendEstateMessage("teleporthomeuser", avatar); | ||
804 | } | ||
805 | |||
806 | |||
807 | // static | ||
808 | void PanelRadar::cmdEstateBan(const LLUUID &avatar) | ||
809 | { | ||
810 | sendEstateMessage("teleporthomeuser", avatar); // Kick first, just to be sure | ||
811 | sendEstateBan(avatar); | ||
812 | } | ||
813 | |||
814 | |||
815 | // static | ||
816 | void PanelRadar::sendFreeze(const LLUUID& avatar_id, bool freeze) | ||
817 | { | ||
818 | U32 flags = 0x0; | ||
819 | if (!freeze) | ||
820 | { | ||
821 | // unfreeze | ||
822 | flags |= 0x1; | ||
823 | } | ||
824 | |||
825 | LLMessageSystem* msg = gMessageSystem; | ||
826 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
827 | |||
828 | if (avatar) | ||
829 | { | ||
830 | msg->newMessage("FreezeUser"); | ||
831 | msg->nextBlock("AgentData"); | ||
832 | msg->addUUID("AgentID", gAgent.getID()); | ||
833 | msg->addUUID("SessionID", gAgent.getSessionID()); | ||
834 | msg->nextBlock("Data"); | ||
835 | msg->addUUID("TargetID", avatar_id ); | ||
836 | msg->addU32("Flags", flags ); | ||
837 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
838 | } | ||
839 | } | ||
840 | |||
841 | |||
842 | // static | ||
843 | void PanelRadar::sendEject(const LLUUID& avatar_id, bool ban) | ||
844 | { | ||
845 | LLMessageSystem* msg = gMessageSystem; | ||
846 | LLViewerObject* avatar = gObjectList.findObject(avatar_id); | ||
847 | |||
848 | if (avatar) | ||
849 | { | ||
850 | U32 flags = 0x0; | ||
851 | if ( ban ) | ||
852 | { | ||
853 | // eject and add to ban list | ||
854 | flags |= 0x1; | ||
855 | } | ||
856 | |||
857 | msg->newMessage("EjectUser"); | ||
858 | msg->nextBlock("AgentData"); | ||
859 | msg->addUUID("AgentID", gAgent.getID() ); | ||
860 | msg->addUUID("SessionID", gAgent.getSessionID() ); | ||
861 | msg->nextBlock("Data"); | ||
862 | msg->addUUID("TargetID", avatar_id ); | ||
863 | msg->addU32("Flags", flags ); | ||
864 | msg->sendReliable( avatar->getRegion()->getHost() ); | ||
865 | } | ||
866 | } | ||
867 | |||
868 | |||
869 | // static | ||
870 | void PanelRadar::sendEstateMessage(const char* request, const LLUUID &target) | ||
871 | { | ||
872 | |||
873 | LLMessageSystem* msg = gMessageSystem; | ||
874 | LLUUID invoice; | ||
875 | |||
876 | // This seems to provide an ID so that the sim can say which request it's | ||
877 | // replying to. I think this can be ignored for now. | ||
878 | invoice.generate(); | ||
879 | |||
880 | llinfos << "Sending estate request '" << request << "'" << llendl; | ||
881 | msg->newMessage("EstateOwnerMessage"); | ||
882 | msg->nextBlockFast(_PREHASH_AgentData); | ||
883 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
884 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
885 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
886 | msg->nextBlock("MethodData"); | ||
887 | msg->addString("Method", request); | ||
888 | msg->addUUID("Invoice", invoice); | ||
889 | |||
890 | // Agent id | ||
891 | msg->nextBlock("ParamList"); | ||
892 | msg->addString("Parameter", gAgent.getID().asString().c_str()); | ||
893 | |||
894 | // Target | ||
895 | msg->nextBlock("ParamList"); | ||
896 | msg->addString("Parameter", target.asString().c_str()); | ||
897 | |||
898 | msg->sendReliable(gAgent.getRegion()->getHost()); | ||
899 | } | ||
900 | |||
901 | |||
902 | // static | ||
903 | void PanelRadar::sendEstateBan(const LLUUID& agent) | ||
904 | { | ||
905 | LLUUID invoice; | ||
906 | U32 flags = ESTATE_ACCESS_BANNED_AGENT_ADD; | ||
907 | |||
908 | invoice.generate(); | ||
909 | |||
910 | LLMessageSystem* msg = gMessageSystem; | ||
911 | msg->newMessage("EstateOwnerMessage"); | ||
912 | msg->nextBlockFast(_PREHASH_AgentData); | ||
913 | msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); | ||
914 | msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
915 | msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used | ||
916 | |||
917 | msg->nextBlock("MethodData"); | ||
918 | msg->addString("Method", "estateaccessdelta"); | ||
919 | msg->addUUID("Invoice", invoice); | ||
920 | |||
921 | char buf[MAX_STRING]; /* Flawfinder: ignore*/ | ||
922 | gAgent.getID().toString(buf); | ||
923 | msg->nextBlock("ParamList"); | ||
924 | msg->addString("Parameter", buf); | ||
925 | |||
926 | snprintf(buf, MAX_STRING, "%u", flags); /* Flawfinder: ignore */ | ||
927 | msg->nextBlock("ParamList"); | ||
928 | msg->addString("Parameter", buf); | ||
929 | |||
930 | agent.toString(buf); | ||
931 | msg->nextBlock("ParamList"); | ||
932 | msg->addString("Parameter", buf); | ||
933 | |||
934 | gAgent.sendReliableMessage(); | ||
935 | } | ||
diff --git a/linden/indra/newview/panelradar.h b/linden/indra/newview/panelradar.h new file mode 100644 index 0000000..0152f26 --- /dev/null +++ b/linden/indra/newview/panelradar.h | |||
@@ -0,0 +1,118 @@ | |||
1 | /** | ||
2 | * @file panelradar.h | ||
3 | * @brief PanelRadar class header (list of nearby agents) | ||
4 | * | ||
5 | * Copyright (c) 2009, McCabe Maxsted, Jacek Antonelli, Dale Glass | ||
6 | * | ||
7 | * The source code in this file ("Source Code") is provided to you | ||
8 | * under the terms of the GNU General Public License, version 2.0 | ||
9 | * ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in | ||
10 | * this distribution, or online at | ||
11 | * http://secondlifegrid.net/programs/open_source/licensing/gplv2 | ||
12 | * | ||
13 | * There are special exceptions to the terms and conditions of the GPL as | ||
14 | * it is applied to this Source Code. View the full text of the exception | ||
15 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
16 | * online at | ||
17 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
18 | * | ||
19 | * By copying, modifying or distributing this software, you acknowledge | ||
20 | * that you have read and understood your obligations described above, | ||
21 | * and agree to abide by those obligations. | ||
22 | * | ||
23 | * ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO | ||
24 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
25 | * COMPLETENESS OR PERFORMANCE. | ||
26 | */ | ||
27 | |||
28 | |||
29 | #ifndef PANELRADAR_H | ||
30 | #define PANELRADAR_H | ||
31 | |||
32 | |||
33 | #include "llpanel.h" | ||
34 | #include "llscrolllistctrl.h" | ||
35 | |||
36 | |||
37 | class PanelRadar : public LLPanel | ||
38 | { | ||
39 | public: | ||
40 | PanelRadar(); | ||
41 | virtual ~PanelRadar(); | ||
42 | |||
43 | BOOL postBuild(); | ||
44 | |||
45 | // returns true if agent_id belongs to an Imprudence developer | ||
46 | static bool isImpDev(LLUUID agent_id); | ||
47 | |||
48 | LLUUID getSelected(); | ||
49 | |||
50 | void addToTypingList(LLUUID agent_id); | ||
51 | void removeFromTypingList(LLUUID agent_id); | ||
52 | |||
53 | void updateButtonStates(); | ||
54 | void populateRadar(); | ||
55 | |||
56 | private: | ||
57 | |||
58 | // TODO: move all this info into its own object. It's stupid | ||
59 | // and bug-prone to keep it all in separate containers, but | ||
60 | // I want to get this out for 1.2 -- McCabe | ||
61 | std::set<LLUUID> mChatAvatars; | ||
62 | std::set<LLUUID> mTypingAvatars; | ||
63 | std::set<LLUUID> mSimAvatars; | ||
64 | |||
65 | LLScrollListCtrl* mRadarList; | ||
66 | LLUUID mSelectedAvatar; | ||
67 | |||
68 | void updateChatList(std::vector<LLUUID> agent_ids); | ||
69 | bool isInChatList(LLUUID agent_id); | ||
70 | void addToChatList(LLUUID agent_id, std::string distance); | ||
71 | void removeFromChatList(LLUUID agent_id); | ||
72 | |||
73 | bool isInSimAvList(LLUUID agent_id); | ||
74 | void addToSimAvList(LLUUID agent_id, std::string distance); | ||
75 | void updateSimAvList(std::vector<LLUUID> agent_ids); | ||
76 | |||
77 | bool isTyping(LLUUID agent_id); | ||
78 | |||
79 | bool visibleItemsSelected() const; | ||
80 | bool isKickable(const LLUUID &agent_id); | ||
81 | |||
82 | static std::string getSelectedName(const LLUUID &agent_id); | ||
83 | |||
84 | static void onUseRadarList(LLUICtrl* ctrl, void* user_data); | ||
85 | static void onRangeChange(LLFocusableElement* focus, void* user_data); | ||
86 | |||
87 | static void onClickProfile(void* user_data); | ||
88 | static void onClickIM(void* user_data); | ||
89 | static void onClickAddFriend(void* user_data); | ||
90 | static void onClickOfferTeleport(void* user_data); | ||
91 | static void onClickTrack(void* user_data); | ||
92 | static void onClickInvite(void* user_data); | ||
93 | static void callback_invite_to_group(LLUUID group_id, void *user_data); | ||
94 | |||
95 | static void onClickFreeze(void *user_data); | ||
96 | static void onClickEject(void *user_data); | ||
97 | static void onClickMute(void *user_data); | ||
98 | static void onClickUnmute(void *user_data); | ||
99 | static void onClickAR(void *user_data); | ||
100 | static void onClickEjectFromEstate(void *user_data); | ||
101 | |||
102 | static void callbackFreeze(S32 option, void *user_data); | ||
103 | static void callbackEject(S32 option, void *user_data); | ||
104 | static void callbackAR(void *user_data); | ||
105 | static void callbackEjectFromEstate(S32 option, void *user_data); | ||
106 | |||
107 | static void sendFreeze(const LLUUID &avatar, bool); | ||
108 | static void sendEject(const LLUUID &avatar, bool); | ||
109 | static void cmdEstateEject(const LLUUID &avatar); | ||
110 | static void cmdEstateBan(const LLUUID &avatar); | ||
111 | static void sendEstateBan(const LLUUID& agent); | ||
112 | static void sendEstateMessage(const char* request, const LLUUID &target); | ||
113 | |||
114 | }; | ||
115 | |||
116 | |||
117 | #endif // PANELRADAR_H | ||
118 | |||
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index 6fb2cec..4ea9e41 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -1965,10 +1965,10 @@ void LLPipeline::stateSort(LLDrawable* drawablep, LLCamera& camera) | |||
1965 | { | 1965 | { |
1966 | // if (drawablep->getVObj().notNull() && | 1966 | // if (drawablep->getVObj().notNull() && |
1967 | // drawablep->getVObj()->isSelected()) | 1967 | // drawablep->getVObj()->isSelected()) |
1968 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | 1968 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
1969 | LLViewerObject* pObj = drawablep->getVObj(); | 1969 | LLViewerObject* pObj = drawablep->getVObj(); |
1970 | if ( (pObj) && (pObj->isSelected()) && | 1970 | if ( (pObj) && (pObj->isSelected()) && |
1971 | ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (gRlvHandler.isDetachable(pObj))) ) | 1971 | ((!rlv_handler_t::isEnabled()) || (!pObj->isHUDAttachment()) || (!gRlvHandler.isLockedAttachment(pObj, RLV_LOCK_REMOVE))) ) |
1972 | // [/RVLa:KB] | 1972 | // [/RVLa:KB] |
1973 | { | 1973 | { |
1974 | return; | 1974 | return; |
diff --git a/linden/indra/newview/rlvdefines.h b/linden/indra/newview/rlvdefines.h index 118ba31..a35d109 100644 --- a/linden/indra/newview/rlvdefines.h +++ b/linden/indra/newview/rlvdefines.h | |||
@@ -41,14 +41,14 @@ | |||
41 | 41 | ||
42 | // Version of the specifcation we support | 42 | // Version of the specifcation we support |
43 | const S32 RLV_VERSION_MAJOR = 1; | 43 | const S32 RLV_VERSION_MAJOR = 1; |
44 | const S32 RLV_VERSION_MINOR = 21; | 44 | const S32 RLV_VERSION_MINOR = 22; |
45 | const S32 RLV_VERSION_PATCH = 0; | 45 | const S32 RLV_VERSION_PATCH = 0; |
46 | const S32 RLV_VERSION_BUILD = 0; | 46 | const S32 RLV_VERSION_BUILD = 0; |
47 | 47 | ||
48 | // Implementation version | 48 | // Implementation version |
49 | const S32 RLVa_VERSION_MAJOR = 1; | 49 | const S32 RLVa_VERSION_MAJOR = 1; |
50 | const S32 RLVa_VERSION_MINOR = 0; | 50 | const S32 RLVa_VERSION_MINOR = 0; |
51 | const S32 RLVa_VERSION_PATCH = 4; | 51 | const S32 RLVa_VERSION_PATCH = 5; |
52 | const S32 RLVa_VERSION_BUILD = 4; | 52 | const S32 RLVa_VERSION_BUILD = 4; |
53 | 53 | ||
54 | // The official viewer version we're patching against | 54 | // The official viewer version we're patching against |
@@ -59,12 +59,15 @@ const S32 RLVa_VERSION_BUILD = 4; | |||
59 | #define RLV_WARNS LL_WARNS("RLV") | 59 | #define RLV_WARNS LL_WARNS("RLV") |
60 | #define RLV_INFOS LL_INFOS("RLV") | 60 | #define RLV_INFOS LL_INFOS("RLV") |
61 | #define RLV_DEBUGS LL_DEBUGS("RLV") | 61 | #define RLV_DEBUGS LL_DEBUGS("RLV") |
62 | #define RLV_ENDL LL_ENDL | ||
62 | 63 | ||
63 | #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | 64 | #if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG |
64 | // Turn on extended debugging information | 65 | // Turn on extended debugging information |
65 | #define RLV_DEBUG | 66 | #define RLV_DEBUG |
66 | // Make sure we halt execution on errors | 67 | // Make sure we halt execution on errors |
67 | #define RLV_ERRS LL_ERRS("RLV") | 68 | #define RLV_ERRS LL_ERRS("RLV") |
69 | // Keep our asserts separate from LL's | ||
70 | #define RLV_ASSERT(f) if (!(f)) RLV_ERRS << "ASSERT (" << #f << ")" << RLV_ENDL; | ||
68 | // Uncomment to enable the Advanced / RLVa / Unit Tests menu (non-public) | 71 | // Uncomment to enable the Advanced / RLVa / Unit Tests menu (non-public) |
69 | //#define RLV_DEBUG_TESTS | 72 | //#define RLV_DEBUG_TESTS |
70 | #else | 73 | #else |
@@ -72,6 +75,8 @@ const S32 RLVa_VERSION_BUILD = 4; | |||
72 | //#define RLV_DEBUG | 75 | //#define RLV_DEBUG |
73 | // Don't halt execution on errors in release | 76 | // Don't halt execution on errors in release |
74 | #define RLV_ERRS LL_WARNS("RLV") | 77 | #define RLV_ERRS LL_WARNS("RLV") |
78 | // We don't want to check assertions in release builds | ||
79 | #define RLV_ASSERT(f) | ||
75 | #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG | 80 | #endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG |
76 | 81 | ||
77 | #define RLV_ROOT_FOLDER "#RLV" | 82 | #define RLV_ROOT_FOLDER "#RLV" |
@@ -111,6 +116,8 @@ enum ERlvBehaviour { | |||
111 | RLV_BHVR_ADDOUTFIT, // "addoutfit" | 116 | RLV_BHVR_ADDOUTFIT, // "addoutfit" |
112 | RLV_BHVR_REMOUTFIT, // "remoutfit" | 117 | RLV_BHVR_REMOUTFIT, // "remoutfit" |
113 | RLV_BHVR_GETOUTFIT, // "getoutfit" | 118 | RLV_BHVR_GETOUTFIT, // "getoutfit" |
119 | RLV_BHVR_ADDATTACH, // "addattach" | ||
120 | RLV_BHVR_REMATTACH, // "remattach" | ||
114 | RLV_BHVR_GETATTACH, // "getattach" | 121 | RLV_BHVR_GETATTACH, // "getattach" |
115 | RLV_BHVR_SHOWINV, // "showinv" | 122 | RLV_BHVR_SHOWINV, // "showinv" |
116 | RLV_BHVR_VIEWNOTE, // "viewnote" | 123 | RLV_BHVR_VIEWNOTE, // "viewnote" |
@@ -152,6 +159,8 @@ enum ERlvBehaviour { | |||
152 | RLV_BHVR_DEFAULTWEAR, // "defaultwear" | 159 | RLV_BHVR_DEFAULTWEAR, // "defaultwear" |
153 | RLV_BHVR_VERSIONNUM, // "versionnum" | 160 | RLV_BHVR_VERSIONNUM, // "versionnum" |
154 | RLV_BHVR_PERMISSIVE, // "permissive" | 161 | RLV_BHVR_PERMISSIVE, // "permissive" |
162 | RLV_BHVR_VIEWSCRIPT, // "viewscript" | ||
163 | RLV_BHVR_VIEWTEXTURE, // "viewtexture" | ||
155 | 164 | ||
156 | RLV_BHVR_COUNT, | 165 | RLV_BHVR_COUNT, |
157 | RLV_BHVR_UNKNOWN | 166 | RLV_BHVR_UNKNOWN |
@@ -185,6 +194,12 @@ enum ERlvExceptionCheck { | |||
185 | RLV_CHECK_DEFAULT // Permissive or strict will be determined by currently enforced restrictions | 194 | RLV_CHECK_DEFAULT // Permissive or strict will be determined by currently enforced restrictions |
186 | }; | 195 | }; |
187 | 196 | ||
197 | enum ERlvLockMask { | ||
198 | RLV_LOCK_ADD = 0x01, | ||
199 | RLV_LOCK_REMOVE = 0x02, | ||
200 | RLV_LOCK_ANY = RLV_LOCK_ADD | RLV_LOCK_REMOVE | ||
201 | }; | ||
202 | |||
188 | // ============================================================================ | 203 | // ============================================================================ |
189 | // Settings | 204 | // Settings |
190 | 205 | ||
diff --git a/linden/indra/newview/rlvextensions.cpp b/linden/indra/newview/rlvextensions.cpp index f31c62e..769d3cc 100644 --- a/linden/indra/newview/rlvextensions.cpp +++ b/linden/indra/newview/rlvextensions.cpp | |||
@@ -97,7 +97,7 @@ BOOL RlvExtGetSet::processCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) | |||
97 | F32 nAngle = 0.0f; | 97 | F32 nAngle = 0.0f; |
98 | if (LLStringUtil::convertToF32(rlvCmd.getOption(), nAngle)) | 98 | if (LLStringUtil::convertToF32(rlvCmd.getOption(), nAngle)) |
99 | { | 99 | { |
100 | nAngle += RLV_SETROT_OFFSET; | 100 | nAngle = RLV_SETROT_OFFSET - nAngle; |
101 | 101 | ||
102 | gAgent.startCameraAnimation(); | 102 | gAgent.startCameraAnimation(); |
103 | 103 | ||
diff --git a/linden/indra/newview/rlvhandler.cpp b/linden/indra/newview/rlvhandler.cpp index 69e2e2f..88cd174 100644 --- a/linden/indra/newview/rlvhandler.cpp +++ b/linden/indra/newview/rlvhandler.cpp | |||
@@ -31,11 +31,6 @@ | |||
31 | #include "rlvextensions.h" | 31 | #include "rlvextensions.h" |
32 | #include "rlvhandler.h" | 32 | #include "rlvhandler.h" |
33 | 33 | ||
34 | // Only defined in llinventorybridge.cpp | ||
35 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
36 | #include "llinventorybridge.h" | ||
37 | void confirm_replace_attachment_rez(S32 option, void* user_data); | ||
38 | #endif | ||
39 | // Only defined in llinventorymodel.cpp | 34 | // Only defined in llinventorymodel.cpp |
40 | extern const char* NEW_CATEGORY_NAME; | 35 | extern const char* NEW_CATEGORY_NAME; |
41 | 36 | ||
@@ -66,8 +61,8 @@ const std::string RlvHandler::cstrMsgTpLure = | |||
66 | const std::string RlvHandler::cstrAnonyms[] = | 61 | const std::string RlvHandler::cstrAnonyms[] = |
67 | { | 62 | { |
68 | "A resident", "This resident", "That resident", "An individual", "This individual", "That individual", "A person", | 63 | "A resident", "This resident", "That resident", "An individual", "This individual", "That individual", "A person", |
69 | "This person", "That person", "A stranger", "This stranger", "That stranger", "A human being", "This human being", | 64 | "This person", "That person", "A stranger", "This stranger", "That stranger", "A being", "This being", |
70 | "That human being", "An agent", "This agent", "That agent", "A soul", "This soul", "That soul", "Somebody", | 65 | "That being", "An agent", "This agent", "That agent", "A soul", "This soul", "That soul", "Somebody", |
71 | "Some people", "Someone", "Mysterious one", "An unknown being", "Unidentified one", "An unknown person" | 66 | "Some people", "Someone", "Mysterious one", "An unknown being", "Unidentified one", "An unknown person" |
72 | }; | 67 | }; |
73 | 68 | ||
@@ -131,6 +126,7 @@ RlvHandler::~RlvHandler() | |||
131 | //delete m_pGCTimer; // <- deletes itself | 126 | //delete m_pGCTimer; // <- deletes itself |
132 | delete m_pWLSnapshot; // <- delete on NULL is harmless | 127 | delete m_pWLSnapshot; // <- delete on NULL is harmless |
133 | delete m_pBhvrNotify; | 128 | delete m_pBhvrNotify; |
129 | delete m_pAttachMgr; | ||
134 | } | 130 | } |
135 | 131 | ||
136 | // ============================================================================ | 132 | // ============================================================================ |
@@ -246,7 +242,7 @@ bool RlvHandler::hasLockedHUD() const | |||
246 | return false; | 242 | return false; |
247 | 243 | ||
248 | LLViewerJointAttachment* pAttachPt; | 244 | LLViewerJointAttachment* pAttachPt; |
249 | for (rlv_detach_map_t::const_iterator itAttachPt = m_Attachments.begin(); itAttachPt != m_Attachments.end(); ++itAttachPt) | 245 | for (rlv_attachlock_map_t::const_iterator itAttachPt = m_AttachRem.begin(); itAttachPt != m_AttachRem.end(); ++itAttachPt) |
250 | { | 246 | { |
251 | pAttachPt = get_if_there(pAvatar->mAttachmentPoints, (S32)itAttachPt->first, (LLViewerJointAttachment*)NULL); | 247 | pAttachPt = get_if_there(pAvatar->mAttachmentPoints, (S32)itAttachPt->first, (LLViewerJointAttachment*)NULL); |
252 | if ( (pAttachPt) && (pAttachPt->getIsHUDAttachment()) ) | 248 | if ( (pAttachPt) && (pAttachPt->getIsHUDAttachment()) ) |
@@ -255,61 +251,94 @@ bool RlvHandler::hasLockedHUD() const | |||
255 | return false; // None of our locked attachments is a HUD | 251 | return false; // None of our locked attachments is a HUD |
256 | } | 252 | } |
257 | 253 | ||
258 | bool RlvHandler::isDetachable(const LLInventoryItem* pItem) const | 254 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
255 | bool RlvHandler::isLockedAttachment(const LLInventoryItem* pItem, ERlvLockMask eLock) const | ||
259 | { | 256 | { |
260 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | 257 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); |
261 | return ( (pItem) && (pAvatar) ) ? isDetachable(pAvatar->getWornAttachment(pItem->getUUID())) : true; | 258 | return (pItem) && (pAvatar) && (isLockedAttachment(pAvatar->getWornAttachment(pItem->getUUID()), eLock)); |
262 | } | 259 | } |
263 | 260 | ||
264 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h | 261 | // Checked: 2009-10-13 (RLVa-1.0.5b) | Added: RLVa-1.0.5b |
265 | bool RlvHandler::isDetachableExcept(S32 idxAttachPt, LLViewerObject *pObj) const | 262 | bool RlvHandler::isLockedAttachmentExcept(S32 idxAttachPt, ERlvLockMask eLock, LLViewerObject *pObj) const |
266 | { | 263 | { |
267 | // Loop over every object that marked the specific attachment point undetachable (but ignore pObj and any of its children) | 264 | // Loop over every object that marked the specific attachment point eLock type locked (but ignore pObj and any of its children) |
268 | for (rlv_detach_map_t::const_iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | 265 | LLViewerObject* pTempObj; |
269 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | 266 | if (eLock & RLV_LOCK_REMOVE) |
270 | { | 267 | { |
271 | LLViewerObject* pTempObj = gObjectList.findObject(itAttach->second); | 268 | for (rlv_attachlock_map_t::const_iterator itAttach = m_AttachRem.lower_bound(idxAttachPt), |
272 | if ( (!pTempObj) || (pTempObj->getRootEdit()->getID() != pObj->getID()) ) | 269 | endAttach = m_AttachRem.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) |
273 | return false; | 270 | { |
271 | if ( ((pTempObj = gObjectList.findObject(itAttach->second)) == NULL) || (pTempObj->getRootEdit()->getID() != pObj->getID()) ) | ||
272 | return true; | ||
273 | } | ||
274 | } | 274 | } |
275 | return true; | 275 | if (eLock & RLV_LOCK_ADD) |
276 | { | ||
277 | for (rlv_attachlock_map_t::const_iterator itAttach = m_AttachAdd.lower_bound(idxAttachPt), | ||
278 | endAttach = m_AttachAdd.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | ||
279 | { | ||
280 | if ( ((pTempObj = gObjectList.findObject(itAttach->second)) == NULL) || (pTempObj->getRootEdit()->getID() != pObj->getID()) ) | ||
281 | return true; | ||
282 | } | ||
283 | } | ||
284 | return false; | ||
276 | } | 285 | } |
277 | 286 | ||
278 | // Checked: 2009-09-06 (RLVa-1.0.2b) | Modified: RLVa-1.0.2b | 287 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
279 | bool RlvHandler::setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDetachable) | 288 | void RlvHandler::addAttachmentLock(S32 idxAttachPt, const LLUUID &idRlvObj, ERlvLockMask eLock) |
280 | { | 289 | { |
281 | // Sanity check - make sure it's an object we know about | 290 | // Sanity check - make sure it's an object we know about |
282 | rlv_object_map_t::const_iterator itObj = m_Objects.find(idRlvObj); | 291 | if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) |
283 | if ( (itObj == m_Objects.end()) || (!idxAttachPt) ) | 292 | return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) |
284 | return false; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) | ||
285 | 293 | ||
286 | if (!fDetachable) | 294 | // NOTE: m_AttachXXX can contain duplicate <idxAttachPt, idRlvObj> pairs (ie @detach:spine=n,detach=n from an attachment on spine) |
295 | if (eLock & RLV_LOCK_REMOVE) | ||
287 | { | 296 | { |
288 | #ifdef RLV_EXPERIMENTAL_FIRSTUSE | 297 | #ifdef RLV_EXPERIMENTAL_FIRSTUSE |
289 | //LLFirstUse::useRlvDetach(); | 298 | //LLFirstUse::useRlvDetach(); |
290 | #endif // RLV_EXPERIMENTAL_FIRSTUSE | 299 | #endif // RLV_EXPERIMENTAL_FIRSTUSE |
291 | 300 | ||
292 | // NOTE: m_Attachments can contain duplicate <idxAttachPt, idRlvObj> pairs (ie @detach:spine=n,detach=n from an attachment on spine) | 301 | m_AttachRem.insert(std::pair<S32, LLUUID>(idxAttachPt, idRlvObj)); |
293 | m_Attachments.insert(std::pair<S32, LLUUID>(idxAttachPt, itObj->second.m_UUID)); | ||
294 | return true; | ||
295 | } | 302 | } |
296 | else | 303 | if (eLock & RLV_LOCK_ADD) |
297 | { | 304 | { |
298 | for (rlv_detach_map_t::iterator itAttach = m_Attachments.lower_bound(idxAttachPt), | 305 | m_AttachAdd.insert(std::pair<S32, LLUUID>(idxAttachPt, idRlvObj)); |
299 | endAttach = m_Attachments.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | 306 | } |
307 | } | ||
308 | |||
309 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
310 | void RlvHandler::removeAttachmentLock(S32 idxAttachPt, const LLUUID &idRlvObj, ERlvLockMask eLock) | ||
311 | { | ||
312 | // Sanity check - make sure it's an object we know about | ||
313 | if ( (m_Objects.find(idRlvObj) == m_Objects.end()) || (!idxAttachPt) ) | ||
314 | return; // If (idxAttachPt) == 0 then: (pObj == NULL) || (pObj->isAttachment() == FALSE) | ||
315 | |||
316 | if (eLock & RLV_LOCK_REMOVE) | ||
317 | { | ||
318 | for (rlv_attachlock_map_t::iterator itAttach = m_AttachRem.lower_bound(idxAttachPt), | ||
319 | endAttach = m_AttachRem.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | ||
300 | { | 320 | { |
301 | if (itObj->second.m_UUID == itAttach->second) | 321 | if (idRlvObj == itAttach->second) |
302 | { | 322 | { |
303 | m_Attachments.erase(itAttach); | 323 | m_AttachRem.erase(itAttach); |
304 | return true; | 324 | break; |
325 | } | ||
326 | } | ||
327 | } | ||
328 | if (eLock & RLV_LOCK_ADD) | ||
329 | { | ||
330 | for (rlv_attachlock_map_t::iterator itAttach = m_AttachAdd.lower_bound(idxAttachPt), | ||
331 | endAttach = m_AttachAdd.upper_bound(idxAttachPt); itAttach != endAttach; ++itAttach) | ||
332 | { | ||
333 | if (idRlvObj == itAttach->second) | ||
334 | { | ||
335 | m_AttachAdd.erase(itAttach); | ||
336 | break; | ||
305 | } | 337 | } |
306 | } | 338 | } |
307 | } | 339 | } |
308 | return false; // Fall-through for (fDetachable == TRUE) - if the object wasn't undetachable then we consider it a failure | ||
309 | } | 340 | } |
310 | 341 | ||
311 | |||
312 | |||
313 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP | 342 | #ifdef RLV_EXTENSION_FLAG_NOSTRIP |
314 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | 343 | // Checked: 2009-05-26 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d |
315 | bool RlvHandler::isStrippable(const LLUUID& idItem) const | 344 | bool RlvHandler::isStrippable(const LLUUID& idItem) const |
@@ -413,10 +442,10 @@ void RlvHandler::notifyBehaviourObservers(const RlvCommand& rlvCmd, bool fIntern | |||
413 | } | 442 | } |
414 | 443 | ||
415 | // Checked: | 444 | // Checked: |
416 | BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, bool fFromObj) | 445 | BOOL RlvHandler::processCommand(const LLUUID& idObj, const std::string& strCmd, bool fFromObj) |
417 | { | 446 | { |
418 | #ifdef RLV_DEBUG | 447 | #ifdef RLV_DEBUG |
419 | RLV_INFOS << "[" << uuid << "]: " << strCmd << LL_ENDL; | 448 | RLV_INFOS << "[" << idObj << "]: " << strCmd << LL_ENDL; |
420 | #endif // RLV_DEBUG | 449 | #endif // RLV_DEBUG |
421 | 450 | ||
422 | RlvCommand rlvCmd(strCmd); | 451 | RlvCommand rlvCmd(strCmd); |
@@ -427,7 +456,10 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
427 | #endif // RLV_DEBUG | 456 | #endif // RLV_DEBUG |
428 | return FALSE; | 457 | return FALSE; |
429 | } | 458 | } |
430 | m_pCurCommand = &rlvCmd; m_idCurObject = uuid; | 459 | |
460 | // NOTE: if we pass RlvObject::m_UUID for idObj somewhere and process a @clear then it will point to invalid/cleared memory at the end | ||
461 | // so make sure to *always* pass our private copy to other functions | ||
462 | m_pCurCommand = &rlvCmd; m_idCurObject = idObj; | ||
431 | 463 | ||
432 | BOOL fRet = FALSE; | 464 | BOOL fRet = FALSE; |
433 | switch (rlvCmd.getParamType()) | 465 | switch (rlvCmd.getParamType()) |
@@ -444,7 +476,7 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
444 | break; | 476 | break; |
445 | } | 477 | } |
446 | 478 | ||
447 | rlv_object_map_t::iterator itObj = m_Objects.find(uuid); | 479 | rlv_object_map_t::iterator itObj = m_Objects.find(m_idCurObject); |
448 | if (itObj != m_Objects.end()) | 480 | if (itObj != m_Objects.end()) |
449 | { | 481 | { |
450 | RlvObject& rlvObj = itObj->second; | 482 | RlvObject& rlvObj = itObj->second; |
@@ -452,9 +484,9 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
452 | } | 484 | } |
453 | else | 485 | else |
454 | { | 486 | { |
455 | RlvObject rlvObj(uuid); | 487 | RlvObject rlvObj(m_idCurObject); |
456 | fRet = rlvObj.addCommand(rlvCmd); | 488 | fRet = rlvObj.addCommand(rlvCmd); |
457 | m_Objects.insert(std::pair<LLUUID, RlvObject>(uuid, rlvObj)); | 489 | m_Objects.insert(std::pair<LLUUID, RlvObject>(m_idCurObject, rlvObj)); |
458 | } | 490 | } |
459 | 491 | ||
460 | #ifdef RLV_DEBUG | 492 | #ifdef RLV_DEBUG |
@@ -464,14 +496,14 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
464 | if (fRet) { // If FALSE then this was a duplicate, there's no need to handle those | 496 | if (fRet) { // If FALSE then this was a duplicate, there's no need to handle those |
465 | if (!m_pGCTimer) | 497 | if (!m_pGCTimer) |
466 | m_pGCTimer = new RlvGCTimer(); | 498 | m_pGCTimer = new RlvGCTimer(); |
467 | processAddCommand(uuid, rlvCmd); | 499 | processAddCommand(m_idCurObject, rlvCmd); |
468 | notifyBehaviourObservers(rlvCmd, !fFromObj); | 500 | notifyBehaviourObservers(rlvCmd, !fFromObj); |
469 | } | 501 | } |
470 | } | 502 | } |
471 | break; | 503 | break; |
472 | case RLV_TYPE_REMOVE: // Checked: | 504 | case RLV_TYPE_REMOVE: // Checked: |
473 | { | 505 | { |
474 | rlv_object_map_t::iterator itObj = m_Objects.find(uuid); | 506 | rlv_object_map_t::iterator itObj = m_Objects.find(m_idCurObject); |
475 | if (itObj != m_Objects.end()) | 507 | if (itObj != m_Objects.end()) |
476 | fRet = itObj->second.removeCommand(rlvCmd); | 508 | fRet = itObj->second.removeCommand(rlvCmd); |
477 | 509 | ||
@@ -481,13 +513,13 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
481 | #endif // RLV_DEBUG | 513 | #endif // RLV_DEBUG |
482 | 514 | ||
483 | if (fRet) { // Don't handle non-sensical removes | 515 | if (fRet) { // Don't handle non-sensical removes |
484 | processRemoveCommand(uuid, rlvCmd); | 516 | processRemoveCommand(m_idCurObject, rlvCmd); |
485 | notifyBehaviourObservers(rlvCmd, !fFromObj); | 517 | notifyBehaviourObservers(rlvCmd, !fFromObj); |
486 | 518 | ||
487 | if (0 == itObj->second.m_Commands.size()) | 519 | if (0 == itObj->second.m_Commands.size()) |
488 | { | 520 | { |
489 | #ifdef RLV_DEBUG | 521 | #ifdef RLV_DEBUG |
490 | RLV_INFOS << "\t- command list empty => removing " << uuid << LL_ENDL; | 522 | RLV_INFOS << "\t- command list empty => removing " << m_idCurObject << LL_ENDL; |
491 | #endif // RLV_DEBUG | 523 | #endif // RLV_DEBUG |
492 | m_Objects.erase(itObj); | 524 | m_Objects.erase(itObj); |
493 | } | 525 | } |
@@ -495,14 +527,14 @@ BOOL RlvHandler::processCommand(const LLUUID& uuid, const std::string& strCmd, b | |||
495 | } | 527 | } |
496 | break; | 528 | break; |
497 | case RLV_TYPE_CLEAR: | 529 | case RLV_TYPE_CLEAR: |
498 | fRet = processClearCommand(uuid, rlvCmd); | 530 | fRet = processClearCommand(m_idCurObject, rlvCmd); |
499 | notifyBehaviourObservers(rlvCmd, !fFromObj); | 531 | notifyBehaviourObservers(rlvCmd, !fFromObj); |
500 | break; | 532 | break; |
501 | case RLV_TYPE_FORCE: // Checked: | 533 | case RLV_TYPE_FORCE: // Checked: |
502 | fRet = processForceCommand(uuid, rlvCmd); | 534 | fRet = processForceCommand(m_idCurObject, rlvCmd); |
503 | break; | 535 | break; |
504 | case RLV_TYPE_REPLY: // Checked: | 536 | case RLV_TYPE_REPLY: // Checked: |
505 | fRet = processReplyCommand(uuid, rlvCmd); | 537 | fRet = processReplyCommand(m_idCurObject, rlvCmd); |
506 | break; | 538 | break; |
507 | case RLV_TYPE_UNKNOWN: // Checked: | 539 | case RLV_TYPE_UNKNOWN: // Checked: |
508 | break; | 540 | break; |
@@ -535,35 +567,15 @@ BOOL RlvHandler::processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) | |||
535 | m_Behaviours[eBehaviour]++; | 567 | m_Behaviours[eBehaviour]++; |
536 | } | 568 | } |
537 | 569 | ||
570 | bool fRefCount = false; // Unused for the moment | ||
538 | switch (eBehaviour) | 571 | switch (eBehaviour) |
539 | { | 572 | { |
540 | case RLV_BHVR_DETACH: // @detach[:<option>]=n - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | 573 | case RLV_BHVR_DETACH: // @detach[:<option>]=n - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
541 | { | 574 | onAddRemDetach(uuid, rlvCmd, fRefCount); |
542 | LLViewerObject* pObj = NULL; S32 idxAttachPt = 0; | 575 | break; |
543 | if (strOption.empty()) // @detach=n | 576 | case RLV_BHVR_ADDATTACH: // @addattach[:<option>]=n - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
544 | { | 577 | case RLV_BHVR_REMATTACH: // @addattach[:<option>]=n - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
545 | // If the object rezzed before we received @detach=n from it then we can just do our thing here | 578 | onAddRemAttach(uuid, rlvCmd, fRefCount); |
546 | // If the object hasn't rezzed yet then we need to wait until RlvHandler::onAttach() | ||
547 | // If @detach=n were possible for non-attachments another copy/paste would be needed in RlvHandler::onGC() | ||
548 | if ((pObj = gObjectList.findObject(uuid)) != NULL) | ||
549 | setDetachable(pObj, uuid, false); | ||
550 | } | ||
551 | else if ((idxAttachPt = getAttachPointIndex(strOption, true)) != 0) // @detach:<attachpt>=n | ||
552 | { | ||
553 | setDetachable(idxAttachPt, uuid, false); | ||
554 | |||
555 | // (See below) | ||
556 | LLViewerJointAttachment* pAttachPt = getAttachPoint(strOption, true); | ||
557 | if (pAttachPt) | ||
558 | pObj = pAttachPt->getObject(); | ||
559 | } | ||
560 | |||
561 | // When at least one HUD attachment is locked we want to make sure they're all visible (ie prevent hiding a blindfold HUD) | ||
562 | // However, since @detach:<attachpt>=n might lock a HUD attachment point that doesn't currently have an object we | ||
563 | // have to do this here *and* in RlvHandler::onAttach() | ||
564 | if ( (pObj) && (pObj->isHUDAttachment()) ) | ||
565 | LLPipeline::sShowHUDAttachments = TRUE; | ||
566 | } | ||
567 | break; | 579 | break; |
568 | case RLV_BHVR_REDIRCHAT: // @redirchat:<option>=n - Checked: 2009-07-07 (RLVa-1.0.0d) | 580 | case RLV_BHVR_REDIRCHAT: // @redirchat:<option>=n - Checked: 2009-07-07 (RLVa-1.0.0d) |
569 | case RLV_BHVR_REDIREMOTE: // @rediremote:<option>=n - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.2a | 581 | case RLV_BHVR_REDIREMOTE: // @rediremote:<option>=n - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.2a |
@@ -797,25 +809,15 @@ BOOL RlvHandler::processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvC | |||
797 | m_Behaviours[eBehaviour]--; | 809 | m_Behaviours[eBehaviour]--; |
798 | } | 810 | } |
799 | 811 | ||
812 | bool fRefCount = false; // Unused for the moment | ||
800 | switch (eBehaviour) | 813 | switch (eBehaviour) |
801 | { | 814 | { |
802 | case RLV_BHVR_DETACH: // @detach[:<option>]=y - Checked: 2009-08-04 (RLVa-1.0.1d) | Modified: RLVa-1.0.1d | 815 | case RLV_BHVR_DETACH: // @detach[:<option>]=y - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
803 | { | 816 | onAddRemDetach(uuid, rlvCmd, fRefCount); |
804 | S32 idxAttachPt = 0; | 817 | break; |
805 | if (strOption.empty()) // @detach=y | 818 | case RLV_BHVR_ADDATTACH: // @addattach[:<option>]=y - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
806 | { | 819 | case RLV_BHVR_REMATTACH: // @addattach[:<option>]=y - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
807 | // The object may or may not (if it got detached) still exist | 820 | onAddRemAttach(uuid, rlvCmd, fRefCount); |
808 | rlv_object_map_t::const_iterator itObj = m_Objects.find(uuid); | ||
809 | if (itObj != m_Objects.end()) | ||
810 | idxAttachPt = itObj->second.m_idxAttachPt; | ||
811 | if (idxAttachPt) | ||
812 | setDetachable(idxAttachPt, uuid, true); | ||
813 | } | ||
814 | else if ((idxAttachPt = getAttachPointIndex(strOption, true))) // @detach:<attachpt>=y | ||
815 | { | ||
816 | setDetachable(idxAttachPt, uuid, true); | ||
817 | } | ||
818 | } | ||
819 | break; | 821 | break; |
820 | case RLV_BHVR_REDIRCHAT: // @redirchat:<option>=y - Checked: 2009-07-07 (RLVa-1.0.0d) | 822 | case RLV_BHVR_REDIRCHAT: // @redirchat:<option>=y - Checked: 2009-07-07 (RLVa-1.0.0d) |
821 | case RLV_BHVR_REDIREMOTE: // @rediremote:<option>=y - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.2a | 823 | case RLV_BHVR_REDIREMOTE: // @rediremote:<option>=y - Checked: 2009-07-07 (RLVa-1.0.0d) | Added: RLVa-0.2.2a |
@@ -940,7 +942,7 @@ BOOL RlvHandler::processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvC | |||
940 | return TRUE; // Remove commands don't fail, doesn't matter what we return here | 942 | return TRUE; // Remove commands don't fail, doesn't matter what we return here |
941 | } | 943 | } |
942 | 944 | ||
943 | BOOL RlvHandler::processClearCommand(const LLUUID& idObj, const RlvCommand& rlvCmd) | 945 | BOOL RlvHandler::processClearCommand(const LLUUID idObj, const RlvCommand& rlvCmd) |
944 | { | 946 | { |
945 | const std::string& strFilter = rlvCmd.getParam(); std::string strCmdRem; | 947 | const std::string& strFilter = rlvCmd.getParam(); std::string strCmdRem; |
946 | 948 | ||
@@ -976,8 +978,11 @@ BOOL RlvHandler::processForceCommand(const LLUUID& idObj, const RlvCommand& rlvC | |||
976 | 978 | ||
977 | switch (rlvCmd.getBehaviourType()) | 979 | switch (rlvCmd.getBehaviourType()) |
978 | { | 980 | { |
979 | case RLV_BHVR_DETACH: // @detach[:<option>]=force - Checked: | 981 | case RLV_BHVR_DETACH: // @detach[:<option>]=force - Checked: 2009-10-12 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
980 | onForceDetach(idObj, strOption); | 982 | onForceDetach(idObj, rlvCmd); |
983 | break; | ||
984 | case RLV_BHVR_REMATTACH: // @remattach[:<option>]=force - Checked: 2009-10-12 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | ||
985 | onForceRemAttach(idObj, rlvCmd); | ||
981 | break; | 986 | break; |
982 | case RLV_BHVR_REMOUTFIT: // @remoutfit:<option>=force - Checked: | 987 | case RLV_BHVR_REMOUTFIT: // @remoutfit:<option>=force - Checked: |
983 | onForceRemOutfit(idObj, strOption); | 988 | onForceRemOutfit(idObj, strOption); |
@@ -1125,7 +1130,7 @@ BOOL RlvHandler::processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCm | |||
1125 | #endif // RLV_EXPERIMENTAL_COMPOSITE_FOLDING | 1130 | #endif // RLV_EXPERIMENTAL_COMPOSITE_FOLDING |
1126 | } | 1131 | } |
1127 | break; | 1132 | break; |
1128 | case RLV_BHVR_GETATTACH: // @getattach[:<layer>]=<channel> - Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | 1133 | case RLV_BHVR_GETATTACH: // @getattach[:<layer>]=<channel> - Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
1129 | { | 1134 | { |
1130 | // If we're fetching all worn attachments then the reply should start with 0 | 1135 | // If we're fetching all worn attachments then the reply should start with 0 |
1131 | if (strOption.empty()) | 1136 | if (strOption.empty()) |
@@ -1155,9 +1160,9 @@ BOOL RlvHandler::processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCm | |||
1155 | { | 1160 | { |
1156 | bool fWorn = (pAttachment->getItemID().notNull()) && | 1161 | bool fWorn = (pAttachment->getItemID().notNull()) && |
1157 | ( (!RlvSettings::getHideLockedAttach()) || | 1162 | ( (!RlvSettings::getHideLockedAttach()) || |
1158 | ( (isDetachable(itAttach->first)) && (isStrippable(pAttachment->getItemID())) ) ); | 1163 | ( (!isLockedAttachmentExcept(itAttach->first, RLV_LOCK_REMOVE, gObjectList.findObject(uuid))) && |
1164 | (isStrippable(pAttachment->getItemID())) ) ); | ||
1159 | strReply.push_back( (fWorn) ? '1' : '0' ); | 1165 | strReply.push_back( (fWorn) ? '1' : '0' ); |
1160 | //strReply.push_back( (pAttachment->getItemID().notNull()) ? '1' : '0' ); | ||
1161 | } | 1166 | } |
1162 | #endif // RLV_EXPERIMENTAL_COMPOSITE_FOLDING | 1167 | #endif // RLV_EXPERIMENTAL_COMPOSITE_FOLDING |
1163 | } | 1168 | } |
@@ -1327,7 +1332,7 @@ void RlvHandler::initLookupTables() | |||
1327 | } | 1332 | } |
1328 | 1333 | ||
1329 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Modified: RLVa-1.0.1h | 1334 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Modified: RLVa-1.0.1h |
1330 | void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | 1335 | void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt) |
1331 | { | 1336 | { |
1332 | // Sanity check - LLVOAvatar::attachObject() should call us *after* calling LLViewerJointAttachment::addObject() | 1337 | // Sanity check - LLVOAvatar::attachObject() should call us *after* calling LLViewerJointAttachment::addObject() |
1333 | LLViewerObject* pObj = pAttachPt->getObject(); | 1338 | LLViewerObject* pObj = pAttachPt->getObject(); |
@@ -1338,30 +1343,8 @@ void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | |||
1338 | return; | 1343 | return; |
1339 | } | 1344 | } |
1340 | 1345 | ||
1341 | // Check if this attachment point has a pending "reattach-on-detach" | 1346 | // Let the attachment manager know |
1342 | rlv_reattach_map_t::iterator itReattach = m_AttachPending.find(idxAttachPt); | 1347 | m_pAttachMgr->onAttach(pAttachPt); |
1343 | if (itReattach != m_AttachPending.end()) | ||
1344 | { | ||
1345 | if (itReattach->second == pAttachPt->getItemID()) | ||
1346 | { | ||
1347 | RLV_INFOS << "Reattached " << pAttachPt->getItemID().asString() << " to " << idxAttachPt << LL_ENDL; | ||
1348 | m_AttachPending.erase(itReattach); | ||
1349 | } | ||
1350 | } | ||
1351 | else if ( (fFullyLoaded) && (!isDetachableExcept(idxAttachPt, pObj)) ) | ||
1352 | { | ||
1353 | // We're fully loaded with no pending reattach on this attach point but it's "undetachable" -> force detach the new attachment | ||
1354 | |||
1355 | // Assertion: the only way the attachment point could be locked at this point is if some object locked it with @detach:attachpt=n | ||
1356 | // - previous attachments on this attachment point might have issued @detach=n but those were all cleaned up at detach | ||
1357 | // - the new attachment might have issued @detach=n but that won't actually lock down the attachment point until further down | ||
1358 | // NOTE 1: "some object" may no longer exist if it was not an attachment and the GC hasn't cleaned it up yet (informative) | ||
1359 | // NOTE 2: "some object" may refer to the new attachment - ie @detach:spine=n from object on spine (problematic, causes reattach) | ||
1360 | // -> solved by using isDetachableExcept(idxAttachPt, pObj) instead of isDetachable(idxAttachPt) | ||
1361 | |||
1362 | m_DetachPending.insert(std::pair<S32, LLUUID>(idxAttachPt, pObj->getID())); | ||
1363 | rlvForceDetach(pAttachPt); | ||
1364 | } | ||
1365 | 1348 | ||
1366 | // Check if we already have an RlvObject instance for this object (rezzed prim attached from in-world, or an attachment that rezzed in) | 1349 | // Check if we already have an RlvObject instance for this object (rezzed prim attached from in-world, or an attachment that rezzed in) |
1367 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); | 1350 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); |
@@ -1378,7 +1361,7 @@ void RlvHandler::onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded) | |||
1378 | if (itObj->second.hasBehaviour(RLV_BHVR_DETACH, false)) | 1361 | if (itObj->second.hasBehaviour(RLV_BHVR_DETACH, false)) |
1379 | { | 1362 | { |
1380 | // (Copy/paste from processAddCommand) | 1363 | // (Copy/paste from processAddCommand) |
1381 | setDetachable(idxAttachPt, pObj->getID(), false); | 1364 | addAttachmentLock(idxAttachPt, itObj->second.m_UUID, RLV_LOCK_REMOVE); |
1382 | 1365 | ||
1383 | if (pObj->isHUDAttachment()) | 1366 | if (pObj->isHUDAttachment()) |
1384 | LLPipeline::sShowHUDAttachments = TRUE; // Prevents hiding of locked HUD attachments | 1367 | LLPipeline::sShowHUDAttachments = TRUE; // Prevents hiding of locked HUD attachments |
@@ -1469,44 +1452,19 @@ void RlvHandler::onDetach(LLViewerJointAttachment* pAttachPt) | |||
1469 | //RLV_INFOS << "Clean up for '" << pDbgAttachmentPt->getName() << "'" << LL_ENDL; | 1452 | //RLV_INFOS << "Clean up for '" << pDbgAttachmentPt->getName() << "'" << LL_ENDL; |
1470 | #endif // RLV_DEBUG | 1453 | #endif // RLV_DEBUG |
1471 | 1454 | ||
1472 | // If the attachment was locked then we should reattach it (unless we're already trying to reattach to this attachment point) | 1455 | // Let the attachment manager know |
1473 | // (unless we forcefully detached it else in which case we do not want to reattach it) | 1456 | m_pAttachMgr->onDetach(pAttachPt); |
1474 | rlv_reattach_map_t::iterator itDetach = m_DetachPending.find(idxAttachPt); | ||
1475 | if (itDetach != m_DetachPending.end()) | ||
1476 | { | ||
1477 | // RLVa-TODO: we should really be comparing item UUIDs but is it even possible to end up here and not have them match? | ||
1478 | m_DetachPending.erase(itDetach); | ||
1479 | } | ||
1480 | else if ( (!isDetachable(idxAttachPt)) && (m_AttachPending.find(idxAttachPt) == m_AttachPending.end()) ) | ||
1481 | { | ||
1482 | // In an ideal world we would simply set up an LLInventoryObserver but there's no specific "asset updated" changed flag *sighs* | ||
1483 | // NOTE: attachments *always* know their "inventory item UUID" so we don't have to worry about fetched vs unfetched inventory | ||
1484 | m_AttachPending.insert(std::pair<S32, LLUUID>(idxAttachPt, pAttachPt->getItemID())); | ||
1485 | } | ||
1486 | 1457 | ||
1487 | // We can't - easily - clean up child prims that never issued @detach=n but the GC will get those eventually | 1458 | // Clean up any restriction this object (or one of its child prims) may have |
1488 | rlv_detach_map_t::iterator itAttach = m_Attachments.find(idxAttachPt); | 1459 | rlv_object_map_t::iterator itObj = m_Objects.begin(), itCurrent; |
1489 | while ( (itAttach != m_Attachments.upper_bound(idxAttachPt)) && (itAttach != m_Attachments.end()) ) | 1460 | while (itObj != m_Objects.end()) |
1490 | { | 1461 | { |
1491 | LLViewerObject* pTempObj = gObjectList.findObject(itAttach->second); | 1462 | itCurrent = itObj++; // @clear will invalidate our iterator so point it ahead now |
1492 | if ( (pTempObj) && (pTempObj->getRootEdit()->getID() == pObj->getID()) ) | ||
1493 | { | ||
1494 | // Iterator points to the object (or to a child prim) so issue a clear on behalf of the object (there's the | ||
1495 | // possibility of going into an eternal loop, but that's ok since it indicates a bug in @clear that needs fixing) | ||
1496 | processCommand(itAttach->second, "clear", true); | ||
1497 | 1463 | ||
1498 | itAttach = m_Attachments.find(idxAttachPt); // @clear will invalidate all iterators so we have to start anew | 1464 | // NOTE: ObjectKill seems to happen in reverse (child prims are killed before the root is) so we can't use gObjectList here |
1499 | } | 1465 | if (itCurrent->second.m_idxAttachPt == idxAttachPt) |
1500 | else | 1466 | processCommand(itCurrent->second.m_UUID, "clear", true); |
1501 | { | ||
1502 | itAttach++; | ||
1503 | } | ||
1504 | } | 1467 | } |
1505 | |||
1506 | // Clean up in case there was never a @detach=n (only works for the root prim - see above) | ||
1507 | rlv_object_map_t::iterator itObj = m_Objects.find(pObj->getID()); | ||
1508 | if (itObj != m_Objects.end()) | ||
1509 | processCommand(itObj->second.m_UUID, "clear", true); | ||
1510 | } | 1468 | } |
1511 | 1469 | ||
1512 | // Checked: 2009-07-30 (RLVa-1.0.1c) | Modified: RLVa-1.0.1c | 1470 | // Checked: 2009-07-30 (RLVa-1.0.1c) | Modified: RLVa-1.0.1c |
@@ -1548,32 +1506,6 @@ bool RlvHandler::onGC() | |||
1548 | return (0 != m_Objects.size()); // GC will kill itself if it has nothing to do | 1506 | return (0 != m_Objects.size()); // GC will kill itself if it has nothing to do |
1549 | } | 1507 | } |
1550 | 1508 | ||
1551 | // Checked: 2009-08-08 (RLVa-1.0.1g) | Modified: RLVa-1.0.1g | ||
1552 | void RlvHandler::onSavedAssetIntoInventory(const LLUUID& idItem) | ||
1553 | { | ||
1554 | for (rlv_reattach_map_t::iterator itAttach = m_AttachPending.begin(); itAttach != m_AttachPending.end(); ++itAttach) | ||
1555 | { | ||
1556 | if (idItem == itAttach->second) | ||
1557 | { | ||
1558 | RLV_INFOS << "Reattaching " << idItem.asString() << " to " << itAttach->first << LL_ENDL; | ||
1559 | |||
1560 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
1561 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction; | ||
1562 | rez_action->mItemID = itAttach->second; | ||
1563 | rez_action->mAttachPt = itAttach->first; | ||
1564 | |||
1565 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); // (Will call delete on rez_action) | ||
1566 | #else // Version: 1.23.4 | ||
1567 | LLSD payload; | ||
1568 | payload["item_id"] = itAttach->second; | ||
1569 | payload["attachment_point"] = itAttach->first; | ||
1570 | |||
1571 | LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); | ||
1572 | #endif | ||
1573 | } | ||
1574 | } | ||
1575 | } | ||
1576 | |||
1577 | // ============================================================================ | 1509 | // ============================================================================ |
1578 | // String/chat censoring functions | 1510 | // String/chat censoring functions |
1579 | // | 1511 | // |
@@ -2099,47 +2031,6 @@ std::string RlvHandler::getSharedPath(const LLViewerInventoryCategory* pFolder) | |||
2099 | // | 2031 | // |
2100 | 2032 | ||
2101 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | 2033 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d |
2102 | void RlvHandler::onForceDetach(const LLUUID& idObj, const std::string& strOption) const | ||
2103 | { | ||
2104 | U16 nParam; | ||
2105 | if (strOption.empty()) | ||
2106 | { | ||
2107 | // Simulate right-click / Take Off > Detach All | ||
2108 | LLAgent::userRemoveAllAttachments(NULL); | ||
2109 | } | ||
2110 | else if (m_AttachLookup.getExactMatchParam(strOption, nParam)) | ||
2111 | { | ||
2112 | // Simulate right-click / Take Off > Detach > ... | ||
2113 | LLVOAvatar* pAvatar; LLViewerJointAttachment* pAttachmentPt; | ||
2114 | if ( ((pAvatar = gAgent.getAvatarObject()) != NULL) && // Make sure we're actually wearing something on the attachment point | ||
2115 | ((pAttachmentPt = get_if_there(pAvatar->mAttachmentPoints, (S32)nParam, (LLViewerJointAttachment*)NULL)) != NULL) && | ||
2116 | (isStrippable(pAttachmentPt->getItemID())) ) // ... and that it's not marked as "nostrip" | ||
2117 | { | ||
2118 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
2119 | // If we're stripping something that's part of a composite folder then we should @detachthis instead | ||
2120 | if (isCompositeDescendent(pAttachmentPt->getItemID())) | ||
2121 | { | ||
2122 | std::string strCmd = "detachthis:" + strOption + "=force"; | ||
2123 | #ifdef RLV_DEBUG | ||
2124 | RLV_INFOS << "\t- '" << strOption << "' belongs to composite folder: @" << strCmd << LL_ENDL; | ||
2125 | #endif // RLV_DEBUG | ||
2126 | processForceCommand(idObj, RlvCommand(strCmd)); | ||
2127 | } | ||
2128 | else | ||
2129 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
2130 | { | ||
2131 | handle_detach_from_avatar(pAttachmentPt); | ||
2132 | } | ||
2133 | } | ||
2134 | } | ||
2135 | else | ||
2136 | { | ||
2137 | // Force detach single folder | ||
2138 | onForceWear(strOption, false, false); | ||
2139 | } | ||
2140 | } | ||
2141 | |||
2142 | // Checked: 2009-07-12 (RLVa-1.0.0h) | Modified: RLVa-0.2.0d | ||
2143 | void RlvHandler::onForceRemOutfit(const LLUUID& idObj, const std::string& strOption) const | 2034 | void RlvHandler::onForceRemOutfit(const LLUUID& idObj, const std::string& strOption) const |
2144 | { | 2035 | { |
2145 | EWearableType typeOption = LLWearable::typeNameToType(strOption), type; | 2036 | EWearableType typeOption = LLWearable::typeNameToType(strOption), type; |
@@ -2209,6 +2100,7 @@ bool RlvHandler::onForceSit(const LLUUID& idObj, const std::string& strOption) c | |||
2209 | return true; | 2100 | return true; |
2210 | } | 2101 | } |
2211 | 2102 | ||
2103 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | ||
2212 | void RlvHandler::onForceWear(const std::string& strPath, bool fAttach, bool fMatchAll) const | 2104 | void RlvHandler::onForceWear(const std::string& strPath, bool fAttach, bool fMatchAll) const |
2213 | { | 2105 | { |
2214 | // See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items | 2106 | // See LLWearableBridge::wearOnAvatar(): don't wear anything until initial wearables are loaded, can destroy clothing items |
@@ -2281,22 +2173,11 @@ void RlvHandler::onForceWear(const std::string& strPath, bool fAttach, bool fMat | |||
2281 | // Simulate wearing an object to a specific attachment point (copy/paste to suppress replacement dialog) | 2173 | // Simulate wearing an object to a specific attachment point (copy/paste to suppress replacement dialog) |
2282 | // LLAttachObject::handleEvent() => rez_attachment() | 2174 | // LLAttachObject::handleEvent() => rez_attachment() |
2283 | LLViewerJointAttachment* pAttachPt = getAttachPoint(pItem, true); | 2175 | LLViewerJointAttachment* pAttachPt = getAttachPoint(pItem, true); |
2284 | if ( (pAttachPt) && (isDetachable(pAttachPt)) ) | 2176 | if ( (pAttachPt) && // Need a specific attach pt that |
2177 | ( (!isLockedAttachment(pAttachPt->getObject(), RLV_LOCK_REMOVE)) && // doesn't have locked object | ||
2178 | (!isLockedAttachment(pAttachPt, RLV_LOCK_ADD)) ) ) // and that can be attached to | ||
2285 | { | 2179 | { |
2286 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | 2180 | RlvAttachmentManager::forceAttach(pItem->getUUID(), getAttachPointIndex(pAttachPt->getName(), true)); |
2287 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction; | ||
2288 | rez_action->mItemID = pItem->getUUID(); | ||
2289 | rez_action->mAttachPt = getAttachPointIndex(pAttachPt->getName(), true); | ||
2290 | |||
2291 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); // (Will call delete on rez_action) | ||
2292 | #else // Version: 1.23.4 | ||
2293 | LLSD payload; | ||
2294 | payload["item_id"] = pItem->getUUID(); | ||
2295 | payload["attachment_point"] = getAttachPointIndex(pAttachPt->getName(), true); | ||
2296 | |||
2297 | LLNotifications::instance().forceResponse( | ||
2298 | LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); | ||
2299 | #endif | ||
2300 | } | 2181 | } |
2301 | } | 2182 | } |
2302 | else | 2183 | else |
@@ -2504,6 +2385,7 @@ BOOL RlvHandler::setEnabled(BOOL fEnable) | |||
2504 | RlvSettings::fShowNameTags = gSavedSettings.getBOOL(RLV_SETTING_SHOWNAMETAGS); | 2385 | RlvSettings::fShowNameTags = gSavedSettings.getBOOL(RLV_SETTING_SHOWNAMETAGS); |
2505 | 2386 | ||
2506 | RlvCommand::initLookupTable(); | 2387 | RlvCommand::initLookupTable(); |
2388 | gRlvHandler.m_pAttachMgr = new RlvAttachmentManager(); | ||
2507 | gRlvHandler.addObserver(new RlvExtGetSet()); | 2389 | gRlvHandler.addObserver(new RlvExtGetSet()); |
2508 | 2390 | ||
2509 | if (LLStartUp::getStartupState() >= STATE_CLEANUP) | 2391 | if (LLStartUp::getStartupState() >= STATE_CLEANUP) |
@@ -2553,7 +2435,7 @@ void RlvHandler::clearState() | |||
2553 | while (m_Objects.size()) | 2435 | while (m_Objects.size()) |
2554 | { | 2436 | { |
2555 | idObj = m_Objects.begin()->first; // Need a copy since after @clear the data it points to will no longer exist | 2437 | idObj = m_Objects.begin()->first; // Need a copy since after @clear the data it points to will no longer exist |
2556 | fDetachable = ((pObj = gObjectList.findObject(idObj)) != NULL) ? isDetachable(pObj) : true; | 2438 | fDetachable = ((pObj = gObjectList.findObject(idObj)) != NULL) ? isLockedAttachment(pObj, RLV_LOCK_REMOVE) : true; |
2557 | 2439 | ||
2558 | processCommand(idObj, "clear", false); | 2440 | processCommand(idObj, "clear", false); |
2559 | if (!fDetachable) | 2441 | if (!fDetachable) |
@@ -2561,32 +2443,165 @@ void RlvHandler::clearState() | |||
2561 | } | 2443 | } |
2562 | 2444 | ||
2563 | // Sanity check - these should all be empty after we issue @clear on the last object | 2445 | // Sanity check - these should all be empty after we issue @clear on the last object |
2564 | if ( (!m_Objects.empty()) || !(m_Exceptions.empty()) || (!m_Attachments.empty()) ) | 2446 | if ( (!m_Objects.empty()) || !(m_Exceptions.empty()) || (!m_AttachAdd.empty()) || (!m_AttachRem.empty()) ) |
2565 | { | 2447 | { |
2566 | RLV_ERRS << "Object, exception or attachment map not empty after clearing state!" << LL_ENDL; | 2448 | RLV_ERRS << "Object, exception or attachment map not empty after clearing state!" << LL_ENDL; |
2567 | m_Objects.clear(); | 2449 | m_Objects.clear(); |
2568 | m_Exceptions.clear(); | 2450 | m_Exceptions.clear(); |
2569 | m_Attachments.clear(); | 2451 | m_AttachAdd.clear(); |
2452 | m_AttachRem.clear(); | ||
2570 | } | 2453 | } |
2571 | 2454 | ||
2572 | // These all need manual clearing | 2455 | // These all need manual clearing |
2573 | memset(m_LayersAdd, 0, sizeof(S16) * WT_COUNT); | 2456 | memset(m_LayersAdd, 0, sizeof(S16) * WT_COUNT); |
2574 | memset(m_LayersRem, 0, sizeof(S16) * WT_COUNT); | 2457 | memset(m_LayersRem, 0, sizeof(S16) * WT_COUNT); |
2575 | memset(m_Behaviours, 0, sizeof(S16) * RLV_BHVR_COUNT); | 2458 | memset(m_Behaviours, 0, sizeof(S16) * RLV_BHVR_COUNT); |
2576 | m_AttachPending.clear(); | 2459 | m_Retained.clear(); |
2577 | m_Emitter.clearObservers(); // <- calls delete on all active observers | 2460 | m_Emitter.clearObservers(); // <- calls delete on all active observers |
2578 | 2461 | ||
2579 | // Clear dynamically allocated memory | 2462 | // Clear dynamically allocated memory |
2580 | if (m_pGCTimer) | 2463 | delete m_pGCTimer; |
2464 | m_pGCTimer = NULL; | ||
2465 | delete m_pWLSnapshot; | ||
2466 | m_pWLSnapshot = NULL; | ||
2467 | delete m_pAttachMgr; | ||
2468 | m_pAttachMgr = NULL; | ||
2469 | } | ||
2470 | |||
2471 | // ============================================================================ | ||
2472 | // Command handlers (RLV_TYPE_ADD and RLV_TYPE_REMOVE) | ||
2473 | // | ||
2474 | |||
2475 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
2476 | ERlvCmdRet RlvHandler::onAddRemAttach(const LLUUID& idObj, const RlvCommand& rlvCmd, bool& fRefCount) | ||
2477 | { | ||
2478 | // Sanity check - if there's an option it should specify a valid attachment point name | ||
2479 | S32 idxAttachPt = getAttachPointIndex(rlvCmd.getOption(), true); | ||
2480 | if ( (!idxAttachPt) && (!rlvCmd.getOption().empty()) ) | ||
2481 | return RLV_RET_FAILED_OPTION; | ||
2482 | |||
2483 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
2484 | if (!pAvatar) | ||
2485 | return RLV_RET_FAILED; | ||
2486 | |||
2487 | ERlvLockMask eLock = (RLV_BHVR_REMATTACH == rlvCmd.getBehaviourType()) ? RLV_LOCK_REMOVE : RLV_LOCK_ADD; | ||
2488 | for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); | ||
2489 | itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach) | ||
2581 | { | 2490 | { |
2582 | delete m_pGCTimer; | 2491 | if ( (0 == idxAttachPt) || (itAttach->first == idxAttachPt) ) |
2583 | m_pGCTimer = NULL; | 2492 | { |
2493 | if (RLV_TYPE_ADD == rlvCmd.getParamType()) | ||
2494 | addAttachmentLock(itAttach->first, idObj, eLock); | ||
2495 | else | ||
2496 | removeAttachmentLock(itAttach->first, idObj, eLock); | ||
2497 | } | ||
2584 | } | 2498 | } |
2585 | if (m_pWLSnapshot) | 2499 | |
2500 | // Refresh HUD visibility if needed | ||
2501 | if ( (RLV_BHVR_REMATTACH == rlvCmd.getBehaviourType()) && (hasLockedHUD()) ) | ||
2502 | LLPipeline::sShowHUDAttachments = TRUE; | ||
2503 | |||
2504 | fRefCount = rlvCmd.getOption().empty(); // Only reference count global locks | ||
2505 | return RLV_RET_NOERROR; | ||
2506 | } | ||
2507 | |||
2508 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
2509 | ERlvCmdRet RlvHandler::onAddRemDetach(const LLUUID& idObj, const RlvCommand& rlvCmd, bool& fRefCount) | ||
2510 | { | ||
2511 | S32 idxAttachPt = 0; | ||
2512 | if (rlvCmd.getOption().empty()) // @detach=n|y | ||
2586 | { | 2513 | { |
2587 | delete m_pWLSnapshot; | 2514 | // The object may or may not exist (it may not have rezzed yet, or it may have already been killed): |
2588 | m_pWLSnapshot = NULL; | 2515 | // * @detach=n: - if it has rezzed then we'll already have its attachment point |
2516 | // - if it hasn't rezzed yet then it's a @detach=n from a non-attachment and RlvHandler::onAttach() takes care of it | ||
2517 | // * @detach=y: - if it ever rezzed as an attachment we'll have cached its attach point | ||
2518 | // - if it never rezzed as an attachment there won't be a lock to remove | ||
2519 | rlv_object_map_t::const_iterator itObj = m_Objects.find(idObj); | ||
2520 | if (itObj != m_Objects.end()) | ||
2521 | idxAttachPt = itObj->second.m_idxAttachPt; | ||
2522 | } | ||
2523 | else // @detach:<attachpt>=n|y | ||
2524 | { | ||
2525 | idxAttachPt = getAttachPointIndex(rlvCmd.getOption(), true); | ||
2526 | } | ||
2527 | |||
2528 | // The attach point can be zero for @detach=n|y (i.e. non-attachment) but should always be non-zero for @detach:<attachpt>=n|y | ||
2529 | if (0 == idxAttachPt) | ||
2530 | return (rlvCmd.getOption().empty()) ? RLV_RET_NOERROR : RLV_RET_FAILED_OPTION; | ||
2531 | |||
2532 | // Actually lock the attachment point (@detach=n locks remove only; @detach:<attachpt>=n locks both remove and add) | ||
2533 | ERlvLockMask eLock = (rlvCmd.getOption().empty()) ? RLV_LOCK_REMOVE : (ERlvLockMask)(RLV_LOCK_ADD | RLV_LOCK_REMOVE); | ||
2534 | if (RLV_TYPE_ADD == rlvCmd.getParamType()) | ||
2535 | addAttachmentLock(idxAttachPt, idObj, eLock); | ||
2536 | else | ||
2537 | removeAttachmentLock(idxAttachPt, idObj, eLock); | ||
2538 | |||
2539 | // Refresh HUD visibility if needed | ||
2540 | if ( (RLV_TYPE_ADD == rlvCmd.getParamType()) && (hasLockedHUD()) ) | ||
2541 | LLPipeline::sShowHUDAttachments = TRUE; | ||
2542 | |||
2543 | fRefCount = false; // Don't reference count @detach[:<option>]=n | ||
2544 | return RLV_RET_NOERROR; | ||
2545 | } | ||
2546 | |||
2547 | // ============================================================================ | ||
2548 | // Command handlers (RLV_TYPE_FORCE) | ||
2549 | // | ||
2550 | |||
2551 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
2552 | ERlvCmdRet RlvHandler::onForceDetach(const LLUUID& idObj, const RlvCommand& rlvCmd) const | ||
2553 | { | ||
2554 | // TODO-RLVA: this still needs a rewrite to conform to the new event handler system | ||
2555 | if ( (rlvCmd.getOption().empty()) || (getAttachPointIndex(rlvCmd.getOption(), true)) ) | ||
2556 | { | ||
2557 | onForceRemAttach(idObj, rlvCmd); | ||
2558 | } | ||
2559 | else | ||
2560 | { | ||
2561 | // Force detach single folder | ||
2562 | onForceWear(rlvCmd.getOption(), false, false); | ||
2563 | } | ||
2564 | |||
2565 | return RLV_RET_NOERROR; | ||
2566 | } | ||
2567 | |||
2568 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Added: RLVa-1.0.5b | ||
2569 | ERlvCmdRet RlvHandler::onForceRemAttach(const LLUUID& idObj, const RlvCommand& rlvCmd) const | ||
2570 | { | ||
2571 | S32 idxAttachPt = 0; | ||
2572 | if (rlvCmd.getOption().empty()) | ||
2573 | { | ||
2574 | // Simulate right-click / Take Off > Detach All | ||
2575 | LLAgent::userRemoveAllAttachments(NULL); | ||
2576 | return RLV_RET_NOERROR; | ||
2577 | } | ||
2578 | else if ((idxAttachPt = getAttachPointIndex(rlvCmd.getOption(), true)) != 0) | ||
2579 | { | ||
2580 | // Simulate right-click / Take Off > Detach > ... | ||
2581 | LLVOAvatar* pAvatar; LLViewerJointAttachment* pAttachmentPt; | ||
2582 | if ( ((pAvatar = gAgent.getAvatarObject()) != NULL) && // Make sure we're actually wearing something on the attachment point | ||
2583 | ((pAttachmentPt = get_if_there(pAvatar->mAttachmentPoints, (S32)idxAttachPt, (LLViewerJointAttachment*)NULL)) != NULL) && | ||
2584 | (isStrippable(pAttachmentPt->getItemID())) ) // ... and that it's not marked as "nostrip" | ||
2585 | { | ||
2586 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | ||
2587 | // If we're stripping something that's part of a composite folder then we should @detachthis instead | ||
2588 | if (isCompositeDescendent(pAttachmentPt->getItemID())) | ||
2589 | { | ||
2590 | std::string strCmd = "detachthis:" + strOption + "=force"; | ||
2591 | #ifdef RLV_DEBUG | ||
2592 | RLV_INFOS << "\t- '" << strOption << "' belongs to composite folder: @" << strCmd << LL_ENDL; | ||
2593 | #endif // RLV_DEBUG | ||
2594 | processForceCommand(idObj, RlvCommand(strCmd)); | ||
2595 | } | ||
2596 | else | ||
2597 | #endif // RLV_EXPERIMENTAL_COMPOSITES | ||
2598 | { | ||
2599 | handle_detach_from_avatar(pAttachmentPt); | ||
2600 | } | ||
2601 | } | ||
2602 | return RLV_RET_NOERROR; | ||
2589 | } | 2603 | } |
2604 | return RLV_RET_FAILED_OPTION; | ||
2590 | } | 2605 | } |
2591 | 2606 | ||
2592 | // ============================================================================ | 2607 | // ============================================================================ |
diff --git a/linden/indra/newview/rlvhandler.h b/linden/indra/newview/rlvhandler.h index 5295a72..6821149 100644 --- a/linden/indra/newview/rlvhandler.h +++ b/linden/indra/newview/rlvhandler.h | |||
@@ -16,9 +16,8 @@ | |||
16 | // ============================================================================ | 16 | // ============================================================================ |
17 | 17 | ||
18 | typedef std::map<LLUUID, RlvObject> rlv_object_map_t; | 18 | typedef std::map<LLUUID, RlvObject> rlv_object_map_t; |
19 | typedef std::multimap<S32, LLUUID> rlv_detach_map_t; | ||
20 | typedef std::map<S32, LLUUID> rlv_reattach_map_t; | ||
21 | typedef std::multimap<ERlvBehaviour, RlvException> rlv_exception_map_t; | 19 | typedef std::multimap<ERlvBehaviour, RlvException> rlv_exception_map_t; |
20 | typedef std::map<S32, LLUUID> rlv_attachlock_map_t; | ||
22 | 21 | ||
23 | class RlvHandler | 22 | class RlvHandler |
24 | { | 23 | { |
@@ -47,7 +46,9 @@ public: | |||
47 | /* | 46 | /* |
48 | * Rule checking functions | 47 | * Rule checking functions |
49 | */ | 48 | */ |
50 | // NOTE: - to check @detach=n -> hasLockedAttachment() / hasLockedHUD() / isDetachable() | 49 | // NOTE: - to check @detach=n -> hasLockedAttachment(RLV_LOCK_REMOVE) / hasLockedHUD() / isLockedAttachment(.., RLV_LOCK_REMOVE) |
50 | // - to check @addattach=n -> hasLockedAttachment(RLV_LOCK_ADD) / isLockedAttachment(.., RLV_LOCK_ADD) | ||
51 | // - to check @remattach=n -> (see @detach=n) | ||
51 | // - to check exceptions -> isException() | 52 | // - to check exceptions -> isException() |
52 | // - to check @addoutfit=n -> isWearable() | 53 | // - to check @addoutfit=n -> isWearable() |
53 | // - to check @remoutfit=n -> isRemovable() | 54 | // - to check @remoutfit=n -> isRemovable() |
@@ -59,20 +60,21 @@ public: | |||
59 | bool hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUID& idObj) const; | 60 | bool hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUID& idObj) const; |
60 | bool hasBehaviourExcept(ERlvBehaviour eBehaviour, const std::string& strOption, const LLUUID& idObj) const; | 61 | bool hasBehaviourExcept(ERlvBehaviour eBehaviour, const std::string& strOption, const LLUUID& idObj) const; |
61 | 62 | ||
62 | // Returns TRUE if there is at least 1 non-detachable attachment | 63 | // Adds an eLock type lock (held by idRlvObj) for the specified attachment point |
63 | bool hasLockedAttachment() const { return (0 != m_Attachments.size()); } | 64 | void addAttachmentLock(S32 idxAttachPt, const LLUUID& idRlvObj, ERlvLockMask eLock); |
65 | // Returns TRUE if there is at least 1 eLock type locked attachment (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) | ||
66 | bool hasLockedAttachment(ERlvLockMask eLock) const; | ||
64 | // Returns TRUE if there is at least 1 non-detachable HUD attachment | 67 | // Returns TRUE if there is at least 1 non-detachable HUD attachment |
65 | bool hasLockedHUD() const; | 68 | bool hasLockedHUD() const; |
66 | // Returns TRUE if the specified attachment point is detachable | 69 | // Returns TRUE if the specified attachment point is eLock type locked (RLV_LOCK_ANY = RLV_LOCK_ADD *or* RLV_LOCK_REMOVE) |
67 | bool isDetachable(S32 idxAttachPt) const { return (idxAttachPt) && (m_Attachments.find(idxAttachPt) == m_Attachments.end()); } | 70 | bool isLockedAttachment(S32 idxAttachPt, ERlvLockMask eLock) const; |
68 | bool isDetachable(const LLInventoryItem* pItem) const; | 71 | bool isLockedAttachment(const LLInventoryItem* pItem, ERlvLockMask eLock) const; |
69 | bool isDetachable(LLViewerJointAttachment* pAttachPt) const; | 72 | bool isLockedAttachment(LLViewerJointAttachment* pAttachPt, ERlvLockMask eLock) const; |
70 | bool isDetachable(LLViewerObject* pObj) const; | 73 | bool isLockedAttachment(LLViewerObject* pObj, ERlvLockMask eLock) const; |
71 | // Returns TRUE if the specified attachment point is set non-detachable by anything other than pObj (or one of its children) | 74 | // Returns TRUE if the specified attachment point is eLock type locked by anything other than pObj (or one of its children) |
72 | bool isDetachableExcept(S32 idxAttachPt, LLViewerObject* pObj) const; | 75 | bool isLockedAttachmentExcept(S32 idxAttachPt, ERlvLockMask eLock, LLViewerObject* pObj) const; |
73 | // Marks the specified attachment point as (non-)detachable (return value indicates success ; used by unit tests) | 76 | // Adds an eLock type lock (held by idRlvObj) for the specified attachment point |
74 | bool setDetachable(S32 idxAttachPt, const LLUUID& idRlvObj, bool fDetachable); | 77 | void removeAttachmentLock(S32 idxAttachPt, const LLUUID& idRlovObj, ERlvLockMask eLock); |
75 | bool setDetachable(LLViewerObject* pObj, const LLUUID& idRlvObj, bool fDetachable); | ||
76 | 78 | ||
77 | // Adds or removes an exception for the specified behaviour | 79 | // Adds or removes an exception for the specified behaviour |
78 | void addException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& varOption); | 80 | void addException(const LLUUID& idObj, ERlvBehaviour eBhvr, const RlvExceptionOption& varOption); |
@@ -183,19 +185,28 @@ public: | |||
183 | void notifyBehaviourObservers(const RlvCommand& rlvCmd, bool fInternal); | 185 | void notifyBehaviourObservers(const RlvCommand& rlvCmd, bool fInternal); |
184 | 186 | ||
185 | // Externally invoked event handlers | 187 | // Externally invoked event handlers |
186 | void onAttach(LLViewerJointAttachment* pAttachPt, bool fFullyLoaded); // LLVOAvatar::attachObject() | 188 | void onAttach(LLViewerJointAttachment* pAttachPt); // LLVOAvatar::attachObject() |
187 | void onDetach(LLViewerJointAttachment* pAttachPt); // LLVOAvatar::detachObject() | 189 | void onDetach(LLViewerJointAttachment* pAttachPt); // LLVOAvatar::detachObject() |
188 | bool onGC(); // RlvGCTimer::tick() | 190 | bool onGC(); // RlvGCTimer::tick() |
189 | void onSavedAssetIntoInventory(const LLUUID& idItem); // LLInventoryModel::processSaveAssetIntoInventory() | 191 | void onSavedAssetIntoInventory(const LLUUID& idItem) { if (m_pAttachMgr) m_pAttachMgr->onSavedAssetIntoInventory(idItem); } |
192 | void onWearAttachment(const LLUUID& idItem) { if (m_pAttachMgr) m_pAttachMgr->onWearAttachment(idItem); } | ||
190 | protected: | 193 | protected: |
191 | BOOL processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); | 194 | BOOL processAddCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); |
192 | BOOL processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); | 195 | BOOL processRemoveCommand(const LLUUID& uuid, const RlvCommand& rlvCmd); |
193 | BOOL processClearCommand(const LLUUID& idObj, const RlvCommand& rlvCmd); | 196 | BOOL processClearCommand(const LLUUID idObj, const RlvCommand& rlvCmd); |
194 | BOOL processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; | 197 | BOOL processReplyCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; |
195 | BOOL processForceCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; | 198 | BOOL processForceCommand(const LLUUID& uuid, const RlvCommand& rlvCmd) const; |
196 | 199 | ||
197 | // Command handlers (exist for no other reason than to keep the length of the processXXX functions down) | 200 | // Command handlers (exist for no other reason than to keep the length of the processXXX functions down) |
198 | void onForceDetach(const LLUUID& idObj, const std::string& strOption) const; | 201 | ERlvCmdRet onAddRemAttach(const LLUUID& idObj, const RlvCommand& rlvCmd, bool& fRefCount); |
202 | ERlvCmdRet onAddRemDetach(const LLUUID& idObj, const RlvCommand& rlvCmd, bool& fRefCount); | ||
203 | ERlvCmdRet onAddRemOutfit(const LLUUID& idObj, const RlvCommand& rlvCmd, bool& fRefCount); | ||
204 | ERlvCmdRet onForceDetach(const LLUUID& idObj, const RlvCommand& rlvCmd) const; | ||
205 | ERlvCmdRet onForceRemAttach(const LLUUID& idObj, const RlvCommand& rlvCmd) const; | ||
206 | ERlvCmdRet onForceRemOutfit(const LLUUID& idObj, const RlvCommand& rlvCmd) const; | ||
207 | ERlvCmdRet onGetAttach(const LLUUID& idObj, const RlvCommand& rlvCmd, std::string& strReply); | ||
208 | ERlvCmdRet onGetOutfit(const LLUUID& idObj, const RlvCommand& rlvCmd, std::string& strReply); | ||
209 | // Old style command handlers (need to be updated to return ERlvCmdRet) | ||
199 | void onForceRemOutfit(const LLUUID& idObj, const std::string& strOption) const; | 210 | void onForceRemOutfit(const LLUUID& idObj, const std::string& strOption) const; |
200 | bool onForceSit(const LLUUID& uuid, const std::string& strOption) const; | 211 | bool onForceSit(const LLUUID& uuid, const std::string& strOption) const; |
201 | void onForceWear(const std::string& strPath, bool fAttach, bool fMatchAll) const; | 212 | void onForceWear(const std::string& strPath, bool fAttach, bool fMatchAll) const; |
@@ -221,29 +232,29 @@ public: | |||
221 | static const std::string cstrMsgTpLure; // Message sent to tplure sender when tplure restricted | 232 | static const std::string cstrMsgTpLure; // Message sent to tplure sender when tplure restricted |
222 | static const std::string cstrAnonyms[28]; | 233 | static const std::string cstrAnonyms[28]; |
223 | protected: | 234 | protected: |
224 | rlv_object_map_t m_Objects; // Map of objects that have active restrictions (by UUID) | 235 | rlv_object_map_t m_Objects; // Map of objects that have active restrictions (idObj -> RlvObject) |
225 | rlv_exception_map_t m_Exceptions; // Map of UUIDs that are exempt from the associated ERlvBehaviour | 236 | rlv_exception_map_t m_Exceptions; // Map of currently active restriction exceptions (ERlvBehaviour -> RlvException) |
226 | rlv_detach_map_t m_Attachments; // Map of locked attachments (attachment point index -> object that issued @detach=n) | 237 | rlv_attachlock_map_t m_AttachAdd; // Map of attachment points that can't be attached (idxAttachPt -> idObj) |
227 | S16 m_LayersAdd[WT_COUNT]; // Array of locked layers (reference counted) | 238 | rlv_attachlock_map_t m_AttachRem; // Map of attachment points that can't be detached (idxAttachPt -> idObj) |
228 | S16 m_LayersRem[WT_COUNT]; // Array of locked layers (reference counted) | 239 | S16 m_LayersAdd[WT_COUNT]; // Array of layers that can't be worn (reference counted) |
229 | S16 m_Behaviours[RLV_BHVR_COUNT]; | 240 | S16 m_LayersRem[WT_COUNT]; // Array of layers that can't be removed (reference counted) |
230 | 241 | S16 m_Behaviours[RLV_BHVR_COUNT]; | |
231 | rlv_retained_list_t m_Retained; | 242 | |
232 | rlv_reattach_map_t m_AttachPending; | 243 | rlv_retained_list_t m_Retained; |
233 | rlv_reattach_map_t m_DetachPending; | 244 | RlvGCTimer* m_pGCTimer; |
234 | RlvGCTimer* m_pGCTimer; | 245 | RlvWLSnapshot* m_pWLSnapshot; |
235 | RlvWLSnapshot* m_pWLSnapshot; | 246 | RlvAttachmentManager* m_pAttachMgr; |
236 | 247 | ||
237 | RlvCommand* m_pCurCommand; // Convenience (see @tpto) | 248 | RlvCommand* m_pCurCommand; // Convenience (see @tpto) |
238 | LLUUID m_idCurObject; // Convenience (see @tpto) | 249 | LLUUID m_idCurObject; // Convenience (see @tpto) |
239 | 250 | ||
240 | mutable RlvEventEmitter<RlvObserver> m_Emitter; | 251 | mutable RlvEventEmitter<RlvObserver> m_Emitter; |
241 | mutable std::list<RlvBehaviourObserver*> m_BhvrObservers; | 252 | mutable std::list<RlvBehaviourObserver*> m_BhvrObservers; |
242 | RlvBehaviourNotifyObserver* m_pBhvrNotify; | 253 | RlvBehaviourNotifyObserver* m_pBhvrNotify; |
243 | 254 | ||
244 | static BOOL m_fEnabled; // Use setEnabled() to toggle this | 255 | static BOOL m_fEnabled; // Use setEnabled() to toggle this |
245 | static BOOL m_fFetchStarted; // TRUE if we fired off an inventory fetch | 256 | static BOOL m_fFetchStarted; // TRUE if we fired off an inventory fetch |
246 | static BOOL m_fFetchComplete; // TRUE if everything was fetched | 257 | static BOOL m_fFetchComplete; // TRUE if everything was fetched |
247 | static RlvMultiStringSearch m_AttachLookup; // Lookup table for attachment names (lower case) | 258 | static RlvMultiStringSearch m_AttachLookup; // Lookup table for attachment names (lower case) |
248 | 259 | ||
249 | bool m_fCanCancelTp; | 260 | bool m_fCanCancelTp; |
@@ -258,8 +269,8 @@ protected: | |||
258 | */ | 269 | */ |
259 | public: | 270 | public: |
260 | const rlv_object_map_t* getObjectMap() const { return &m_Objects; } | 271 | const rlv_object_map_t* getObjectMap() const { return &m_Objects; } |
261 | const rlv_exception_map_t* getExceptionMap() const { return &m_Exceptions; } | 272 | //const rlv_exception_map_t* getExceptionMap() const { return &m_Exceptions; } |
262 | const rlv_detach_map_t* getDetachMap() const { return &m_Attachments; } | 273 | //const rlv_detach_map_t* getDetachMap() const { return &m_Attachments; } |
263 | #ifdef RLV_DEBUG_TESTS | 274 | #ifdef RLV_DEBUG_TESTS |
264 | const S16* getAddLayers() const { return m_LayersAdd; } | 275 | const S16* getAddLayers() const { return m_LayersAdd; } |
265 | const S16* getRemLayers() const { return m_LayersRem; } | 276 | const S16* getRemLayers() const { return m_LayersRem; } |
@@ -345,6 +356,13 @@ inline bool RlvHandler::hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUI | |||
345 | return hasBehaviourExcept(eBehaviour, std::string(), idObj); | 356 | return hasBehaviourExcept(eBehaviour, std::string(), idObj); |
346 | } | 357 | } |
347 | 358 | ||
359 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
360 | inline bool RlvHandler::hasLockedAttachment(ERlvLockMask eLock) const | ||
361 | { | ||
362 | // Remove locks are more common so check those first | ||
363 | return ( (eLock & RLV_LOCK_REMOVE) && (!m_AttachRem.empty()) ) || ( (eLock & RLV_LOCK_ADD) && (!m_AttachAdd.empty()) ); | ||
364 | } | ||
365 | |||
348 | #ifdef RLV_EXPERIMENTAL_COMPOSITES | 366 | #ifdef RLV_EXPERIMENTAL_COMPOSITES |
349 | // Checked: | 367 | // Checked: |
350 | inline bool RlvHandler::isCompositeFolder(const LLInventoryCategory* pFolder) const | 368 | inline bool RlvHandler::isCompositeFolder(const LLInventoryCategory* pFolder) const |
@@ -359,20 +377,6 @@ inline bool RlvHandler::hasBehaviourExcept(ERlvBehaviour eBehaviour, const LLUUI | |||
359 | } | 377 | } |
360 | #endif // RLV_EXPERIMENTAL_COMPOSITES | 378 | #endif // RLV_EXPERIMENTAL_COMPOSITES |
361 | 379 | ||
362 | // Checked: 2009-09-08 (RLVa-1.0.2c) | Added: RLVa-1.0.2c | ||
363 | inline bool RlvHandler::isDetachable(LLViewerJointAttachment *pAttachPt) const | ||
364 | { | ||
365 | // If there's an attached object it's faster to just use that; otherwise look up the attachment index because it might be locked empty | ||
366 | return (pAttachPt == NULL) || | ||
367 | ( (pAttachPt->getObject() != NULL) && isDetachable(pAttachPt->getObject()) ) || (isDetachable(getAttachPointIndex(pAttachPt))); | ||
368 | } | ||
369 | |||
370 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
371 | inline bool RlvHandler::isDetachable(LLViewerObject* pObj) const | ||
372 | { | ||
373 | return (pObj == NULL) || (!pObj->isAttachment()) || (isDetachable(getAttachPointIndex(pObj))); | ||
374 | } | ||
375 | |||
376 | inline bool RlvHandler::isPermissive(ERlvBehaviour eBhvr) const | 380 | inline bool RlvHandler::isPermissive(ERlvBehaviour eBhvr) const |
377 | { | 381 | { |
378 | return (RlvCommand::hasStrictVariant(eBhvr)) | 382 | return (RlvCommand::hasStrictVariant(eBhvr)) |
@@ -395,6 +399,29 @@ inline bool RlvHandler::isFoldedFolder(const LLInventoryCategory* pFolder, bool | |||
395 | ); | 399 | ); |
396 | } | 400 | } |
397 | 401 | ||
402 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
403 | inline bool RlvHandler::isLockedAttachment(S32 idxAttachPt, ERlvLockMask eLock) const | ||
404 | { | ||
405 | return ( (eLock & RLV_LOCK_REMOVE) && (m_AttachRem.find(idxAttachPt) != m_AttachRem.end()) ) || | ||
406 | ( (eLock & RLV_LOCK_ADD) && (m_AttachAdd.find(idxAttachPt) != m_AttachAdd.end()) ); | ||
407 | } | ||
408 | |||
409 | |||
410 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
411 | inline bool RlvHandler::isLockedAttachment(LLViewerJointAttachment *pAttachPt, ERlvLockMask eLock) const | ||
412 | { | ||
413 | // If there's an attached object it's faster to just use that; otherwise look up the attachment index because it might be locked empty | ||
414 | return (pAttachPt != NULL) && | ||
415 | ( ( (pAttachPt->getObject() != NULL) && (isLockedAttachment(pAttachPt->getObject(), eLock)) ) || | ||
416 | (isLockedAttachment(getAttachPointIndex(pAttachPt), eLock)) ); | ||
417 | } | ||
418 | |||
419 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | ||
420 | inline bool RlvHandler::isLockedAttachment(LLViewerObject* pObj, ERlvLockMask eLock) const | ||
421 | { | ||
422 | return (pObj != NULL) && (pObj->isAttachment()) && (isLockedAttachment(getAttachPointIndex(pObj), eLock)); | ||
423 | } | ||
424 | |||
398 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Added: RLVa-0.2.0d | 425 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Added: RLVa-0.2.0d |
399 | inline bool RlvHandler::isRemovableExcept(EWearableType type, const LLUUID& idObj) const | 426 | inline bool RlvHandler::isRemovableExcept(EWearableType type, const LLUUID& idObj) const |
400 | { | 427 | { |
@@ -434,12 +461,6 @@ inline void RlvHandler::retainCommand(const std::string& strObj, const LLUUID& i | |||
434 | m_Retained.push_back(RlvRetainedCommand(strObj, idObj, strCmd)); | 461 | m_Retained.push_back(RlvRetainedCommand(strObj, idObj, strCmd)); |
435 | } | 462 | } |
436 | 463 | ||
437 | // Checked: 2009-05-23 (RLVa-0.2.0d) | Modified: RLVa-0.2.0d | ||
438 | inline bool RlvHandler::setDetachable(LLViewerObject* pObj, const LLUUID& idRlvObj, bool fDetachable) | ||
439 | { | ||
440 | return setDetachable(getAttachPointIndex(pObj), idRlvObj, fDetachable); // getAttachPointIndex() has a NULL pointer check | ||
441 | } | ||
442 | |||
443 | // ============================================================================ | 464 | // ============================================================================ |
444 | 465 | ||
445 | #endif // RLV_HANDLER_H | 466 | #endif // RLV_HANDLER_H |
diff --git a/linden/indra/newview/rlvhelper.cpp b/linden/indra/newview/rlvhelper.cpp index c8d430d..67ffbe2 100644 --- a/linden/indra/newview/rlvhelper.cpp +++ b/linden/indra/newview/rlvhelper.cpp | |||
@@ -1,6 +1,7 @@ | |||
1 | #include "llviewerprecompiledheaders.h" | 1 | #include "llviewerprecompiledheaders.h" |
2 | #include "llagent.h" | 2 | #include "llagent.h" |
3 | #include "llfloaterwindlight.h" | 3 | #include "llfloaterwindlight.h" |
4 | #include "llinventoryview.h" | ||
4 | #include "llviewerobject.h" | 5 | #include "llviewerobject.h" |
5 | #include "llviewerstats.h" | 6 | #include "llviewerstats.h" |
6 | #include "llviewerwindow.h" | 7 | #include "llviewerwindow.h" |
@@ -11,6 +12,12 @@ | |||
11 | #include "rlvevent.h" | 12 | #include "rlvevent.h" |
12 | #include "rlvhandler.h" | 13 | #include "rlvhandler.h" |
13 | 14 | ||
15 | // Only defined in llinventorybridge.cpp | ||
16 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
17 | #include "llinventorybridge.h" | ||
18 | void confirm_replace_attachment_rez(S32 option, void* user_data); | ||
19 | #endif | ||
20 | |||
14 | // ============================================================================ | 21 | // ============================================================================ |
15 | // Static variable initialization | 22 | // Static variable initialization |
16 | // | 23 | // |
@@ -104,12 +111,13 @@ void RlvCommand::initLookupTable() | |||
104 | std::string arBehaviours[RLV_BHVR_COUNT] = | 111 | std::string arBehaviours[RLV_BHVR_COUNT] = |
105 | { | 112 | { |
106 | "version", "detach", "sendchat", "emote", "chatshout", "chatnormal", "chatwhisper", "redirchat", "rediremote", | 113 | "version", "detach", "sendchat", "emote", "chatshout", "chatnormal", "chatwhisper", "redirchat", "rediremote", |
107 | "sendim", "recvchat", "recvemote", "recvim", "tplm", "tploc", "tplure", "sittp", "edit", "rez", "addoutfit", | 114 | "sendim", "recvchat", "recvemote", "recvim", "tplm", "tploc", "tplure", "sittp", "edit", "rez", |
108 | "remoutfit", "getoutfit", "getattach", "showinv", "viewnote", "unsit", "sit", "sendchannel", "getstatus", "getstatusall", | 115 | "addoutfit", "remoutfit", "getoutfit", "addattach", "remattach", "getattach", "showinv", "viewnote", "unsit", "sit", |
109 | "getinv", "getinvworn", "findfolder", "findfolders", "attach", "attachall", "detachall", "getpath", "attachthis", | 116 | "sendchannel", "getstatus", "getstatusall", "getinv", "getinvworn", "findfolder", "findfolders", |
110 | "attachallthis", "detachthis", "detachallthis", "fartouch", "showworldmap", "showminimap", "showloc", "tpto", "accepttp", | 117 | "attach", "attachall", "detachall", "getpath", "attachthis", "attachallthis", "detachthis", "detachallthis", |
111 | "acceptpermission", "shownames", "fly", "getsitid", "setdebug", "setenv", "detachme", "showhovertextall", | 118 | "fartouch", "showworldmap", "showminimap", "showloc", "tpto", "accepttp", "acceptpermission", "shownames", "fly", |
112 | "showhovertextworld", "showhovertexthud", "showhovertext", "notify", "defaultwear", "versionnum", "permissive" | 119 | "getsitid", "setdebug", "setenv", "detachme", "showhovertextall", "showhovertextworld", "showhovertexthud", |
120 | "showhovertext", "notify", "defaultwear", "versionnum", "permissive", "viewscript", "viewtexture" | ||
113 | }; | 121 | }; |
114 | 122 | ||
115 | for (int idxBvhr = 0; idxBvhr < RLV_BHVR_COUNT; idxBvhr++) | 123 | for (int idxBvhr = 0; idxBvhr < RLV_BHVR_COUNT; idxBvhr++) |
@@ -207,6 +215,204 @@ std::string RlvObject::getStatusString(const std::string& strMatch) const | |||
207 | } | 215 | } |
208 | 216 | ||
209 | // ============================================================================ | 217 | // ============================================================================ |
218 | // RlvAttachmentManager | ||
219 | // | ||
220 | |||
221 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
222 | void RlvAttachmentManager::forceAttach(const LLUUID& idItem, S32 idxAttachPt) | ||
223 | { | ||
224 | #if RLV_TARGET < RLV_MAKE_TARGET(1, 23, 0) // Version: 1.22.11 | ||
225 | LLAttachmentRezAction* rez_action = new LLAttachmentRezAction(); | ||
226 | rez_action->mItemID = idItem; | ||
227 | rez_action->mAttachPt = idxAttachPt; | ||
228 | |||
229 | confirm_replace_attachment_rez(0/*YES*/, (void*)rez_action); // (Will call delete on rez_action) | ||
230 | #else // Version: 1.23.4 | ||
231 | LLSD payload; | ||
232 | payload["item_id"] = idItem; | ||
233 | payload["attachment_point"] = idxAttachPt; | ||
234 | |||
235 | LLNotifications::instance().forceResponse( | ||
236 | LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); | ||
237 | #endif | ||
238 | } | ||
239 | |||
240 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
241 | void RlvAttachmentManager::forceDetach(LLViewerJointAttachment* pAttachPt) | ||
242 | { | ||
243 | // Copy/paste from handle_detach_from_avatar() | ||
244 | LLViewerObject* attached_object = pAttachPt->getObject(); | ||
245 | if (attached_object) | ||
246 | { | ||
247 | gMessageSystem->newMessage("ObjectDetach"); | ||
248 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | ||
249 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | ||
250 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
251 | |||
252 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); | ||
253 | gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID()); | ||
254 | gMessageSystem->sendReliable( gAgent.getRegionHost() ); | ||
255 | } | ||
256 | } | ||
257 | |||
258 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
259 | void RlvAttachmentManager::onAttach(LLViewerJointAttachment* pAttachPt) | ||
260 | { | ||
261 | S32 idxAttachPt = gRlvHandler.getAttachPointIndex(pAttachPt->getObject()); | ||
262 | if (!idxAttachPt) | ||
263 | return; | ||
264 | |||
265 | // If the attachment point has a pending "reattach" then we don't want to do anything | ||
266 | rlv_attach_map_t::iterator itAttach = m_PendingAttach.find(idxAttachPt); | ||
267 | if (itAttach != m_PendingAttach.end()) | ||
268 | { | ||
269 | if (pAttachPt->getItemID() == itAttach->second.idItem) | ||
270 | m_PendingAttach.erase(itAttach); | ||
271 | return; | ||
272 | } | ||
273 | |||
274 | // Check if the attach is the result of a user action (="Wear") | ||
275 | rlv_wear_map_t::iterator itWear = m_PendingWear.find(pAttachPt->getItemID()); | ||
276 | if (itWear != m_PendingWear.end()) | ||
277 | { | ||
278 | // We need to return the attachment point to its previous state if it's non-attachable | ||
279 | if (gRlvHandler.isLockedAttachment(idxAttachPt, RLV_LOCK_ADD)) | ||
280 | { | ||
281 | // Get the state of the attachment point at the time the user picked "Wear" (if we don't have one it wasn't "add locked" then) | ||
282 | std::map<S32, LLUUID>::iterator itAttachPrev = itWear->second.attachPts.find(idxAttachPt); | ||
283 | if ( (itAttachPrev != itWear->second.attachPts.end()) && (pAttachPt->getItemID() != itAttachPrev->second) ) | ||
284 | { | ||
285 | // If it was empty we need to force detach the new attachment; if it wasn't we need to reattach the old one | ||
286 | if (itAttachPrev->second.isNull()) | ||
287 | { | ||
288 | forceDetach(pAttachPt); | ||
289 | m_PendingDetach.insert(std::pair<S32, LLUUID>(idxAttachPt, pAttachPt->getItemID())); | ||
290 | } | ||
291 | else if (m_PendingAttach.find(idxAttachPt) == m_PendingAttach.end()) // (only if we're not reattaching something else there) | ||
292 | { | ||
293 | m_PendingAttach.insert(std::pair<S32, RlvReattachInfo>(idxAttachPt, RlvReattachInfo(itAttachPrev->second))); | ||
294 | } | ||
295 | } | ||
296 | } | ||
297 | m_PendingWear.erase(itWear); // No need to start the timer since it should be running already if '!m_PendingWear.empty()' | ||
298 | } | ||
299 | } | ||
300 | |||
301 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
302 | void RlvAttachmentManager::onDetach(LLViewerJointAttachment* pAttachPt) | ||
303 | { | ||
304 | S32 idxAttachPt = gRlvHandler.getAttachPointIndex(pAttachPt->getObject()); | ||
305 | if (!idxAttachPt) | ||
306 | return; | ||
307 | |||
308 | // If this is an attachment that we force-detached then we don't want to do anything (even if it is "remove locked") | ||
309 | rlv_detach_map_t::iterator itDetach = m_PendingDetach.find(idxAttachPt); | ||
310 | if ( (itDetach != m_PendingDetach.end()) && (itDetach->second == pAttachPt->getItemID()) ) | ||
311 | { | ||
312 | m_PendingDetach.erase(itDetach); | ||
313 | return; | ||
314 | } | ||
315 | |||
316 | // If the attachment is currently "remove locked" and we're not already trying to reattach something there we should reattach it | ||
317 | if ( (m_PendingAttach.find(idxAttachPt) == m_PendingAttach.end()) && (gRlvHandler.isLockedAttachment(idxAttachPt, RLV_LOCK_REMOVE)) ) | ||
318 | { | ||
319 | m_PendingAttach.insert(std::pair<S32, RlvReattachInfo>(idxAttachPt, RlvReattachInfo(pAttachPt->getItemID()))); | ||
320 | startTimer(); | ||
321 | } | ||
322 | } | ||
323 | |||
324 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
325 | void RlvAttachmentManager::onSavedAssetIntoInventory(const LLUUID& idItem) | ||
326 | { | ||
327 | for (rlv_attach_map_t::iterator itAttach = m_PendingAttach.begin(); itAttach != m_PendingAttach.end(); ++itAttach) | ||
328 | { | ||
329 | if ( (!itAttach->second.fAssetSaved) && (idItem == itAttach->second.idItem) ) | ||
330 | { | ||
331 | forceAttach(itAttach->second.idItem, itAttach->first); | ||
332 | itAttach->second.tsAttach = LLFrameTimer::getElapsedSeconds(); | ||
333 | } | ||
334 | } | ||
335 | } | ||
336 | |||
337 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
338 | BOOL RlvAttachmentManager::onTimer() | ||
339 | { | ||
340 | F64 tsCurrent = LLFrameTimer::getElapsedSeconds(); | ||
341 | |||
342 | // Garbage collect (failed) wear requests older than 60 seconds | ||
343 | rlv_wear_map_t::iterator itWear = m_PendingWear.begin(); | ||
344 | while (itWear != m_PendingWear.end()) | ||
345 | { | ||
346 | if (itWear->second.tsWear + 60 < tsCurrent) | ||
347 | m_PendingWear.erase(itWear++); | ||
348 | else | ||
349 | ++itWear; | ||
350 | } | ||
351 | |||
352 | // Walk over the pending reattach list | ||
353 | rlv_attach_map_t::iterator itAttach = m_PendingAttach.begin(); | ||
354 | while (itAttach != m_PendingAttach.end()) | ||
355 | { | ||
356 | // Sanity check - make sure the item is still in the user's inventory | ||
357 | if (gInventory.getItem(itAttach->second.idItem) == NULL) | ||
358 | { | ||
359 | m_PendingAttach.erase(itAttach++); | ||
360 | continue; | ||
361 | } | ||
362 | |||
363 | // Force an attach if we haven't gotten an SavedAssetIntoInventory message after 15 seconds | ||
364 | // (or if it's been 30 seconds since we last tried to reattach the item) | ||
365 | bool fAttach = false; | ||
366 | if ( (!itAttach->second.fAssetSaved) && (itAttach->second.tsDetach + 15 < tsCurrent) ) | ||
367 | { | ||
368 | itAttach->second.fAssetSaved = true; | ||
369 | fAttach = true; | ||
370 | } | ||
371 | else if ( (itAttach->second.fAssetSaved) && (itAttach->second.tsAttach + 30 < tsCurrent) ) | ||
372 | { | ||
373 | fAttach = true; | ||
374 | } | ||
375 | |||
376 | if (fAttach) | ||
377 | { | ||
378 | forceAttach(itAttach->second.idItem, itAttach->first); | ||
379 | itAttach->second.tsAttach = tsCurrent; | ||
380 | } | ||
381 | |||
382 | ++itAttach; | ||
383 | } | ||
384 | |||
385 | return ( (m_PendingAttach.empty()) && (m_PendingDetach.empty()) && (m_PendingWear.empty()) ); | ||
386 | } | ||
387 | |||
388 | // Checked: 2009-10-12 (RLVa-1.0.5b) | Modified: RLVa-1.0.5b | ||
389 | void RlvAttachmentManager::onWearAttachment(const LLUUID& idItem) | ||
390 | { | ||
391 | // We only need to keep track of wears if there are non-attachable attachment points | ||
392 | if (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ADD)) | ||
393 | return; | ||
394 | |||
395 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
396 | if (!pAvatar) | ||
397 | return; | ||
398 | |||
399 | // If the attachment point this will end up being attached to is: | ||
400 | // - unlocked : nothing should happen (from RLVa's point of view) | ||
401 | // - RLV_LOCK_ADD: the new attachment should get detached and the current one reattached (unless it's currently empty) | ||
402 | // - RLV_LOCK_REM: the current attachment will get reattached on ObjectKill (if there is no current one then nothing should happen) | ||
403 | RlvWearInfo infoWear(idItem); | ||
404 | for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); | ||
405 | itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach) | ||
406 | { | ||
407 | if (gRlvHandler.isLockedAttachment(itAttach->first, RLV_LOCK_ADD)) // We only need to keep track of these (see above) | ||
408 | infoWear.attachPts.insert(std::pair<S32, LLUUID>(itAttach->first, itAttach->second->getItemID())); | ||
409 | } | ||
410 | |||
411 | m_PendingWear.insert(std::pair<LLUUID, RlvWearInfo>(idItem, infoWear)); | ||
412 | startTimer(); | ||
413 | } | ||
414 | |||
415 | // ============================================================================ | ||
210 | // RlvWearableItemCollector | 416 | // RlvWearableItemCollector |
211 | // | 417 | // |
212 | 418 | ||
@@ -354,7 +560,10 @@ BOOL RlvSettings::fShowNameTags = FALSE; | |||
354 | 560 | ||
355 | BOOL RlvSettings::getEnableWear() | 561 | BOOL RlvSettings::getEnableWear() |
356 | { | 562 | { |
357 | return rlvGetSettingBOOL(RLV_SETTING_ENABLEWEAR, TRUE) && (!gRlvHandler.hasBehaviour(RLV_BHVR_DEFAULTWEAR)); | 563 | return |
564 | rlvGetSettingBOOL(RLV_SETTING_ENABLEWEAR, TRUE) && // "Enable Wear" is toggled on and... | ||
565 | (!gRlvHandler.hasBehaviour(RLV_BHVR_DEFAULTWEAR)) && // not restricted and... | ||
566 | (!gRlvHandler.hasBehaviour(RLV_BHVR_ADDATTACH)); // we have attach points we can attach to [see RlvHandler::onAddRemAttach()] | ||
358 | } | 567 | } |
359 | 568 | ||
360 | #ifdef RLV_EXTENSION_STARTLOCATION | 569 | #ifdef RLV_EXTENSION_STARTLOCATION |
@@ -419,7 +628,7 @@ void RlvCurrentlyWorn::fetchWorn() | |||
419 | // Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0f | 628 | // Checked: 2009-07-06 (RLVa-1.0.0c) | Modified: RLVa-0.2.0f |
420 | bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode) | 629 | bool RlvSelectHasLockedAttach::apply(LLSelectNode* pNode) |
421 | { | 630 | { |
422 | return (pNode->getObject()) ? !gRlvHandler.isDetachable(pNode->getObject()) : false; | 631 | return (pNode->getObject()) ? gRlvHandler.isLockedAttachment(pNode->getObject(), m_eLock) : false; |
423 | } | 632 | } |
424 | 633 | ||
425 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0f | 634 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0f |
@@ -438,11 +647,15 @@ bool RlvSelectIsSittingOn::apply(LLSelectNode* pNode) | |||
438 | // Various helper functions | 647 | // Various helper functions |
439 | // | 648 | // |
440 | 649 | ||
441 | // Checked: 2009-09-08 (RLVa-1.0.2c) | Modified: RLVa-1.0.2c | 650 | // Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
442 | BOOL rlvAttachToEnabler(void* pParam) | 651 | BOOL rlvAttachToEnabler(void* pParam) |
443 | { | 652 | { |
444 | // Enables/disables an option on the "Attach to (HUD)" submenu depending on whether it is (un)detachable | 653 | // Disable an option on the "Attach to (HUD)" submenu if: |
445 | return gRlvHandler.isDetachable((LLViewerJointAttachment*)pParam); | 654 | // - the attachment point is locked non-detachable with an object attached |
655 | // - the attachment point is locked non-attachable | ||
656 | return (pParam != NULL) && | ||
657 | (!gRlvHandler.isLockedAttachment(((LLViewerJointAttachment*)pParam)->getObject(), RLV_LOCK_REMOVE)) && | ||
658 | (!gRlvHandler.isLockedAttachment((LLViewerJointAttachment*)pParam, RLV_LOCK_ADD)); | ||
446 | } | 659 | } |
447 | 660 | ||
448 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0g | 661 | // Checked: 2009-07-05 (RLVa-1.0.0b) | Modified: RLVa-0.2.0g |
@@ -527,24 +740,6 @@ S32 rlvGetDirectDescendentsCount(const LLInventoryCategory* pFolder, LLAssetType | |||
527 | // Message sending functions | 740 | // Message sending functions |
528 | // | 741 | // |
529 | 742 | ||
530 | // Checked: 2009-08-11 (RLVa-1.0.1h) | Added: RLVa-1.0.1h | ||
531 | void rlvForceDetach(LLViewerJointAttachment* pAttachPt) | ||
532 | { | ||
533 | // Copy/paste from handle_detach_from_avatar() | ||
534 | LLViewerObject* attached_object = pAttachPt->getObject(); | ||
535 | if (attached_object) | ||
536 | { | ||
537 | gMessageSystem->newMessage("ObjectDetach"); | ||
538 | gMessageSystem->nextBlockFast(_PREHASH_AgentData); | ||
539 | gMessageSystem->addUUIDFast(_PREHASH_AgentID, gAgent.getID() ); | ||
540 | gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); | ||
541 | |||
542 | gMessageSystem->nextBlockFast(_PREHASH_ObjectData); | ||
543 | gMessageSystem->addU32Fast(_PREHASH_ObjectLocalID, attached_object->getLocalID()); | ||
544 | gMessageSystem->sendReliable( gAgent.getRegionHost() ); | ||
545 | } | ||
546 | } | ||
547 | |||
548 | void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession) | 743 | void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession) |
549 | { | 744 | { |
550 | // (See process_improved_im) | 745 | // (See process_improved_im) |
@@ -662,7 +857,3 @@ std::string rlvGetLastParenthesisedText(const std::string& strText, std::string: | |||
662 | } | 857 | } |
663 | 858 | ||
664 | // ========================================================================= | 859 | // ========================================================================= |
665 | // Debug helper functions | ||
666 | // | ||
667 | |||
668 | // ========================================================================= | ||
diff --git a/linden/indra/newview/rlvhelper.h b/linden/indra/newview/rlvhelper.h index 42d10b8..25d8174 100644 --- a/linden/indra/newview/rlvhelper.h +++ b/linden/indra/newview/rlvhelper.h | |||
@@ -109,6 +109,80 @@ protected: | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | // ============================================================================ | 111 | // ============================================================================ |
112 | // RlvAttachmentManager - Self contained helper class that automagically takes care of the nitty gritty of force detaching/reattaching | ||
113 | // | ||
114 | |||
115 | class RlvAttachmentManager | ||
116 | { | ||
117 | public: | ||
118 | RlvAttachmentManager() : m_pTimer(NULL) {} | ||
119 | ~RlvAttachmentManager() { delete m_pTimer; } | ||
120 | |||
121 | /* | ||
122 | * Member functions | ||
123 | */ | ||
124 | public: | ||
125 | static void forceAttach(const LLUUID& idItem, S32 idxAttachPt); | ||
126 | static void forceDetach(LLViewerJointAttachment* pAttachPt); | ||
127 | protected: | ||
128 | void startTimer() { if (!m_pTimer) m_pTimer = new RlvAttachmentManagerTimer(this); } | ||
129 | |||
130 | /* | ||
131 | * Event handlers | ||
132 | */ | ||
133 | public: | ||
134 | void onAttach(LLViewerJointAttachment* pAttachPt); | ||
135 | void onDetach(LLViewerJointAttachment* pAttachPt); | ||
136 | void onSavedAssetIntoInventory(const LLUUID& idItem); | ||
137 | BOOL onTimer(); | ||
138 | void onWearAttachment(const LLUUID& idItem); | ||
139 | |||
140 | /* | ||
141 | * Member variables | ||
142 | */ | ||
143 | protected: | ||
144 | typedef std::map<S32, LLUUID> rlv_detach_map_t; | ||
145 | rlv_detach_map_t m_PendingDetach; | ||
146 | |||
147 | struct RlvReattachInfo | ||
148 | { | ||
149 | RlvReattachInfo(const LLUUID& itemid) : idItem(itemid), fAssetSaved(false), tsAttach(0) | ||
150 | { tsDetach = LLFrameTimer::getElapsedSeconds(); } | ||
151 | |||
152 | LLUUID idItem; | ||
153 | bool fAssetSaved; | ||
154 | F64 tsDetach; | ||
155 | F64 tsAttach; | ||
156 | protected: | ||
157 | RlvReattachInfo(); | ||
158 | }; | ||
159 | typedef std::map<S32, RlvReattachInfo> rlv_attach_map_t; | ||
160 | rlv_attach_map_t m_PendingAttach; | ||
161 | |||
162 | struct RlvWearInfo | ||
163 | { | ||
164 | RlvWearInfo(LLUUID itemid) : idItem(itemid) { tsWear = LLFrameTimer::getElapsedSeconds(); } | ||
165 | |||
166 | LLUUID idItem; | ||
167 | F64 tsWear; | ||
168 | std::map<S32, LLUUID> attachPts; | ||
169 | protected: | ||
170 | RlvWearInfo(); | ||
171 | }; | ||
172 | typedef std::map<LLUUID, RlvWearInfo> rlv_wear_map_t; | ||
173 | rlv_wear_map_t m_PendingWear; | ||
174 | |||
175 | class RlvAttachmentManagerTimer : public LLEventTimer | ||
176 | { | ||
177 | public: | ||
178 | RlvAttachmentManagerTimer(RlvAttachmentManager* pMgr) : LLEventTimer(10), m_pMgr(pMgr) {} | ||
179 | virtual ~RlvAttachmentManagerTimer() { m_pMgr->m_pTimer = NULL; } | ||
180 | virtual BOOL tick() { return m_pMgr->onTimer(); } | ||
181 | RlvAttachmentManager* m_pMgr; | ||
182 | } *m_pTimer; | ||
183 | }; | ||
184 | |||
185 | // ============================================================================ | ||
112 | // RlvCriteriaCategoryCollector - Criteria based folder matching filter used by @findfolder and @findfolders | 186 | // RlvCriteriaCategoryCollector - Criteria based folder matching filter used by @findfolder and @findfolders |
113 | // | 187 | // |
114 | 188 | ||
@@ -295,7 +369,10 @@ public: | |||
295 | 369 | ||
296 | struct RlvSelectHasLockedAttach : public LLSelectedNodeFunctor | 370 | struct RlvSelectHasLockedAttach : public LLSelectedNodeFunctor |
297 | { | 371 | { |
372 | RlvSelectHasLockedAttach(ERlvLockMask eLock) : m_eLock(eLock) {} | ||
298 | virtual bool apply(LLSelectNode* pNode); | 373 | virtual bool apply(LLSelectNode* pNode); |
374 | protected: | ||
375 | ERlvLockMask m_eLock; | ||
299 | }; | 376 | }; |
300 | 377 | ||
301 | struct RlvSelectIsOwnedByOrGroupOwned : public LLSelectedNodeFunctor | 378 | struct RlvSelectIsOwnedByOrGroupOwned : public LLSelectedNodeFunctor |
@@ -324,7 +401,6 @@ bool rlvIsEmote(const std::string& strUTF8Text); | |||
324 | bool rlvIsValidReplyChannel(S32 nChannel); | 401 | bool rlvIsValidReplyChannel(S32 nChannel); |
325 | bool rlvIsWearingItem(const LLInventoryItem* pItem); | 402 | bool rlvIsWearingItem(const LLInventoryItem* pItem); |
326 | 403 | ||
327 | void rlvForceDetach(LLViewerJointAttachment* pAttachPt); | ||
328 | void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null); | 404 | void rlvSendBusyMessage(const LLUUID& idTo, const std::string& strMsg, const LLUUID& idSession = LLUUID::null); |
329 | bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply); | 405 | bool rlvSendChatReply(const std::string& strChannel, const std::string& strReply); |
330 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply); | 406 | bool rlvSendChatReply(S32 nChannel, const std::string& strReply); |
diff --git a/linden/indra/newview/skins/default/xui/de/alerts.xml b/linden/indra/newview/skins/default/xui/de/alerts.xml index 2c3c306..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/de/alerts.xml +++ b/linden/indra/newview/skins/default/xui/de/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/de/notify.xml b/linden/indra/newview/skins/default/xui/de/notify.xml index 969117f..128e4bd 100644 --- a/linden/indra/newview/skins/default/xui/de/notify.xml +++ b/linden/indra/newview/skins/default/xui/de/notify.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <notifications> | 2 | <notifications> |
3 | </notifications> | 3 | </notifications> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index abf45cc..b5d6a20 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml | |||
@@ -382,7 +382,7 @@ You can use [SECOND_LIFE] normally and other users will see you correctly. | |||
382 | </alert> | 382 | </alert> |
383 | <alert modal="true" name="FirstRun"> | 383 | <alert modal="true" name="FirstRun"> |
384 | <message name="message"> | 384 | <message name="message"> |
385 | [SECOND_LIFE] installation is complete. | 385 | [VIEWER] installation is complete. |
386 | 386 | ||
387 | If this is your first time using [SECOND_LIFE], you will need to create | 387 | If this is your first time using [SECOND_LIFE], you will need to create |
388 | an account before you can log on. | 388 | an account before you can log on. |
@@ -405,7 +405,7 @@ Please check your network connection. | |||
405 | </alert> | 405 | </alert> |
406 | <alert modal="true" name="LoginPacketNeverReceived"> | 406 | <alert modal="true" name="LoginPacketNeverReceived"> |
407 | <message name="message"> | 407 | <message name="message"> |
408 | We're having trouble connecting. There may be a problem with your internet connection or the Second Life servers. | 408 | We're having trouble connecting. There may be a problem with your internet connection or the [SECOND_LIFE] servers. |
409 | 409 | ||
410 | You can either check your internet connection and try again in a few minutes, click Help to connect to our support site, or click Teleport to attempt to teleport home. | 410 | You can either check your internet connection and try again in a few minutes, click Help to connect to our support site, or click Teleport to attempt to teleport home. |
411 | </message> | 411 | </message> |
@@ -609,7 +609,7 @@ Please set the object for sale and try again. | |||
609 | </alert> | 609 | </alert> |
610 | <alert modal="true" name="DownloadWindowsMandatory"> | 610 | <alert modal="true" name="DownloadWindowsMandatory"> |
611 | <message name="message"> | 611 | <message name="message"> |
612 | A new version of [SECOND_LIFE] is available. | 612 | A new version of [VIEWER] is available. |
613 | [MESSAGE] | 613 | [MESSAGE] |
614 | You must download this update to use [SECOND_LIFE]. | 614 | You must download this update to use [SECOND_LIFE]. |
615 | </message> | 615 | </message> |
@@ -622,7 +622,7 @@ You must download this update to use [SECOND_LIFE]. | |||
622 | </alert> | 622 | </alert> |
623 | <alert modal="true" name="DownloadWindows"> | 623 | <alert modal="true" name="DownloadWindows"> |
624 | <message name="message"> | 624 | <message name="message"> |
625 | An updated version of [SECOND_LIFE] is available. | 625 | An updated version of [VIEWER] is available. |
626 | [MESSAGE] | 626 | [MESSAGE] |
627 | This update is not required, but we suggest you install it to improve performance and stability. | 627 | This update is not required, but we suggest you install it to improve performance and stability. |
628 | </message> | 628 | </message> |
@@ -635,7 +635,7 @@ This update is not required, but we suggest you install it to improve performanc | |||
635 | </alert> | 635 | </alert> |
636 | <alert modal="true" name="DownloadWindowsReleaseForDownload"> | 636 | <alert modal="true" name="DownloadWindowsReleaseForDownload"> |
637 | <message name="message"> | 637 | <message name="message"> |
638 | An updated version of [SECOND_LIFE] is available. | 638 | An updated version of [VIEWER] is available. |
639 | [MESSAGE] | 639 | [MESSAGE] |
640 | This update is not required, but we suggest you install it to improve performance and stability. | 640 | This update is not required, but we suggest you install it to improve performance and stability. |
641 | </message> | 641 | </message> |
@@ -648,7 +648,7 @@ This update is not required, but we suggest you install it to improve performanc | |||
648 | </alert> | 648 | </alert> |
649 | <alert modal="true" name="DownloadMacMandatory"> | 649 | <alert modal="true" name="DownloadMacMandatory"> |
650 | <message name="message"> | 650 | <message name="message"> |
651 | A new version of [SECOND_LIFE] is available. | 651 | A new version of [VIEWER] is available. |
652 | [MESSAGE] | 652 | [MESSAGE] |
653 | You must download this update to use [SECOND_LIFE]. | 653 | You must download this update to use [SECOND_LIFE]. |
654 | 654 | ||
@@ -663,7 +663,7 @@ Download to your Applications folder? | |||
663 | </alert> | 663 | </alert> |
664 | <alert modal="true" name="DownloadMac"> | 664 | <alert modal="true" name="DownloadMac"> |
665 | <message name="message"> | 665 | <message name="message"> |
666 | An updated version of [SECOND_LIFE] is available. | 666 | An updated version of [VIEWER] is available. |
667 | [MESSAGE] | 667 | [MESSAGE] |
668 | This update is not required, but we suggest you install it to improve performance and stability. | 668 | This update is not required, but we suggest you install it to improve performance and stability. |
669 | 669 | ||
@@ -678,7 +678,7 @@ Download to your Applications folder? | |||
678 | </alert> | 678 | </alert> |
679 | <alert modal="true" name="DownloadMacReleaseForDownload"> | 679 | <alert modal="true" name="DownloadMacReleaseForDownload"> |
680 | <message name="message"> | 680 | <message name="message"> |
681 | An updated version of [SECOND_LIFE] is available. | 681 | An updated version of [VIEWER] is available. |
682 | [MESSAGE] | 682 | [MESSAGE] |
683 | This update is not required, but we suggest you install it to improve performance and stability. | 683 | This update is not required, but we suggest you install it to improve performance and stability. |
684 | 684 | ||
@@ -1861,7 +1861,7 @@ Default: off | |||
1861 | </alert> | 1861 | </alert> |
1862 | <alert modal="true" name="VoiceVersionMismatch" title="Voice Version Mismatch"> | 1862 | <alert modal="true" name="VoiceVersionMismatch" title="Voice Version Mismatch"> |
1863 | <message name="message"> | 1863 | <message name="message"> |
1864 | This version of Second Life is not compatible with the Voice Chat feature in this region. In order for Voice Chat to function correctly you will need to update Second Life. | 1864 | This version of [SECOND_LIFE] is not compatible with the Voice Chat feature in this region. In order for Voice Chat to function correctly you will need to update [SECOND_LIFE]. |
1865 | </message> | 1865 | </message> |
1866 | </alert> | 1866 | </alert> |
1867 | <alert modal="true" name="HelpEstateCovenant" title="Estate Covenant"> | 1867 | <alert modal="true" name="HelpEstateCovenant" title="Estate Covenant"> |
@@ -2100,7 +2100,7 @@ will only work if a script is added with a money() event. | |||
2100 | </alert> | 2100 | </alert> |
2101 | <alert modal="true" name="WebLaunchAccountHistory"> | 2101 | <alert modal="true" name="WebLaunchAccountHistory"> |
2102 | <message name="message"> | 2102 | <message name="message"> |
2103 | Go to the Second Life web site to see your account history? | 2103 | Go to the [SECOND_LIFE] web site to see your account history? |
2104 | </message> | 2104 | </message> |
2105 | <ignore name="ignore"> | 2105 | <ignore name="ignore"> |
2106 | When loading account history web page | 2106 | When loading account history web page |
@@ -2114,10 +2114,10 @@ will only work if a script is added with a money() event. | |||
2114 | </alert> | 2114 | </alert> |
2115 | <alert modal="true" name="ClickOpenF1Help"> | 2115 | <alert modal="true" name="ClickOpenF1Help"> |
2116 | <message name="message"> | 2116 | <message name="message"> |
2117 | Visit the Second Life Support Web site? (note: this is not an Imprudence Help site) | 2117 | Visit the [SECOND_LIFE] Support Web site? (note: this is not an Imprudence Help site) |
2118 | </message> | 2118 | </message> |
2119 | <ignore name="ignore"> | 2119 | <ignore name="ignore"> |
2120 | When visiting the Second Life Support Website. | 2120 | When visiting the [SECOND_LIFE] Support Website. |
2121 | </ignore> | 2121 | </ignore> |
2122 | <option name="Gotopage"> | 2122 | <option name="Gotopage"> |
2123 | Go | 2123 | Go |
@@ -2145,7 +2145,7 @@ will only work if a script is added with a money() event. | |||
2145 | Are you sure you want to quit? | 2145 | Are you sure you want to quit? |
2146 | </message> | 2146 | </message> |
2147 | <ignore name="ignore"> | 2147 | <ignore name="ignore"> |
2148 | When Quitting Second Life. | 2148 | When Quitting |
2149 | </ignore> | 2149 | </ignore> |
2150 | <option name="Quit"> | 2150 | <option name="Quit"> |
2151 | Quit | 2151 | Quit |
@@ -2185,9 +2185,9 @@ rules of this region as outlined in the estate Covenant. | |||
2185 | About Land.) | 2185 | About Land.) |
2186 | 2186 | ||
2187 | The resolution of this report applies only to this Region; | 2187 | The resolution of this report applies only to this Region; |
2188 | Residents access to other areas of Second Life will not be | 2188 | Residents access to other areas of [SECOND_LIFE] will not be |
2189 | affected by the outcome of this report. Only Linden Lab can | 2189 | affected by the outcome of this report. Only Linden Lab can |
2190 | restrict access to the entirety of Second Life. | 2190 | restrict access to the entirety of [SECOND_LIFE]. |
2191 | </message> | 2191 | </message> |
2192 | </alert> | 2192 | </alert> |
2193 | <alert modal="true" name="HelpReportBug"> | 2193 | <alert modal="true" name="HelpReportBug"> |
@@ -2264,9 +2264,9 @@ Entering an accurate description helps us file and process bug reports. | |||
2264 | 2264 | ||
2265 | You appear to be reporting intellectual property infringement. Please make sure you are reporting it correctly: | 2265 | You appear to be reporting intellectual property infringement. Please make sure you are reporting it correctly: |
2266 | 2266 | ||
2267 | (1) The Abuse Process. You may submit an abuse report if you believe a Resident is exploiting the Second Life permissions system, for example, by using CopyBot or similar copying tools, to infringe intellectual property rights. The Abuse Team investigates and issues appropriate disciplinary action for behavior that violates the Second Life Community Standards or Terms of Service. However, the Abuse Team does not handle and will not respond to requests to remove content from the Second Life world. | 2267 | (1) The Abuse Process. You may submit an abuse report if you believe a Resident is exploiting the [SECOND_LIFE] permissions system, for example, by using CopyBot or similar copying tools, to infringe intellectual property rights. The Abuse Team investigates and issues appropriate disciplinary action for behavior that violates the [SECOND_LIFE] Community Standards or Terms of Service. However, the Abuse Team does not handle and will not respond to requests to remove content from the [SECOND_LIFE] world. |
2268 | 2268 | ||
2269 | (2) The DMCA or Content Removal Process. To request removal of content from Second Life, you MUST submit a valid notification of infringement as provided in our DMCA Policy at http://secondlife.com/corporate/dmca.php. | 2269 | (2) The DMCA or Content Removal Process. To request removal of content from [SECOND_LIFE], you MUST submit a valid notification of infringement as provided in our DMCA Policy at http://secondlife.com/corporate/dmca.php. |
2270 | 2270 | ||
2271 | If you still wish to continue with the abuse process, please close this window and finish submitting your report. You may need to select the specific category 'CopyBot or Permissions Exploit'. | 2271 | If you still wish to continue with the abuse process, please close this window and finish submitting your report. You may need to select the specific category 'CopyBot or Permissions Exploit'. |
2272 | 2272 | ||
@@ -2487,7 +2487,7 @@ Click "Advanced Water" to bring up an editor with more advanced settin | |||
2487 | </alert> | 2487 | </alert> |
2488 | <alert modal="true" name="HelpDayCycle"> | 2488 | <alert modal="true" name="HelpDayCycle"> |
2489 | <message name="message"> | 2489 | <message name="message"> |
2490 | The Day Cycle Editor gives you control over the sky during Second Life's day/night cycle. This is the cycle that is used by the Basic Environment Editor's Time of Day slider. | 2490 | The Day Cycle Editor gives you control over the sky during [SECOND_LIFE]'s day/night cycle. This is the cycle that is used by the Basic Environment Editor's Time of Day slider. |
2491 | 2491 | ||
2492 | The Day Cycle Editor works by setting keyframes. These are nodes (represented by the gray blips on the time graph) that have Sky Presets associated with them. As the Time of Day progresses, the WindLight sky "animates" as it interpolates between these keyframes. | 2492 | The Day Cycle Editor works by setting keyframes. These are nodes (represented by the gray blips on the time graph) that have Sky Presets associated with them. As the Time of Day progresses, the WindLight sky "animates" as it interpolates between these keyframes. |
2493 | 2493 | ||
@@ -2632,7 +2632,7 @@ with the the D slider. | |||
2632 | </alert> | 2632 | </alert> |
2633 | <alert modal="true" name="HelpClassicClouds"> | 2633 | <alert modal="true" name="HelpClassicClouds"> |
2634 | <message name="message"> | 2634 | <message name="message"> |
2635 | Check this box to enable rendering of Second Life's older classic clouds in addition to WindLight's clouds. | 2635 | Check this box to enable rendering of [SECOND_LIFE]'s older classic clouds in addition to WindLight's clouds. |
2636 | </message> | 2636 | </message> |
2637 | </alert> | 2637 | </alert> |
2638 | <alert modal="true" name="HelpWaterFogColor"> | 2638 | <alert modal="true" name="HelpWaterFogColor"> |
@@ -2801,7 +2801,7 @@ they are part of an attachment. | |||
2801 | </alert> | 2801 | </alert> |
2802 | <alert modal="true" name="BadURL"> | 2802 | <alert modal="true" name="BadURL"> |
2803 | <message name="message"> | 2803 | <message name="message"> |
2804 | Second Life doesn't know how to handle the link: | 2804 | Imprudence doesn't know how to handle the link: |
2805 | [SLURL] | 2805 | [SLURL] |
2806 | Most links are similar to this: | 2806 | Most links are similar to this: |
2807 | 2807 | ||
@@ -2814,7 +2814,7 @@ Please check the spelling and try again. | |||
2814 | <alert modal="true" name="NotAgeVerified"> | 2814 | <alert modal="true" name="NotAgeVerified"> |
2815 | <message name="message"> | 2815 | <message name="message"> |
2816 | You need to be age-verified in order to access this parcel. | 2816 | You need to be age-verified in order to access this parcel. |
2817 | Would you like to visit the Second Life website to verify your age? | 2817 | Would you like to visit the [SECOND_LIFE] website to verify your age? |
2818 | 2818 | ||
2819 | [_URL] | 2819 | [_URL] |
2820 | </message> | 2820 | </message> |
@@ -2834,7 +2834,7 @@ Would you like to visit the Second Life website to verify your age? | |||
2834 | <alert modal="true" name="Cannot enter parcel: no payment info on file"> | 2834 | <alert modal="true" name="Cannot enter parcel: no payment info on file"> |
2835 | <message name="message"> | 2835 | <message name="message"> |
2836 | This parcel requires that you have payment information on file before you can access it. | 2836 | This parcel requires that you have payment information on file before you can access it. |
2837 | Would you like to visit the Second Life website to set this up? | 2837 | Would you like to visit the [SECOND_LIFE] website to set this up? |
2838 | 2838 | ||
2839 | [_URL] | 2839 | [_URL] |
2840 | </message> | 2840 | </message> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml index e86bf71..a21887f 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_chat_history.xml | |||
@@ -102,7 +102,7 @@ | |||
102 | <string name="gesture_label">Gestures</string> | 102 | <string name="gesture_label">Gestures</string> |
103 | <spinner bottom="-22" decimal_digits="0" follows="left|bottom" height="20" | 103 | <spinner bottom="-22" decimal_digits="0" follows="left|bottom" height="20" |
104 | increment="1.00" initial_val="0" label="Channel" label_width="50" left="0" | 104 | increment="1.00" initial_val="0" label="Channel" label_width="50" left="0" |
105 | max_val="2147483647" min_val="0" mouse_opaque="true" name="channel_control" | 105 | max_val="1000000" min_val="0" mouse_opaque="true" name="channel_control" |
106 | width="100" tool_tip="Set the default channel for inworld chat"/> | 106 | width="100" tool_tip="Set the default channel for inworld chat"/> |
107 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" | 107 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="0" |
108 | enabled="true" follows="left|right|bottom" font="SansSerif" | 108 | enabled="true" follows="left|right|bottom" font="SansSerif" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml index 57f955f..8dfd43c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | |||
@@ -1,107 +1,24 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true" | 2 | |
3 | can_tear_off="false" follows="top|right" height="455" min_height="400" min_width="240" | 3 | <floater name="minimap" short_title="Mini-Map" |
4 | name="minimap" rect_control="FloaterMiniMapRect" width="200" short_title="Mini-Map"> | 4 | height="455" width="200" min_height="400" min_width="240" |
5 | follows="top|right" can_close="true" can_drag_on_left="false" | ||
6 | can_minimize="true" can_resize="true" can_tear_off="false" | ||
7 | rect_control="FloaterMiniMapRect"> | ||
5 | 8 | ||
6 | <panel label="Mini Map" name="mini_mapview" | 9 | <panel label="Mini Map" name="mini_mapview" |
7 | top="-2" left="2" bottom="196" right="196" | 10 | top="-2" left="2" bottom="196" right="196" |
8 | follows="left|top|right|bottom" mouse_opaque="false" /> | 11 | follows="left|top|right|bottom" mouse_opaque="false" /> |
9 | 12 | ||
13 | <!-- Note: panel contents are defined in panel_radar.xml --> | ||
10 | <panel name="RadarPanel" label="Radar" | 14 | <panel name="RadarPanel" label="Radar" |
11 | background_visible="true" bg_alpha_color="NetMapBackgroundColor" | ||
12 | left="2" top="196" right="196" height="120" | 15 | left="2" top="196" right="196" height="120" |
13 | follows="left|right|bottom" border="false" mouse_opaque="true"> | 16 | follows="left|right|bottom" /> |
17 | |||
18 | <button name="toggle_radar" label="" | ||
19 | bottom="202" left="10" height="18" width="18" | ||
20 | follows="left|bottom" halign="center" | ||
21 | font="SansSerif" scale_image="true" | ||
22 | tool_tip="Show or hide the radar" /> | ||
14 | 23 | ||
15 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
16 | bottom="-20" drop_shadow_visible="true" follows="left|top" | ||
17 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="10" | ||
18 | mouse_opaque="true" name="lblAvatarCount" v_pad="0" | ||
19 | width="220"> | ||
20 | 0 | ||
21 | </text> | ||
22 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
23 | bottom="-20" drop_shadow_visible="true" follows="left|top" | ||
24 | font="SansSerifSmall" h_pad="0" halign="left" height="16" left="27" | ||
25 | mouse_opaque="true" name="avatars_in" v_pad="0" | ||
26 | width="220"> | ||
27 | Avatars in | ||
28 | </text> | ||
29 | <slider bottom_delta="0" left_delta="55" follows="left|top" width="110" height="15" | ||
30 | name="near_me_range" label="" control_name="NearMeRange" | ||
31 | min_val="5" max_val="512" increment="1" initial_val="96" decimal_digits="0" /> | ||
32 | <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
33 | bottom_delta="0" left="190" drop_shadow_visible="true" follows="left|top" | ||
34 | font="SansSerifSmall" h_pad="0" halign="left" height="15" | ||
35 | mouse_opaque="true" name="meters" v_pad="0" | ||
36 | width="40"> | ||
37 | m | ||
38 | </text> | ||
39 | <tab_container border="false" bottom_delta="-176" height="172" left="0" mouse_opaque="false" | ||
40 | name="button_container" tab_position="top" follows="left|right|bottom" width="198"> | ||
41 | <panel border="true" bottom="-180" follows="left|top|right|bottom" height="160" | ||
42 | label="Avatars" left="1" mouse_opaque="true" name="avatar_tab" width="198"> | ||
43 | <button bottom="-25" follows="top|right" height="22" label="IM/Call" | ||
44 | left="-85" name="im_btn" tool_tip="Open Instant Message session" | ||
45 | width="80" /> | ||
46 | <button bottom_delta="-25" follows="top|right" height="22" label="Profile" | ||
47 | left_delta="0" name="profile_btn" | ||
48 | tool_tip="Show picture, groups, and other information" width="80" /> | ||
49 | <button bottom_delta="-25" follows="top|right" height="22" label="Teleport..." | ||
50 | left_delta="0" name="offer_teleport_btn" | ||
51 | tool_tip="Offer this friend a teleport to your current location" width="80" /> | ||
52 | <button bottom_delta="-25" follows="top|right" height="22" label="Track" | ||
53 | left_delta="0" name="track_btn" | ||
54 | tool_tip="Create a beacon to track friends you can map" width="80" /> | ||
55 | <button bottom_delta="-25" follows="top|right" height="22" label="Invite..." | ||
56 | left_delta="0" name="invite_btn" | ||
57 | tool_tip="Remove this person from your friends list" width="80" /> | ||
58 | <button bottom_delta="-25" follows="top|right" height="22" label="Add..." | ||
59 | left_delta="0" name="add_btn" tool_tip="Offer friendship to a resident" | ||
60 | width="80" /> | ||
61 | </panel> | ||
62 | <panel border="true" bottom="-160" follows="left|top|right|bottom" height="160" | ||
63 | label="Estate" left="1" mouse_opaque="true" name="estate_tab" width="198"> | ||
64 | <button bottom="-25" follows="top|right" height="22" label="Freeze..." | ||
65 | left="-85" name="freeze_btn" tool_tip="" | ||
66 | width="80" /> | ||
67 | <button bottom_delta="-25" follows="top|right" height="22" label="Eject..." | ||
68 | left_delta="0" name="eject_btn" | ||
69 | tool_tip="" width="80" /> | ||
70 | <button bottom_delta="-25" follows="top|right" height="22" label="Mute..." | ||
71 | left_delta="0" name="mute_btn" | ||
72 | tool_tip="" width="80" /> | ||
73 | <button bottom_delta="0" follows="top|right" height="22" label="Unmute..." | ||
74 | left_delta="0" name="unmute_btn" | ||
75 | tool_tip="" width="80" /> | ||
76 | <button bottom_delta="-25" follows="top|right" height="22" label="Report..." | ||
77 | left_delta="0" name="ar_btn" | ||
78 | tool_tip="" width="80" /> | ||
79 | <button bottom_delta="-25" follows="top|right" height="22" label="Kick..." | ||
80 | left_delta="0" name="estate_eject_btn" tool_tip="" | ||
81 | width="80" /> | ||
82 | </panel> | ||
83 | </tab_container> | ||
84 | <scroll_list bottom="-190" width="104" height="143" left="4" | ||
85 | follows="left|bottom|right" draw_border="false" draw_heading="true" | ||
86 | draw_stripes="true" column_padding="5" sort_column="1" mouse_opaque="true" | ||
87 | background_visible="true" multi_select="false" name="RadarList"> | ||
88 | <column name="avatar_name" label="Name" dynamicwidth="true" /> | ||
89 | <column name="avatar_distance" label="Dist." width="48" /> | ||
90 | </scroll_list> | ||
91 | </panel> | ||
92 | <string name="no_one_near"> | ||
93 | No avatars within range | ||
94 | </string> | ||
95 | <string name="is_muted"> | ||
96 | (muted) | ||
97 | </string> | ||
98 | <string name="is_typing"> | ||
99 | (typing) | ||
100 | </string> | ||
101 | <string name="entering_chat_range"> | ||
102 | [NAME] has entered chat range ([DISTANCE]m) | ||
103 | </string> | ||
104 | <string name="entering_sim_range"> | ||
105 | [NAME] has entered the sim ([DISTANCE]m) | ||
106 | </string> | ||
107 | </floater> | 24 | </floater> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 24270d9..3db4084 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | |||
@@ -77,10 +77,6 @@ | |||
77 | userdata="" /> | 77 | userdata="" /> |
78 | </menu_item_call> | 78 | </menu_item_call> |
79 | <menu_item_separator /> | 79 | <menu_item_separator /> |
80 | <menu_item_call name="Logout" label="Logout" | ||
81 | shortcut="control|alt|Q"> | ||
82 | <on_click function="File.Logout" userdata="" /> | ||
83 | </menu_item_call> | ||
84 | <menu_item_call name="Quit" label="Quit" | 80 | <menu_item_call name="Quit" label="Quit" |
85 | shortcut="control|Q"> | 81 | shortcut="control|Q"> |
86 | <on_click function="File.Quit" userdata="" /> | 82 | <on_click function="File.Quit" userdata="" /> |
@@ -2011,6 +2007,16 @@ | |||
2011 | <on_click function="Advanced.ToggleClothingFloater" | 2007 | <on_click function="Advanced.ToggleClothingFloater" |
2012 | userdata="" /> | 2008 | userdata="" /> |
2013 | </menu_item_check> | 2009 | </menu_item_check> |
2010 | <menu_item_check name="Allow Multiple Instances" | ||
2011 | label="Allow Multiple Instances"> | ||
2012 | <on_click function="Advanced.ToggleMultipleViewers" | ||
2013 | userdata="" /> | ||
2014 | <on_check function="Advanced.CheckMultipleViewers" | ||
2015 | userdata="" /> | ||
2016 | </menu_item_check> | ||
2017 | <menu_item_call name="Logout" label="Logout (unstable)"> | ||
2018 | <on_click function="File.Logout" userdata="" /> | ||
2019 | </menu_item_call> | ||
2014 | <menu_item_call name="Debug Settings" | 2020 | <menu_item_call name="Debug Settings" |
2015 | label="Debug Settings"> | 2021 | label="Debug Settings"> |
2016 | <on_click function="Advanced.ShowDebugSettings" | 2022 | <on_click function="Advanced.ShowDebugSettings" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/notify.xml b/linden/indra/newview/skins/default/xui/en-us/notify.xml index dd03a32..f1a1955 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notify.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notify.xml | |||
@@ -908,7 +908,7 @@ until the flexible checkbox is unchecked. | |||
908 | <notify name="FirstDebugMenus" tip="false"> | 908 | <notify name="FirstDebugMenus" tip="false"> |
909 | <message name="message"> | 909 | <message name="message"> |
910 | You have enabled the Advanced menu. | 910 | You have enabled the Advanced menu. |
911 | This menu contains features useful for developers debugging Second Life. | 911 | This menu contains features useful for developers debugging Imprudence. |
912 | To toggle this menu on Windows press Ctrl-Alt-D. On Mac press Cmd-Opt-Shift-D. | 912 | To toggle this menu on Windows press Ctrl-Alt-D. On Mac press Cmd-Opt-Shift-D. |
913 | </message> | 913 | </message> |
914 | </notify> | 914 | </notify> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml index ac3a74a..35883ee 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml | |||
@@ -10,7 +10,7 @@ | |||
10 | tool_tip="Click here to see what has been said" width="93" /> | 10 | tool_tip="Click here to see what has been said" width="93" /> |
11 | <spinner bottom="-24" decimal_digits="0" follows="left|bottom" height="20" | 11 | <spinner bottom="-24" decimal_digits="0" follows="left|bottom" height="20" |
12 | increment="1.00" initial_val="0" label="Channel" label_width="50" left="107" | 12 | increment="1.00" initial_val="0" label="Channel" label_width="50" left="107" |
13 | max_val="2147483647" min_val="0" mouse_opaque="true" name="channel_control" | 13 | max_val="1000000" min_val="0" mouse_opaque="true" name="channel_control" |
14 | width="100" tool_tip="Set the default channel for inworld chat"/> | 14 | width="100" tool_tip="Set the default channel for inworld chat"/> |
15 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-23" | 15 | <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-23" |
16 | follows="left|right|bottom" font="SansSerif" | 16 | follows="left|right|bottom" font="SansSerif" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml index c215e3c..79f775b 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_input.xml | |||
@@ -86,4 +86,41 @@ | |||
86 | <button bottom_delta="-30" follows="left|top" font="SansSerif" height="20" | 86 | <button bottom_delta="-30" follows="left|top" font="SansSerif" height="20" |
87 | label="Joystick Setup" left_delta="0" mouse_opaque="true" | 87 | label="Joystick Setup" left_delta="0" mouse_opaque="true" |
88 | name="joystick_setup_button" width="155" /> | 88 | name="joystick_setup_button" width="155" /> |
89 | |||
90 | |||
91 | <text name="double_click_action_label" | ||
92 | bottom_delta="-32" left="10" height="18" width="200" | ||
93 | follows="left|top" font="SansSerifSmall" mouse_opaque="true"> | ||
94 | Double-Click Action: | ||
95 | </text> | ||
96 | |||
97 | <combo_box name="double_click_action" | ||
98 | bottom_delta="0" left_delta="138" height="18" width="150" | ||
99 | follows="left|top" mouse_opaque="true"> | ||
100 | <combo_item name="None" value="None"> | ||
101 | None | ||
102 | </combo_item> | ||
103 | <combo_item name="Go" value="Go"> | ||
104 | Autopilot | ||
105 | </combo_item> | ||
106 | </combo_box> | ||
107 | |||
108 | |||
109 | <text name="go_action_label" | ||
110 | bottom_delta="-20" left="10" height="18" width="200" | ||
111 | follows="left|top" font="SansSerifSmall" mouse_opaque="true"> | ||
112 | Autopilot Style: | ||
113 | </text> | ||
114 | |||
115 | <combo_box name="go_action" | ||
116 | bottom_delta="0" left_delta="138" height="18" width="150" | ||
117 | follows="left|top" mouse_opaque="true"> | ||
118 | <combo_item name="Move" value="Move"> | ||
119 | Move | ||
120 | </combo_item> | ||
121 | <combo_item name="Teleport" value="Teleport"> | ||
122 | Teleport | ||
123 | </combo_item> | ||
124 | </combo_box> | ||
125 | |||
89 | </panel> | 126 | </panel> |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml new file mode 100644 index 0000000..2d50bc0 --- /dev/null +++ b/linden/indra/newview/skins/default/xui/en-us/panel_radar.xml | |||
@@ -0,0 +1,144 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
2 | |||
3 | <!-- Note: panel rect (size) is specified in floater_mini_map.xml --> | ||
4 | |||
5 | <panel name="RadarPanel" label="Radar" | ||
6 | background_visible="true" bg_alpha_color="NetMapBackgroundColor" | ||
7 | border="false" mouse_opaque="true"> | ||
8 | |||
9 | <string name="no_one_near"> | ||
10 | No avatars within range | ||
11 | </string> | ||
12 | <string name="is_muted"> | ||
13 | (muted) | ||
14 | </string> | ||
15 | <string name="is_typing"> | ||
16 | (typing) | ||
17 | </string> | ||
18 | <string name="entering_chat_range"> | ||
19 | [NAME] has entered chat range ([DISTANCE]m) | ||
20 | </string> | ||
21 | <string name="entering_sim_range"> | ||
22 | [NAME] has entered the sim ([DISTANCE]m) | ||
23 | </string> | ||
24 | |||
25 | <text name="lblAvatarCount" | ||
26 | bottom="-20" left="10" height="16" width="220" | ||
27 | h_pad="0" halign="left" v_pad="0" follows="left|top" | ||
28 | bg_visible="false" border_drop_shadow_visible="false" | ||
29 | border_visible="false" drop_shadow_visible="true" | ||
30 | font="SansSerifSmall" mouse_opaque="true"> | ||
31 | 0 | ||
32 | </text> | ||
33 | |||
34 | <text name="avatars_in" | ||
35 | bottom="-20" left="27" height="16" width="220" | ||
36 | h_pad="0" halign="left" v_pad="0" | ||
37 | bg_visible="false" border_drop_shadow_visible="false" | ||
38 | border_visible="false" drop_shadow_visible="true" follows="left|top" | ||
39 | font="SansSerifSmall" mouse_opaque="true" > | ||
40 | Avatars in | ||
41 | </text> | ||
42 | |||
43 | <slider name="near_me_range" label="" control_name="NearMeRange" | ||
44 | bottom_delta="0" left_delta="55" width="110" height="15" | ||
45 | follows="left|top" min_val="5" max_val="512" increment="1" | ||
46 | initial_val="96" decimal_digits="0" /> | ||
47 | |||
48 | <text name="meters" | ||
49 | bottom_delta="0" left="190" height="15" width="40" | ||
50 | h_pad="0" halign="left" v_pad="0" follows="left|top" | ||
51 | bg_visible="false" border_drop_shadow_visible="false" | ||
52 | border_visible="false" drop_shadow_visible="true" | ||
53 | font="SansSerifSmall" mouse_opaque="true"> | ||
54 | m | ||
55 | </text> | ||
56 | |||
57 | <tab_container name="buttons_container" | ||
58 | bottom="1" left="0" right="0" height="172" | ||
59 | follows="left|right|bottom" border="false" | ||
60 | mouse_opaque="false" tab_position="top"> | ||
61 | |||
62 | <panel name="avatar_tab" label="Avatars" | ||
63 | bottom="-180" left="1" height="160" width="198" | ||
64 | follows="left|top|right|bottom" | ||
65 | border="true" mouse_opaque="true"> | ||
66 | |||
67 | <button name="im_btn" label="IM/Call" | ||
68 | bottom="-25" left="-85" height="22" width="80" | ||
69 | follows="top|right" | ||
70 | tool_tip="Open Instant Message session" /> | ||
71 | |||
72 | <button name="profile_btn" label="Profile" | ||
73 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
74 | follows="top|right" | ||
75 | tool_tip="Show picture, groups, and other information" /> | ||
76 | |||
77 | <button name="offer_teleport_btn" label="Teleport..." | ||
78 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
79 | follows="top|right" | ||
80 | tool_tip="Offer to teleport this person to your location" /> | ||
81 | |||
82 | <button name="track_btn" label="Track" | ||
83 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
84 | follows="top|right" | ||
85 | tool_tip="Create a beacon to track friends you can map" /> | ||
86 | |||
87 | <button name="invite_btn" label="Invite..." | ||
88 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
89 | follows="top|right" | ||
90 | tool_tip="Remove this person from your friends list" /> | ||
91 | |||
92 | <button name="add_btn" label="Add..." | ||
93 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
94 | follows="top|right" | ||
95 | tool_tip="Offer friendship to a resident" /> | ||
96 | |||
97 | </panel> | ||
98 | |||
99 | <panel name="estate_tab" label="Estate" | ||
100 | bottom="-160" left="1" height="160" width="198" | ||
101 | follows="left|top|right|bottom" | ||
102 | border="true" mouse_opaque="true"> | ||
103 | |||
104 | <button name="freeze_btn" label="Freeze..." | ||
105 | bottom="-25" left="-85" height="22" width="80" | ||
106 | follows="top|right" tool_tip="" /> | ||
107 | |||
108 | <button name="eject_btn" label="Eject..." | ||
109 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
110 | follows="top|right" tool_tip="" /> | ||
111 | |||
112 | <button name="mute_btn" label="Mute..." | ||
113 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
114 | follows="top|right" tool_tip="" /> | ||
115 | |||
116 | <button name="unmute_btn" label="Unmute..." | ||
117 | bottom_delta="0" left_delta="0" height="22" width="80" | ||
118 | follows="top|right" tool_tip="" /> | ||
119 | |||
120 | <button name="ar_btn" label="Report..." | ||
121 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
122 | follows="top|right" tool_tip="" /> | ||
123 | |||
124 | <button name="estate_eject_btn" label="Kick..." | ||
125 | bottom_delta="-25" left_delta="0" height="22" width="80" | ||
126 | follows="top|right" tool_tip="" /> | ||
127 | |||
128 | </panel> | ||
129 | </tab_container> | ||
130 | |||
131 | <scroll_list name="RadarList" | ||
132 | bottom="6" left="4" right="-92" height="146" | ||
133 | follows="left|bottom|right" | ||
134 | draw_border="false" draw_heading="true" | ||
135 | draw_stripes="true" background_visible="true" | ||
136 | column_padding="5" sort_column="1" multi_select="false" | ||
137 | mouse_opaque="true" > | ||
138 | |||
139 | <column name="avatar_name" label="Name" dynamicwidth="true" /> | ||
140 | <column name="avatar_distance" label="Dist." width="48" /> | ||
141 | </scroll_list> | ||
142 | |||
143 | </panel> | ||
144 | |||
diff --git a/linden/indra/newview/skins/default/xui/es/alerts.xml b/linden/indra/newview/skins/default/xui/es/alerts.xml index 9552091..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/es/alerts.xml +++ b/linden/indra/newview/skins/default/xui/es/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/fr/alerts.xml b/linden/indra/newview/skins/default/xui/fr/alerts.xml index 9552091..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/fr/alerts.xml +++ b/linden/indra/newview/skins/default/xui/fr/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/fr/notify.xml b/linden/indra/newview/skins/default/xui/fr/notify.xml index 5c1c092..128e4bd 100644 --- a/linden/indra/newview/skins/default/xui/fr/notify.xml +++ b/linden/indra/newview/skins/default/xui/fr/notify.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <notifications> | 2 | <notifications> |
3 | </notifications> | 3 | </notifications> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/ja/alerts.xml b/linden/indra/newview/skins/default/xui/ja/alerts.xml index 2c3c306..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/ja/alerts.xml +++ b/linden/indra/newview/skins/default/xui/ja/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/ja/notify.xml b/linden/indra/newview/skins/default/xui/ja/notify.xml index 969117f..128e4bd 100644 --- a/linden/indra/newview/skins/default/xui/ja/notify.xml +++ b/linden/indra/newview/skins/default/xui/ja/notify.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <notifications> | 2 | <notifications> |
3 | </notifications> | 3 | </notifications> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/ko/alerts.xml b/linden/indra/newview/skins/default/xui/ko/alerts.xml index 2c3c306..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/ko/alerts.xml +++ b/linden/indra/newview/skins/default/xui/ko/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/ko/notify.xml b/linden/indra/newview/skins/default/xui/ko/notify.xml index 969117f..128e4bd 100644 --- a/linden/indra/newview/skins/default/xui/ko/notify.xml +++ b/linden/indra/newview/skins/default/xui/ko/notify.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <notifications> | 2 | <notifications> |
3 | </notifications> | 3 | </notifications> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/pt/alerts.xml b/linden/indra/newview/skins/default/xui/pt/alerts.xml index 9552091..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/pt/alerts.xml +++ b/linden/indra/newview/skins/default/xui/pt/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/pt/notify.xml b/linden/indra/newview/skins/default/xui/pt/notify.xml index 5c1c092..128e4bd 100644 --- a/linden/indra/newview/skins/default/xui/pt/notify.xml +++ b/linden/indra/newview/skins/default/xui/pt/notify.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <notifications> | 2 | <notifications> |
3 | </notifications> | 3 | </notifications> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/zh/alerts.xml b/linden/indra/newview/skins/default/xui/zh/alerts.xml index 2c3c306..a2a9032 100644 --- a/linden/indra/newview/skins/default/xui/zh/alerts.xml +++ b/linden/indra/newview/skins/default/xui/zh/alerts.xml | |||
@@ -1,4 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <alerts> | 2 | <alerts> |
3 | </alerts> | 3 | </alerts> |
4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> \ No newline at end of file | 4 | <!-- This file is no longer used. Please see notifications.xml and make your changes there. --> |
diff --git a/linden/indra/newview/skins/default/xui/zh/menu_pie_land.xml b/linden/indra/newview/skins/default/xui/zh/menu_pie_land.xml index 9e4c108..fb420b8 100644 --- a/linden/indra/newview/skins/default/xui/zh/menu_pie_land.xml +++ b/linden/indra/newview/skins/default/xui/zh/menu_pie_land.xml | |||
@@ -1,11 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes" ?> |
2 | <pie_menu name="Land Pie"> | 2 | <pie_menu name="Land Pie"> |
3 | <menu_item_call label="关于土地..." name="About Land..." /> | 3 | <menu_item_call label="关于土地..." name="About Land..." /> |
4 | <menu_item_call label="创建" name="Create" /> | 4 | <menu_item_call label="创建" name="Create" /> |
5 | <menu_item_call label="去这里" name="Go Here" /> | 5 | <menu_item_call label="去这里" name="Go Here" /> |
6 | <menu_item_call label="坐在这里" name="Sit Here" /> | 6 | <menu_item_call label="坐在这里" name="Sit Here" /> |
7 | <menu_item_call label="购买通行证" name="Land Buy Pass" /> | 7 | <menu_item_call label="购买通行证" name="Land Buy Pass" /> |
8 | <menu_item_call label="编辑地形" name="Edit Terrain" /> | 8 | <menu_item_call label="编辑地形" name="Edit Terrain" /> |
9 | <menu_item_call label="购买土地..." name="Land Buy" /> | 9 | <menu_item_call label="购买土地..." name="Land Buy" /> |
10 | </pie_menu> | 10 | </pie_menu> |
11 | <!-- Translated for Second Life 1.19.0 (80267) --> \ No newline at end of file | 11 | <!-- Translated for Second Life 1.19.0 (80267) --> \ No newline at end of file |
diff --git a/linden/indra/newview/skins/default/xui/zh/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/zh/menu_pie_object.xml index 1e6e9a5..0a43667 100644 --- a/linden/indra/newview/skins/default/xui/zh/menu_pie_object.xml +++ b/linden/indra/newview/skins/default/xui/zh/menu_pie_object.xml | |||
@@ -1,30 +1,30 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes"?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes"?> |
2 | <pie_menu name="Object Pie"> | 2 | <pie_menu name="Object Pie"> |
3 | <menu_item_call label="打开" name="Open"/> | 3 | <menu_item_call label="打开" name="Open"/> |
4 | <menu_item_call label="创造" name="Create"/> | 4 | <menu_item_call label="创造" name="Create"/> |
5 | <menu_item_call label="触摸" name="Object Touch"> | 5 | <menu_item_call label="触摸" name="Object Touch"> |
6 | <on_enable userdata="触摸" name="EnableTouch"/> | 6 | <on_enable userdata="触摸" name="EnableTouch"/> |
7 | </menu_item_call> | 7 | </menu_item_call> |
8 | <menu_item_call label="坐在这里" name="Object Sit"> | 8 | <menu_item_call label="坐在这里" name="Object Sit"> |
9 | <on_enable userdata="坐在这里,起身" name="EnableSitOrStand"/> | 9 | <on_enable userdata="坐在这里,起身" name="EnableSitOrStand"/> |
10 | </menu_item_call> | 10 | </menu_item_call> |
11 | <menu_item_call label="拿走" name="Pie Object Take"> | 11 | <menu_item_call label="拿走" name="Pie Object Take"> |
12 | <on_enable userdata="购买,拿走" name="EnableBuyOrTake"/> | 12 | <on_enable userdata="购买,拿走" name="EnableBuyOrTake"/> |
13 | </menu_item_call> | 13 | </menu_item_call> |
14 | <menu_item_call label="付款..." name="Pay..."/> | 14 | <menu_item_call label="付款..." name="Pay..."/> |
15 | <pie_menu label="更多 >" name="More >"> | 15 | <pie_menu label="更多 >" name="More >"> |
16 | <menu_item_call label="删除" name="Delete"/> | 16 | <menu_item_call label="删除" name="Delete"/> |
17 | <menu_item_call label="穿上" name="Wear"/> | 17 | <menu_item_call label="穿上" name="Wear"/> |
18 | <menu_item_call label="拿走副本" name="Take Copy"/> | 18 | <menu_item_call label="拿走副本" name="Take Copy"/> |
19 | <pie_menu label="装上到HUD >" name="Object Attach HUD"/> | 19 | <pie_menu label="装上到HUD >" name="Object Attach HUD"/> |
20 | <pie_menu label="装备到>" name="Object Attach"/> | 20 | <pie_menu label="装备到>" name="Object Attach"/> |
21 | <menu_item_call label="归还..." name="Return..."/> | 21 | <menu_item_call label="归还..." name="Return..."/> |
22 | <pie_menu label="更多 >" name="Rate Menu"> | 22 | <pie_menu label="更多 >" name="Rate Menu"> |
23 | <menu_item_call label="报告..." name="Report Abuse..."/> | 23 | <menu_item_call label="报告..." name="Report Abuse..."/> |
24 | <menu_item_call label="屏蔽" name="Object Mute"/> | 24 | <menu_item_call label="屏蔽" name="Object Mute"/> |
25 | <menu_item_call label="审查" name="Object Inspect"/> | 25 | <menu_item_call label="审查" name="Object Inspect"/> |
26 | </pie_menu> | 26 | </pie_menu> |
27 | <menu_item_call label="购买..." name="Buy..."/> | 27 | <menu_item_call label="购买..." name="Buy..."/> |
28 | </pie_menu> | 28 | </pie_menu> |
29 | <menu_item_call label="编辑..." name="Edit..."/> | 29 | <menu_item_call label="编辑..." name="Edit..."/> |
30 | </pie_menu> | 30 | </pie_menu> |
diff --git a/linden/indra/newview/skins/default/xui/zh/menu_viewer.xml b/linden/indra/newview/skins/default/xui/zh/menu_viewer.xml index 85036c1..44b0fae 100644 --- a/linden/indra/newview/skins/default/xui/zh/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/zh/menu_viewer.xml | |||
@@ -1,204 +1,204 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" standalone="yes"?> | 1 | <?xml version="1.0" encoding="utf-8" standalone="yes"?> |
2 | <menu_bar name="Main Menu"> | 2 | <menu_bar name="Main Menu"> |
3 | <menu label="文件" name="File"> | 3 | <menu label="文件" name="File"> |
4 | <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/> | 4 | <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/> |
5 | <menu label="上传" name="upload"> | 5 | <menu label="上传" name="upload"> |
6 | <menu_item_call label="图像(L$[COST])..." name="Upload Image"/> | 6 | <menu_item_call label="图像(L$[COST])..." name="Upload Image"/> |
7 | <menu_item_call label="声音(L$[COST])..." name="Upload Sound"/> | 7 | <menu_item_call label="声音(L$[COST])..." name="Upload Sound"/> |
8 | <menu_item_call label="动画(L$[COST])..." name="Upload Animation"/> | 8 | <menu_item_call label="动画(L$[COST])..." name="Upload Animation"/> |
9 | <menu_item_call label="大宗(每份需付L$[COST])..." name="Bulk Upload"/> | 9 | <menu_item_call label="大宗(每份需付L$[COST])..." name="Bulk Upload"/> |
10 | <menu_item_separator label="-----------" name="separator"/> | 10 | <menu_item_separator label="-----------" name="separator"/> |
11 | <menu_item_call label="设置默认权限..." name="perm prefs"/> | 11 | <menu_item_call label="设置默认权限..." name="perm prefs"/> |
12 | </menu> | 12 | </menu> |
13 | <menu_item_separator label="-----------" name="separator"/> | 13 | <menu_item_separator label="-----------" name="separator"/> |
14 | <menu_item_call label="关闭窗口" name="Close Window"/> | 14 | <menu_item_call label="关闭窗口" name="Close Window"/> |
15 | <menu_item_call label="关闭所有窗口" name="Close All Windows"/> | 15 | <menu_item_call label="关闭所有窗口" name="Close All Windows"/> |
16 | <menu_item_separator label="-----------" name="separator2"/> | 16 | <menu_item_separator label="-----------" name="separator2"/> |
17 | <menu_item_call label="保存材质为..." name="Save Texture As..."/> | 17 | <menu_item_call label="保存材质为..." name="Save Texture As..."/> |
18 | <menu_item_separator label="-----------" name="separator3"/> | 18 | <menu_item_separator label="-----------" name="separator3"/> |
19 | <menu_item_call label="拍摄快照" name="Take Snapshot"/> | 19 | <menu_item_call label="拍摄快照" name="Take Snapshot"/> |
20 | <menu_item_call label="快照存至硬盘" name="Snapshot to Disk"/> | 20 | <menu_item_call label="快照存至硬盘" name="Snapshot to Disk"/> |
21 | <menu_item_separator label="-----------" name="separator4"/> | 21 | <menu_item_separator label="-----------" name="separator4"/> |
22 | <menu_item_call label="退出" name="Quit"/> | 22 | <menu_item_call label="退出" name="Quit"/> |
23 | </menu> | 23 | </menu> |
24 | <menu label="编辑" name="Edit"> | 24 | <menu label="编辑" name="Edit"> |
25 | <menu_item_call label="撤销" name="Undo"/> | 25 | <menu_item_call label="撤销" name="Undo"/> |
26 | <menu_item_call label="重做" name="Redo"/> | 26 | <menu_item_call label="重做" name="Redo"/> |
27 | <menu_item_separator label="-----------" name="separator"/> | 27 | <menu_item_separator label="-----------" name="separator"/> |
28 | <menu_item_call label="剪贴" name="Cut"/> | 28 | <menu_item_call label="剪贴" name="Cut"/> |
29 | <menu_item_call label="复制" name="Copy"/> | 29 | <menu_item_call label="复制" name="Copy"/> |
30 | <menu_item_call label="粘贴" name="Paste"/> | 30 | <menu_item_call label="粘贴" name="Paste"/> |
31 | <menu_item_call label="删除" name="Delete"/> | 31 | <menu_item_call label="删除" name="Delete"/> |
32 | <menu_item_separator label="-----------" name="separator2"/> | 32 | <menu_item_separator label="-----------" name="separator2"/> |
33 | <menu_item_call label="搜索..." name="Search..."/> | 33 | <menu_item_call label="搜索..." name="Search..."/> |
34 | <menu_item_separator label="-----------" name="separator3"/> | 34 | <menu_item_separator label="-----------" name="separator3"/> |
35 | <menu_item_call label="全选" name="Select All"/> | 35 | <menu_item_call label="全选" name="Select All"/> |
36 | <menu_item_call label="取消选定" name="Deselect"/> | 36 | <menu_item_call label="取消选定" name="Deselect"/> |
37 | <menu_item_separator label="-----------" name="separator4"/> | 37 | <menu_item_separator label="-----------" name="separator4"/> |
38 | <menu_item_call label="创建副本" name="Duplicate"/> | 38 | <menu_item_call label="创建副本" name="Duplicate"/> |
39 | <menu_item_separator label="-----------" name="separator5"/> | 39 | <menu_item_separator label="-----------" name="separator5"/> |
40 | <menu label="穿上物体" name="Attach Object"/> | 40 | <menu label="穿上物体" name="Attach Object"/> |
41 | <menu label="卸下物体" name="Detach Object"/> | 41 | <menu label="卸下物体" name="Detach Object"/> |
42 | <menu label="脱下衣着" name="Take Off Clothing"> | 42 | <menu label="脱下衣着" name="Take Off Clothing"> |
43 | <menu_item_call label="衬衣" name="Shirt"/> | 43 | <menu_item_call label="衬衣" name="Shirt"/> |
44 | <menu_item_call label="裤子" name="Pants"/> | 44 | <menu_item_call label="裤子" name="Pants"/> |
45 | <menu_item_call label="鞋子" name="Shoes"/> | 45 | <menu_item_call label="鞋子" name="Shoes"/> |
46 | <menu_item_call label="袜子" name="Socks"/> | 46 | <menu_item_call label="袜子" name="Socks"/> |
47 | <menu_item_call label="夹克" name="Jacket"/> | 47 | <menu_item_call label="夹克" name="Jacket"/> |
48 | <menu_item_call label="手套" name="Gloves"/> | 48 | <menu_item_call label="手套" name="Gloves"/> |
49 | <menu_item_call label="内衣" name="Menu Undershirt"/> | 49 | <menu_item_call label="内衣" name="Menu Undershirt"/> |
50 | <menu_item_call label="内裤" name="Menu Underpants"/> | 50 | <menu_item_call label="内裤" name="Menu Underpants"/> |
51 | <menu_item_call label="裙子" name="Skirt"/> | 51 | <menu_item_call label="裙子" name="Skirt"/> |
52 | <menu_item_call label="所有服饰" name="All Clothes"/> | 52 | <menu_item_call label="所有服饰" name="All Clothes"/> |
53 | </menu> | 53 | </menu> |
54 | <menu_item_separator label="-----------" name="separator6"/> | 54 | <menu_item_separator label="-----------" name="separator6"/> |
55 | <menu_item_call label="动作..." name="Gestures..."/> | 55 | <menu_item_call label="动作..." name="Gestures..."/> |
56 | <menu_item_call label="档案..." name="Profile..."/> | 56 | <menu_item_call label="档案..." name="Profile..."/> |
57 | <menu_item_call label="外观..." name="Appearance..."/> | 57 | <menu_item_call label="外观..." name="Appearance..."/> |
58 | <menu_item_separator label="-----------" name="separator7"/> | 58 | <menu_item_separator label="-----------" name="separator7"/> |
59 | <menu_item_check label="朋友..." name="Friends..."/> | 59 | <menu_item_check label="朋友..." name="Friends..."/> |
60 | <menu_item_call label="社团..." name="Groups..."/> | 60 | <menu_item_call label="社团..." name="Groups..."/> |
61 | <menu_item_separator label="-----------" name="separator8"/> | 61 | <menu_item_separator label="-----------" name="separator8"/> |
62 | <menu_item_call label="参数设置..." name="Preferences..."/> | 62 | <menu_item_call label="参数设置..." name="Preferences..."/> |
63 | </menu> | 63 | </menu> |
64 | <menu label="查看" name="View"> | 64 | <menu label="查看" name="View"> |
65 | <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/> | 65 | <tearoff_menu label="~~~~~~~~~~~" name="~~~~~~~~~~~"/> |
66 | <menu_item_call label="第一人称视角" name="Mouselook"/> | 66 | <menu_item_call label="第一人称视角" name="Mouselook"/> |
67 | <menu_item_check label="建造" name="Build"/> | 67 | <menu_item_check label="建造" name="Build"/> |
68 | <menu_item_check label="三维浏览手柄" name="Joystick Flycam"/> | 68 | <menu_item_check label="三维浏览手柄" name="Joystick Flycam"/> |
69 | <menu_item_call label="重新设置视角" name="Reset View"/> | 69 | <menu_item_call label="重新设置视角" name="Reset View"/> |
70 | <menu_item_call label="查看最后一次聊天者" name="Look at Last Chatter"/> | 70 | <menu_item_call label="查看最后一次聊天者" name="Look at Last Chatter"/> |
71 | <menu_item_separator label="-----------" name="separator"/> | 71 | <menu_item_separator label="-----------" name="separator"/> |
72 | <menu_item_check label="工具栏" name="Toolbar"/> | 72 | <menu_item_check label="工具栏" name="Toolbar"/> |
73 | <menu_item_check label="聊天记录" name="Chat History"/> | 73 | <menu_item_check label="聊天记录" name="Chat History"/> |
74 | <menu_item_check label="即时消息" name="Instant Message"/> | 74 | <menu_item_check label="即时消息" name="Instant Message"/> |
75 | <menu_item_check label="库存" name="Inventory"/> | 75 | <menu_item_check label="库存" name="Inventory"/> |
76 | <menu_item_check label="活跃的说话人" name="Active Speakers"/> | 76 | <menu_item_check label="活跃的说话人" name="Active Speakers"/> |
77 | <menu_item_check label="屏蔽名单" name="Mute List"/> | 77 | <menu_item_check label="屏蔽名单" name="Mute List"/> |
78 | <menu_item_separator label="-----------" name="separator2"/> | 78 | <menu_item_separator label="-----------" name="separator2"/> |
79 | <menu_item_check label="摄像头控制" name="Camera Controls"/> | 79 | <menu_item_check label="摄像头控制" name="Camera Controls"/> |
80 | <menu_item_check label="移动控制" name="Movement Controls"/> | 80 | <menu_item_check label="移动控制" name="Movement Controls"/> |
81 | <menu_item_check label="世界地图" name="World Map"/> | 81 | <menu_item_check label="世界地图" name="World Map"/> |
82 | <menu_item_check label="迷你地图" name="Mini-Map"/> | 82 | <menu_item_check label="迷你地图" name="Mini-Map"/> |
83 | <menu_item_separator label="-----------" name="separator3"/> | 83 | <menu_item_separator label="-----------" name="separator3"/> |
84 | <menu_item_check label="统计条" name="Statistics Bar"/> | 84 | <menu_item_check label="统计条" name="Statistics Bar"/> |
85 | <menu_item_check label="地块边线" name="Property Lines"/> | 85 | <menu_item_check label="地块边线" name="Property Lines"/> |
86 | <menu_item_check label="隔离线" name="Banlines"/> | 86 | <menu_item_check label="隔离线" name="Banlines"/> |
87 | <menu_item_check label="土地所有者" name="Land Owners"/> | 87 | <menu_item_check label="土地所有者" name="Land Owners"/> |
88 | <menu_item_separator label="-----------" name="separator4"/> | 88 | <menu_item_separator label="-----------" name="separator4"/> |
89 | <menu label="悬停提示" name="Hover Tips"> | 89 | <menu label="悬停提示" name="Hover Tips"> |
90 | <menu_item_check label="显示提示" name="Show Tips"/> | 90 | <menu_item_check label="显示提示" name="Show Tips"/> |
91 | <menu_item_separator label="-----------" name="separator"/> | 91 | <menu_item_separator label="-----------" name="separator"/> |
92 | <menu_item_check label="关于土地的提示" name="Land Tips"/> | 92 | <menu_item_check label="关于土地的提示" name="Land Tips"/> |
93 | <menu_item_check label="所有物体的提示" name="Tips On All Objects"/> | 93 | <menu_item_check label="所有物体的提示" name="Tips On All Objects"/> |
94 | </menu> | 94 | </menu> |
95 | <menu_item_check label="高亮透明物体" name="Highlight Transparent"/> | 95 | <menu_item_check label="高亮透明物体" name="Highlight Transparent"/> |
96 | <menu_item_check label="信标" name="beacons"/> | 96 | <menu_item_check label="信标" name="beacons"/> |
97 | <menu_item_check label="隐藏粒子" name="Hide Particles"/> | 97 | <menu_item_check label="隐藏粒子" name="Hide Particles"/> |
98 | <menu_item_check label="显示界面附件" name="Show HUD Attachments"/> | 98 | <menu_item_check label="显示界面附件" name="Show HUD Attachments"/> |
99 | <menu_item_separator label="-----------" name="separator5"/> | 99 | <menu_item_separator label="-----------" name="separator5"/> |
100 | <menu_item_call label="缩小" name="Zoom In"/> | 100 | <menu_item_call label="缩小" name="Zoom In"/> |
101 | <menu_item_call label="默认缩放" name="Zoom Default"/> | 101 | <menu_item_call label="默认缩放" name="Zoom Default"/> |
102 | <menu_item_call label="放大" name="Zoom Out"/> | 102 | <menu_item_call label="放大" name="Zoom Out"/> |
103 | <menu_item_separator label="-----------" name="separator6"/> | 103 | <menu_item_separator label="-----------" name="separator6"/> |
104 | <menu_item_call label="切换全屏状态" name="Toggle Fullscreen"/> | 104 | <menu_item_call label="切换全屏状态" name="Toggle Fullscreen"/> |
105 | <menu_item_call label="设置用户界面尺寸为默认值" name="Set UI Size to Default"/> | 105 | <menu_item_call label="设置用户界面尺寸为默认值" name="Set UI Size to Default"/> |
106 | </menu> | 106 | </menu> |
107 | <menu label="世界" name="World"> | 107 | <menu label="世界" name="World"> |
108 | <menu_item_call label="聊天" name="Chat"/> | 108 | <menu_item_call label="聊天" name="Chat"/> |
109 | <menu_item_check label="总是奔跑" name="Always Run"/> | 109 | <menu_item_check label="总是奔跑" name="Always Run"/> |
110 | <menu_item_check label="飞翔" name="Fly"/> | 110 | <menu_item_check label="飞翔" name="Fly"/> |
111 | <menu_item_separator label="-----------" name="separator"/> | 111 | <menu_item_separator label="-----------" name="separator"/> |
112 | <menu_item_call label="在这里创建地标" name="Create Landmark Here"/> | 112 | <menu_item_call label="在这里创建地标" name="Create Landmark Here"/> |
113 | <menu_item_call label="将家设置到这里" name="Set Home to Here"/> | 113 | <menu_item_call label="将家设置到这里" name="Set Home to Here"/> |
114 | <menu_item_separator label="-----------" name="separator2"/> | 114 | <menu_item_separator label="-----------" name="separator2"/> |
115 | <menu_item_call label="瞬间移动回家" name="Teleport Home"/> | 115 | <menu_item_call label="瞬间移动回家" name="Teleport Home"/> |
116 | <menu_item_separator label="-----------" name="separator3"/> | 116 | <menu_item_separator label="-----------" name="separator3"/> |
117 | <menu_item_call label="设成离开状态" name="Set Away"/> | 117 | <menu_item_call label="设成离开状态" name="Set Away"/> |
118 | <menu_item_call label="设成繁忙状态" name="Set Busy"/> | 118 | <menu_item_call label="设成繁忙状态" name="Set Busy"/> |
119 | <menu_item_call label="停止化身动画" name="Stop Animating My Avatar"/> | 119 | <menu_item_call label="停止化身动画" name="Stop Animating My Avatar"/> |
120 | <menu_item_call label="释放按键" name="Release Keys"/> | 120 | <menu_item_call label="释放按键" name="Release Keys"/> |
121 | <menu_item_separator label="-----------" name="separator4"/> | 121 | <menu_item_separator label="-----------" name="separator4"/> |
122 | <menu_item_call label="帐户历史纪录..." name="Account History..."/> | 122 | <menu_item_call label="帐户历史纪录..." name="Account History..."/> |
123 | <menu_item_call label="管理我的帐户..." name="Manage My Account..."/> | 123 | <menu_item_call label="管理我的帐户..." name="Manage My Account..."/> |
124 | <menu_item_call label="购买 L$..." name="Buy and Sell L$..."/> | 124 | <menu_item_call label="购买 L$..." name="Buy and Sell L$..."/> |
125 | <menu_item_separator label="-----------" name="separator5"/> | 125 | <menu_item_separator label="-----------" name="separator5"/> |
126 | <menu_item_call label="我的土地..." name="My Land..."/> | 126 | <menu_item_call label="我的土地..." name="My Land..."/> |
127 | <menu_item_call label="关于土地..." name="About Land..."/> | 127 | <menu_item_call label="关于土地..." name="About Land..."/> |
128 | <menu_item_call label="购买土地..." name="Buy Land..."/> | 128 | <menu_item_call label="购买土地..." name="Buy Land..."/> |
129 | <menu_item_call label="地区/地产..." name="Region/Estate..."/> | 129 | <menu_item_call label="地区/地产..." name="Region/Estate..."/> |
130 | <menu_item_separator label="-----------" name="separator6"/> | 130 | <menu_item_separator label="-----------" name="separator6"/> |
131 | <menu label="环境设置" name="Environment Settings"> | 131 | <menu label="环境设置" name="Environment Settings"> |
132 | <menu_item_call label="日出" name="Sunrise"/> | 132 | <menu_item_call label="日出" name="Sunrise"/> |
133 | <menu_item_call label="中午" name="Noon"/> | 133 | <menu_item_call label="中午" name="Noon"/> |
134 | <menu_item_call label="日落" name="Sunset" shortcut="control|shift|N"/> | 134 | <menu_item_call label="日落" name="Sunset" shortcut="control|shift|N"/> |
135 | <menu_item_call label="半夜" name="Midnight"/> | 135 | <menu_item_call label="半夜" name="Midnight"/> |
136 | <menu_item_call label="恢复地区默认值" name="Revert to Region Default"/> | 136 | <menu_item_call label="恢复地区默认值" name="Revert to Region Default"/> |
137 | <menu_item_call label="环境编辑器" name="Environment Editor"/> | 137 | <menu_item_call label="环境编辑器" name="Environment Editor"/> |
138 | </menu> | 138 | </menu> |
139 | </menu> | 139 | </menu> |
140 | <menu label="工具" name="Tools"> | 140 | <menu label="工具" name="Tools"> |
141 | <menu label="选择工具" name="Select Tool"> | 141 | <menu label="选择工具" name="Select Tool"> |
142 | <menu_item_call label="焦点" name="Focus"/> | 142 | <menu_item_call label="焦点" name="Focus"/> |
143 | <menu_item_call label="移动" name="Move"/> | 143 | <menu_item_call label="移动" name="Move"/> |
144 | <menu_item_call label="编辑" name="Edit"/> | 144 | <menu_item_call label="编辑" name="Edit"/> |
145 | <menu_item_call label="创造" name="Create"/> | 145 | <menu_item_call label="创造" name="Create"/> |
146 | <menu_item_call label="土地" name="Land"/> | 146 | <menu_item_call label="土地" name="Land"/> |
147 | </menu> | 147 | </menu> |
148 | <menu_item_separator label="-----------" name="separator"/> | 148 | <menu_item_separator label="-----------" name="separator"/> |
149 | <menu_item_check label="只选择我的物体" name="Select Only My Objects"/> | 149 | <menu_item_check label="只选择我的物体" name="Select Only My Objects"/> |
150 | <menu_item_check label="只选择可移动的物体" name="Select Only Movable Objects"/> | 150 | <menu_item_check label="只选择可移动的物体" name="Select Only Movable Objects"/> |
151 | <menu_item_check label="选中包围区域" name="Select By Surrounding"/> | 151 | <menu_item_check label="选中包围区域" name="Select By Surrounding"/> |
152 | <menu_item_check label="显示隐藏的选中项" name="Show Hidden Selection"/> | 152 | <menu_item_check label="显示隐藏的选中项" name="Show Hidden Selection"/> |
153 | <menu_item_check label="显示选择项的光照半径" name="Show Light Radius for Selection"/> | 153 | <menu_item_check label="显示选择项的光照半径" name="Show Light Radius for Selection"/> |
154 | <menu_item_check label="显示选择导引" name="Show Selection Beam"/> | 154 | <menu_item_check label="显示选择导引" name="Show Selection Beam"/> |
155 | <menu_item_separator label="-----------" name="separator2"/> | 155 | <menu_item_separator label="-----------" name="separator2"/> |
156 | <menu_item_check label="对齐到网格" name="Snap to Grid"/> | 156 | <menu_item_check label="对齐到网格" name="Snap to Grid"/> |
157 | <menu_item_call label="在 XY 面上对齐网格" name="Snap Object XY to Grid"/> | 157 | <menu_item_call label="在 XY 面上对齐网格" name="Snap Object XY to Grid"/> |
158 | <menu_item_call label="以选项作为网格" name="Use Selection for Grid"/> | 158 | <menu_item_call label="以选项作为网格" name="Use Selection for Grid"/> |
159 | <menu_item_call label="网格选项..." name="Grid Options..."/> | 159 | <menu_item_call label="网格选项..." name="Grid Options..."/> |
160 | <menu_item_separator label="-----------" name="separator3"/> | 160 | <menu_item_separator label="-----------" name="separator3"/> |
161 | <menu_item_check label="编辑链接部件" name="Edit Linked Parts" shortcut=""/> | 161 | <menu_item_check label="编辑链接部件" name="Edit Linked Parts" shortcut=""/> |
162 | <menu_item_call label="链接" name="Link"/> | 162 | <menu_item_call label="链接" name="Link"/> |
163 | <menu_item_call label="解除链接" name="Unlink"/> | 163 | <menu_item_call label="解除链接" name="Unlink"/> |
164 | <menu_item_separator label="-----------" name="separator4"/> | 164 | <menu_item_separator label="-----------" name="separator4"/> |
165 | <menu_item_call label="聚焦于所选物体" name="Focus on Selection"/> | 165 | <menu_item_call label="聚焦于所选物体" name="Focus on Selection"/> |
166 | <menu_item_call label="缩放到所选物体" name="Zoom to Selection"/> | 166 | <menu_item_call label="缩放到所选物体" name="Zoom to Selection"/> |
167 | <menu_item_call label="购买物体" name="Menu Object Take"> | 167 | <menu_item_call label="购买物体" name="Menu Object Take"> |
168 | <on_enable userdata="购买,拿走" name="EnableBuyOrTake"/> | 168 | <on_enable userdata="购买,拿走" name="EnableBuyOrTake"/> |
169 | </menu_item_call> | 169 | </menu_item_call> |
170 | <menu_item_call label="拿走副本" name="Take Copy"/> | 170 | <menu_item_call label="拿走副本" name="Take Copy"/> |
171 | <menu_item_call label="将物体存回至物体内容" name="Save Object Back to Object Contents"/> | 171 | <menu_item_call label="将物体存回至物体内容" name="Save Object Back to Object Contents"/> |
172 | <menu_item_separator label="-----------" name="separator6"/> | 172 | <menu_item_separator label="-----------" name="separator6"/> |
173 | <menu_item_call label="显示脚本警告/错误窗口" name="Show Script Warning/Error Window"/> | 173 | <menu_item_call label="显示脚本警告/错误窗口" name="Show Script Warning/Error Window"/> |
174 | <menu label="重新编译所选项中脚本为" name="Recompile Scripts in Selection"> | 174 | <menu label="重新编译所选项中脚本为" name="Recompile Scripts in Selection"> |
175 | <menu_item_call label="Mono" name="Mono"/> | 175 | <menu_item_call label="Mono" name="Mono"/> |
176 | <menu_item_call label="LSL" name="LSL"/> | 176 | <menu_item_call label="LSL" name="LSL"/> |
177 | </menu> | 177 | </menu> |
178 | <menu_item_call label="重置所选项中脚本" name="Reset Scripts in Selection"/> | 178 | <menu_item_call label="重置所选项中脚本" name="Reset Scripts in Selection"/> |
179 | <menu_item_call label="设置所选项中脚本运行" name="Set Scripts to Running in Selection"/> | 179 | <menu_item_call label="设置所选项中脚本运行" name="Set Scripts to Running in Selection"/> |
180 | <menu_item_call label="设置所选项中脚本不运行" name="Set Scripts to Not Running in Selection"/> | 180 | <menu_item_call label="设置所选项中脚本不运行" name="Set Scripts to Not Running in Selection"/> |
181 | </menu> | 181 | </menu> |
182 | <menu label="帮助" name="Help"> | 182 | <menu label="帮助" name="Help"> |
183 | <menu_item_call label="第二人生帮助" name="Second Life Help"/> | 183 | <menu_item_call label="第二人生帮助" name="Second Life Help"/> |
184 | <menu_item_call label="教程" name="Tutorial"/> | 184 | <menu_item_call label="教程" name="Tutorial"/> |
185 | <menu_item_separator label="-----------" name="separator"/> | 185 | <menu_item_separator label="-----------" name="separator"/> |
186 | <menu_item_call label="官方林登博客..." name="Official Linden Blog..."/> | 186 | <menu_item_call label="官方林登博客..." name="Official Linden Blog..."/> |
187 | <menu_item_separator label="-----------" name="separator2"/> | 187 | <menu_item_separator label="-----------" name="separator2"/> |
188 | <menu_item_call label="脚本 Wiki 门户..." name="Scripting Portal..."/> | 188 | <menu_item_call label="脚本 Wiki 门户..." name="Scripting Portal..."/> |
189 | <menu_item_separator label="-----------" name="separator3"/> | 189 | <menu_item_separator label="-----------" name="separator3"/> |
190 | <menu_item_call label="报告不良行为..." name="Report Abuse..."/> | 190 | <menu_item_call label="报告不良行为..." name="Report Abuse..."/> |
191 | <menu_item_call label="颠簸,推动和碰撞..." name="Bumps, Pushes &amp; Hits..."/> | 191 | <menu_item_call label="颠簸,推动和碰撞..." name="Bumps, Pushes &amp; Hits..."/> |
192 | <menu_item_call label="延迟计量器" name="Lag Meter"/> | 192 | <menu_item_call label="延迟计量器" name="Lag Meter"/> |
193 | <menu create_jump_keys="true" drop_shadow="true" label="错误汇报" name="Bug Reporting" opaque="true" tear_off="true"> | 193 | <menu create_jump_keys="true" drop_shadow="true" label="错误汇报" name="Bug Reporting" opaque="true" tear_off="true"> |
194 | <menu_item_call label="公开 Issue Tracker..." name="Public Issue Tracker..."/> | 194 | <menu_item_call label="公开 Issue Tracker..." name="Public Issue Tracker..."/> |
195 | <menu_item_call label="公开 Issue Tracker 帮助..." name="Publc Issue Tracker Help..."/> | 195 | <menu_item_call label="公开 Issue Tracker 帮助..." name="Publc Issue Tracker Help..."/> |
196 | <menu_item_separator label="-----------" name="separator7"/> | 196 | <menu_item_separator label="-----------" name="separator7"/> |
197 | <menu_item_call label="Bug报告 101..." name="Bug Reporing 101..."/> | 197 | <menu_item_call label="Bug报告 101..." name="Bug Reporing 101..."/> |
198 | <menu_item_call label="安全问题..." name="Security Issues..."/> | 198 | <menu_item_call label="安全问题..." name="Security Issues..."/> |
199 | <menu_item_call label="质量保证 Wiki..." name="QA Wiki..."/> | 199 | <menu_item_call label="质量保证 Wiki..." name="QA Wiki..."/> |
200 | <menu_item_call label="汇报错误..." name="Report Bug..."/> | 200 | <menu_item_call label="汇报错误..." name="Report Bug..."/> |
201 | </menu> | 201 | </menu> |
202 | <menu_item_call label="关于第二人生..." name="About Second Life..."/> | 202 | <menu_item_call label="关于第二人生..." name="About Second Life..."/> |
203 | </menu> | 203 | </menu> |
204 | </menu_bar> | 204 | </menu_bar> |
diff --git a/linden/indra/newview/viewer_manifest.py b/linden/indra/newview/viewer_manifest.py index 76a176d..f57b3b8 100755 --- a/linden/indra/newview/viewer_manifest.py +++ b/linden/indra/newview/viewer_manifest.py | |||
@@ -824,10 +824,26 @@ class Linux_i686Manifest(LinuxManifest): | |||
824 | self.path("libSDL-1.2.so.0") | 824 | self.path("libSDL-1.2.so.0") |
825 | self.path("libELFIO.so") | 825 | self.path("libELFIO.so") |
826 | self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") | 826 | self.path("libopenjpeg.so.1.3.0", "libopenjpeg.so.1.3") |
827 | self.path("libz.so.1") | ||
827 | 828 | ||
829 | # OpenAL | ||
828 | self.path("libopenal.so.1") | 830 | self.path("libopenal.so.1") |
829 | self.path("libalut.so.0") | 831 | self.path("libalut.so.0") |
830 | 832 | ||
833 | # GTK+ and dependencies | ||
834 | self.path("libatk-1.0.so.0") | ||
835 | self.path("libcairo.so.2") | ||
836 | self.path("libfontconfig.so.1") | ||
837 | self.path("libfreetype.so.6") | ||
838 | self.path("libgdk_pixbuf-2.0.so.0") | ||
839 | self.path("libgdk-x11-2.0.so.0") | ||
840 | self.path("libgtk-x11-2.0.so.0") | ||
841 | self.path("libpango-1.0.so.0") | ||
842 | self.path("libpangoft2-1.0.so.0") | ||
843 | self.path("libpangox-1.0.so.0") | ||
844 | self.path("libpangoxft-1.0.so.0") | ||
845 | self.path("libpixman-1.so.0") | ||
846 | |||
831 | # Gstreamer libs | 847 | # Gstreamer libs |
832 | self.path("libgstbase-0.10.so.0") | 848 | self.path("libgstbase-0.10.so.0") |
833 | self.path("libgstreamer-0.10.so.0") | 849 | self.path("libgstreamer-0.10.so.0") |