diff --git a/README_BUILD_FIRESTORM_WIN64.txt b/README_BUILD_FIRESTORM_WIN64.txt index c51b63b310..890593ee9a 100755 --- a/README_BUILD_FIRESTORM_WIN64.txt +++ b/README_BUILD_FIRESTORM_WIN64.txt @@ -21,5 +21,4 @@ Configure/build is nearly the same as building a 32 bit version. autobuild -m64 configure -c ReleaseFS -- --package autobuild -m64 build -c ReleaseFS --no_configure -The resulting installer/exe gets created in build-vc100_x64/newview/Release - +The resulting installer/exe gets created in build-vc100_x64/newview/Release. diff --git a/autobuild.xml b/autobuild.xml index c25833802f..29e32bbbdf 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -37,6 +37,18 @@ name linux + linux64 + + archive + + hash + f787b5b8e4b7fcba36602565cc5d8fe0 + url + http://downloads.firestormviewer.org/installables/glod-1.0pre4-linux-x64-20131227.tar.bz2 + + name + linux64 + windows archive @@ -117,6 +129,18 @@ name linux + linux64 + + archive + + hash + 4551308262b8d24f6d8dab7d8d690d5d + url + http://downloads.firestormviewer.org/installables/SDL-1.2.14-linux-x64-20131228.tar.bz2 + + name + linux64 + apr_suite @@ -153,6 +177,18 @@ name linux + linux64 + + archive + + hash + 16d9fbbc89d821d19a2fb2ed96b61913 + url + http://downloads.firestormviewer.org/installables/apr_suite-1.4.5-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -201,6 +237,18 @@ name linux + linux64 + + archive + + hash + 691aa373708bdf72b1153893f7578dd8 + url + http://downloads.firestormviewer.org/installables/ares-1.10.0-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -249,6 +297,18 @@ name linux + linux64 + + archive + + hash + 01a37a2400190d73638ec404d3aef065 + url + http://downloads.firestormviewer.org/installables/boost-1.52.0-linux-x64-20131214.tar.bz2 + + name + linux64 + windows archive @@ -297,6 +357,18 @@ name linux + linux64 + + archive + + hash + 7553b62c7ca7df04fa25fb70430c79d6 + url + http://downloads.firestormviewer.org/installables/colladadom-2.2-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -345,6 +417,18 @@ name linux + linux64 + + archive + + hash + e381b2c553d338c97266b98362160051 + url + http://downloads.firestormviewer.org/installables/curl-7.24.0-linux-x64-20131214.tar.bz2 + + name + linux64 + windows archive @@ -381,6 +465,18 @@ name linux + linux64 + + archive + + hash + 5590bab38ac57703252e3d425739fc2f + url + http://downloads.firestormviewer.org/installables/db-5.1.25-linux-x64-20131215.tar.bz2 + + name + linux64 + dbusglib @@ -405,6 +501,18 @@ name linux + linux64 + + archive + + hash + 02cf031da2eaa733d4458840e9513e88 + url + http://downloads.firestormviewer.org/installables/dbus_glib-0.76-linux-x64-20131215.tar.bz2 + + name + linux64 + dictionaries @@ -441,6 +549,18 @@ name linux + linux64 + + archive + + hash + d1fcbdd80e8748455ba528cbf0514801 + url + http://downloads.firestormviewer.org/installables/dictionaries-1-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -477,6 +597,18 @@ name linux + linux64 + + archive + + hash + 3c0c51c249d0e0320c576ba19e4424bf + url + http://downloads.firestormviewer.org/installables/elfio-1.0.3-linux-x64-20131215.tar.bz2 + + name + linux64 + expat @@ -513,6 +645,18 @@ name linux + linux64 + + archive + + hash + 419103d87bf383fc4e24f6d7a17dc957 + url + http://downloads.firestormviewer.org/installables/expat-2.0.1-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -561,6 +705,18 @@ name linux + linux64 + + archive + + hash + 5178792b004a3617598b0593cacb23b5 + url + file:///opt/firestorm/fmodex-4.44.32-linux-20140407.tar.bz2 + + name + linux64 + windows archive @@ -597,6 +753,18 @@ name linux + linux64 + + archive + + hash + cde73209ae2a74d1fa2dcc4b70db6e67 + url + http://downloads.firestormviewer.org/installables/fontconfig-2.8.0-linux-x64-20131216.tar.bz2 + + name + linux64 + freeglut @@ -657,6 +825,18 @@ name linux + linux64 + + archive + + hash + 6f59fd0dc976a12f3053d0ea8371438e + url + http://downloads.firestormviewer.org/installables/freetype-2.4.11-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -693,6 +873,18 @@ name linux + linux64 + + archive + + hash + ea2524f19d53c12645413543930731b0 + url + http://downloads.firestormviewer.org/installables/glext-68-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -741,6 +933,18 @@ name linux + linux64 + + archive + + hash + 31211ab614a1b8f634615194ab7f2360 + url + http://downloads.firestormviewer.org/installables/glh_linear-0.0.0-linux-x64-20131213.tar.bz2 + + name + linux64 + windows archive @@ -825,6 +1029,18 @@ name linux + linux64 + + archive + + hash + b497e91203227c236f291c8cc83a5076 + url + http://downloads.firestormviewer.org/installables/google_breakpad-0.0.0-rev1099-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -873,6 +1089,18 @@ name linux + linux64 + + archive + + hash + 8aae0c236af596e794fe009f344b3d3b + url + http://downloads.firestormviewer.org/installables/gmock-1.6.0-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -909,6 +1137,18 @@ name linux + linux64 + + archive + + hash + cac55fe6c0069fd8209ab48a6c8372c2 + url + http://downloads.firestormviewer.org/installables/gperftools-2.0-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -945,6 +1185,18 @@ name linux + linux64 + + archive + + hash + 9ffe8e4a52f425fc951200e8689b5cdf + url + http://downloads.firestormviewer.org/installables/gstreamer-0.10.28-linux-x64-20131223.tar.bz2 + + name + linux64 + gtk-atk-pango-glib @@ -969,6 +1221,18 @@ name linux + linux64 + + archive + + hash + 0c5990879c99cb5aad9c89862c8c2203 + url + http://downloads.firestormviewer.org/installables/gtk-atk-pango-glib-linux-x64-20131223.tar.bz2 + + name + linux64 + windows archive @@ -1065,6 +1329,18 @@ name linux + linux64 + + archive + + hash + cbf3fde6c5a9567813c591d399e69f11 + url + http://downloads.firestormviewer.org/installables/jpeglib-8c-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -1113,6 +1389,18 @@ name linux + linux64 + + archive + + hash + 4e56cf7e6dafcd124c09d70c7ab47cd2 + url + http://downloads.firestormviewer.org/installables/jsoncpp-0.5.0-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -1161,6 +1449,18 @@ name linux + linux64 + + archive + + hash + 03350c4f0aa32e56bba4979b598a6fc2 + url + file:///opt/firestorm/kdu-7.3.2-linux-20131204.tar.bz2 + + name + linux64 + windows archive @@ -1257,6 +1557,18 @@ name linux + linux64 + + archive + + hash + 0b4442ab57af206253c47876a0220c63 + url + http://downloads.firestormviewer.org/installables/libhunspell-1.3.2-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -1305,6 +1617,18 @@ name linux + linux64 + + archive + + hash + bac1f696d942610da5c8d371f1c51703 + url + http://downloads.firestormviewer.org/installables/libpng-1.5.1-linux-x64-20131220.tar.bz2 + + name + linux64 + windows archive @@ -1341,6 +1665,18 @@ name linux + linux64 + + archive + + hash + 4729178d1d0bdc9c7d1d1c66712e9646 + url + http://downloads.firestormviewer.org/installables/uuid-1.6.2-linux-x64-20131215.tar.bz2 + + name + linux64 + libxml @@ -1365,6 +1701,18 @@ name linux + linux64 + + archive + + hash + 819bf22602afa1fbbfef3bb067d21069 + url + http://downloads.firestormviewer.org/installables/libxml2-2.7.8-linux-x64-20131212.tar.bz2 + + name + linux64 + llappearanceutility-source @@ -1531,6 +1879,18 @@ name linux + linux64 + + archive + + hash + fcd1bf2c028592c91a6f28e7238fd0c1 + url + http://downloads.firestormviewer.org/installables/llqtwebkit-4.7.1-linux-x64-20131227.tar.bz2 + + name + linux64 + windows archive @@ -1603,6 +1963,18 @@ name linux + linux64 + + archive + + hash + 351ebe8e638cea6f6c3dd85dd0b5b00c + url + http://downloads.firestormviewer.org/installables/ndPhysicsStub-1.0-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -1651,6 +2023,18 @@ name linux + linux64 + + archive + + hash + 016f6f2fa3dcc616f67749f2bf0ef201 + url + http://downloads.firestormviewer.org/installables/libndofdev-0.3-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -1723,6 +2107,18 @@ name linux + linux64 + + archive + + hash + 7af891ac1fb52d0c43b0a466d1d2b2d5 + url + http://downloads.firestormviewer.org/installables/ogg_vorbis-1.2.2-1.3.2-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -1771,6 +2167,18 @@ name linux + linux64 + + archive + + hash + 0b26c12dd20aa928453ee18f4793a2dd + url + http://downloads.firestormviewer.org/installables/openssl-1.0.1g-linux-x64-20140417.tar.bz2 + + name + linux64 + windows archive @@ -1809,6 +2217,18 @@ name linux + linux64 + + archive + + hash + bcb331520266fbb2b581aaf7d0d8e9fa + url + http://downloads.firestormviewer.org/installables/openal-1.12.854-1.1.0-linux-x64-20131215.tar.bz2 + + name + linux64 + windows archive @@ -1859,6 +2279,18 @@ name linux + linux64 + + archive + + hash + 6ac7d355ad071e9dca55b403397c3ff9 + url + http://downloads.firestormviewer.org/installables/openjpeg-1.4-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -1907,6 +2339,18 @@ name linux + linux64 + + archive + + hash + c31f766db43797f9e95995819ebc36e6 + url + http://downloads.firestormviewer.org/installables/pcre-8.32-linux-x64-20131212.tar.bz2 + + name + linux64 + quicktime @@ -1987,6 +2431,18 @@ name linux + linux64 + + archive + + hash + 957773fff7148ffaca42b1ea4a18d192 + url + http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-slvoice/rev/270512/arch/Linux/installer/slvoice-4.5.0009.17865-linux-20130216.tar.bz2 + + name + linux64 + windows archive @@ -2023,6 +2479,18 @@ name common + linux64 + + archive + + hash + 130be9c2677de96b1013cde9b0920b06 + url + http://downloads.firestormviewer.org/installables/tut-2008-11-30-linux-x64-20131212.tar.bz2 + + name + linux64 + wix @@ -2079,6 +2547,18 @@ name linux + linux64 + + archive + + hash + 7c5937ee2795f27a27dba687cc9305ee + url + http://downloads.firestormviewer.org/installables/xmlrpc_epi-0.54.1-linux-x64-20131212.tar.bz2 + + name + linux64 + windows archive @@ -2127,6 +2607,18 @@ name linux + linux64 + + archive + + hash + 2907cfba7436c417aeeb89fe94acee02 + url + http://downloads.firestormviewer.org/installables/zlib-1.2.6-linux-x64-20131216.tar.bz2 + + name + linux64 + windows archive diff --git a/indra/Version b/indra/Version index 46c7f4b92b..dfa13b1e4e 100644 --- a/indra/Version +++ b/indra/Version @@ -1 +1 @@ -VERSION_VIEWER=4.6.2 +VERSION_VIEWER=4.6.6 diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 7b5c50beef..279bb46f32 100755 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -249,7 +249,7 @@ if (LINUX) # this stops us requiring a really recent glibc at runtime add_definitions(-fno-stack-protector) # linking can be very memory-hungry, especially the final viewer link - set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory -Wl,--build-id") + set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory -Wl,--build-id -Wl,-rpath,'$ORIGIN:$ORIGIN/../lib'") endif (NOT STANDALONE) # Enable AVX optimizations if requested and at least GCC 4.6. diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index ac0cbde253..e59d1cae45 100755 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -30,14 +30,26 @@ macro (use_prebuilt_binary _binary) endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + if (ND_BUILD64BIT_ARCH) + if (LINUX) + set(autobuild_install_platform "--platform=linux64") + endif (LINUX) + if (DARWIN) + set(autobuild_install_platform "") + endif (DARWIN) + if (WINDOWS) + set(autobuild_install_platform "") + endif (WINDOWS) + endif (ND_BUILD64BIT_ARCH) if(DEBUG_PREBUILT) - message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install + message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install ${autobuild_install_platform} --install-dir=${AUTOBUILD_INSTALL_DIR} --skip-license-check ${_binary} ") endif(DEBUG_PREBUILT) execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" install + ${autobuild_install_platform} --install-dir=${AUTOBUILD_INSTALL_DIR} --skip-license-check ${_binary} diff --git a/indra/llmath/lloctree.h b/indra/llmath/lloctree.h index d4aa7fc35c..e2187ed24c 100755 --- a/indra/llmath/lloctree.h +++ b/indra/llmath/lloctree.h @@ -36,6 +36,8 @@ extern U32 gOctreeMaxCapacity; +extern float gOctreeMinSize; + /*#define LL_OCTREE_PARANOIA_CHECK 0 #if LL_DARWIN #define LL_OCTREE_MAX_CAPACITY 32 @@ -106,6 +108,7 @@ public: : mParent((oct_node*)parent), mOctant(octant) { + llassert(size[0] >= gOctreeMinSize*0.5f); //always keep a NULL terminated list to avoid out of bounds exceptions in debug builds mData.push_back(NULL); mDataEnd = &mData[0]; @@ -213,7 +216,7 @@ public: F32 size = mSize[0]; F32 p_size = size * 2.f; - return (radius <= 0.001f && size <= 0.001f) || + return (radius <= gOctreeMinSize && size <= gOctreeMinSize) || (radius <= p_size && radius > size); } @@ -319,7 +322,7 @@ public: //is it here? if (isInside(data->getPositionGroup())) { - if (((getElementCount() < gOctreeMaxCapacity && contains(data->getBinRadius())) || + if (((getElementCount() < gOctreeMaxCapacity || getSize()[0] <= gOctreeMinSize) && contains(data->getBinRadius()) || (data->getBinRadius() > getSize()[0] && parent && parent->getElementCount() >= gOctreeMaxCapacity))) { //it belongs here mData.push_back(NULL); @@ -356,8 +359,9 @@ public: LLVector4a val; val.setSub(center, getCenter()); val.setAbs(val); - - S32 lt = val.lessThan(LLVector4a::getEpsilon()).getGatheredBits() & 0x7; + LLVector4a min_diff(gOctreeMinSize); + + S32 lt = val.lessThan(min_diff).getGatheredBits() & 0x7; if( lt == 0x7 ) { @@ -389,6 +393,7 @@ public: } #endif + llassert(size[0] >= gOctreeMinSize*0.5f); //make the new kid child = new LLOctreeNode(center, size, this); addChild(child); @@ -798,6 +803,8 @@ public: this->setSize(size2); this->updateMinMax(); + llassert(size[0] >= gOctreeMinSize); + //copy our children to a new branch LLOctreeNode* newnode = new LLOctreeNode(center, size, this); diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 9749cbbe8a..81dd74f365 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -170,6 +170,11 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa return LLModel::BAD_ELEMENT; } + if (!pos_source) + { + llwarns << "Unable to process mesh without position data; invalid model; invalid model." << llendl; + return LLModel::BAD_ELEMENT; + } domPRef p = tri->getP(); domListOfUInts& idx = p->getValue(); @@ -179,19 +184,22 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa domListOfFloats& tc = tc_source ? tc_source->getFloat_array()->getValue() : dummy ; domListOfFloats& n = norm_source ? norm_source->getFloat_array()->getValue() : dummy ; - if (pos_source) - { - face.mExtents[0].set(v[0], v[1], v[2]); - face.mExtents[1].set(v[0], v[1], v[2]); - } - LLVolumeFace::VertexMapData::PointMap point_map; - + U32 index_count = idx.getCount(); U32 vertex_count = pos_source ? v.getCount() : 0; U32 tc_count = tc_source ? tc.getCount() : 0; U32 norm_count = norm_source ? n.getCount() : 0; + if (vertex_count == 0) + { + llwarns << "Unable to process mesh with empty position array; invalid model." << llendl; + return LLModel::BAD_ELEMENT; + } + + face.mExtents[0].set(v[0], v[1], v[2]); + face.mExtents[1].set(v[0], v[1], v[2]); + for (U32 i = 0; i < index_count; i += idx_stride) { LLVolumeFace::VertexData cv; diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index ca26ca22b3..f62f46d1b0 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1539,8 +1539,8 @@ LIST(APPEND viewer_SOURCE_FILES llleapmotioncontroller.cpp) LIST(APPEND viewer_HEADER_FILES llleapmotioncontroller.h) if (LEAPMOTION) - LIST(APPEND viewer_SOURCE_FILES fsleaptool.cpp fsleapexampletool.cpp ) - LIST(APPEND viewer_HEADER_FILES fsleaptool.h fsleapexampletool.h ) + LIST(APPEND viewer_SOURCE_FILES fsleaptool.cpp fsleapexampletool.cpp fsleapmaniptool.cpp ) + LIST(APPEND viewer_HEADER_FILES fsleaptool.h fsleapexampletool.h fsleapmaniptool.h ) endif (LEAPMOTION) if (DARWIN) diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt index c78c4964ca..ec3f25fb57 100644 --- a/indra/newview/VIEWER_VERSION.txt +++ b/indra/newview/VIEWER_VERSION.txt @@ -1 +1 @@ -4.6.2 +4.6.6 diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 94eee97dcc..1fa749d275 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10321,6 +10321,18 @@ Change of this parameter will affect the layout of buttons in notification toast 0 + OctreeMinimumNodeSize + + Comment + Minimum size of any octree node + Persist + 1 + Type + F32 + Value + 0.01 + + OctreeStaticObjectSizeFactor Comment diff --git a/indra/newview/fs_viewer_manifest.py b/indra/newview/fs_viewer_manifest.py index a32ca30ddd..eacf5348ef 100644 --- a/indra/newview/fs_viewer_manifest.py +++ b/indra/newview/fs_viewer_manifest.py @@ -45,10 +45,14 @@ class FSViewerManifest: def fs_sign_win_binaries( self ): try: - subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com",self.args['configuration']+"\\firestorm-bin.exe"],stderr=subprocess.PIPE,stdout=subprocess.PIPE) - subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com",self.args['configuration']+"\\slplugin.exe"],stderr=subprocess.PIPE,stdout=subprocess.PIPE) - subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com",self.args['configuration']+"\\SLVoice.exe"],stderr=subprocess.PIPE,stdout=subprocess.PIPE) - subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com",self.args['configuration']+"\\"+self.final_exe()],stderr=subprocess.PIPE,stdout=subprocess.PIPE) + subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com","/t","http://timestamp.verisign.com/scripts/timstamp.dll",self.args['configuration']+"\\firestorm-bin.exe"], + stderr=subprocess.PIPE,stdout=subprocess.PIPE) + subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com","/t","http://timestamp.verisign.com/scripts/timstamp.dll",self.args['configuration']+"\\slplugin.exe"], + stderr=subprocess.PIPE,stdout=subprocess.PIPE) + subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com","/t","http://timestamp.verisign.com/scripts/timstamp.dll",self.args['configuration']+"\\SLVoice.exe"], + stderr=subprocess.PIPE,stdout=subprocess.PIPE) + subprocess.check_call(["signtool.exe","sign","/n","Phoenix","/d","Firestorm","/du","http://www.phoenixviewer.com","/t","http://timestamp.verisign.com/scripts/timstamp.dll",self.args['configuration']+"\\"+self.final_exe()], + stderr=subprocess.PIPE,stdout=subprocess.PIPE) except Exception, e: print "Couldn't sign final binary. Tried to sign %s" % self.args['configuration']+"\\"+self.final_exe() diff --git a/indra/newview/fscommon.cpp b/indra/newview/fscommon.cpp index 4673263a29..7f8e18bce7 100644 --- a/indra/newview/fscommon.cpp +++ b/indra/newview/fscommon.cpp @@ -56,6 +56,8 @@ static const std::string LL_SCOUT = "Scout"; static const std::string LL_TESTER = "Tester"; +extern S32 gMaxAgentGroups; + S32 FSCommon::sObjectAddMsg = 0; void reportToNearbyChat(const std::string& message) @@ -338,3 +340,13 @@ bool FSCommon::checkIsActionEnabled(const LLUUID& av_id, EFSRegistrarFunctionAct return false; } +LLSD FSCommon::populateGroupCount() +{ + LLStringUtil::format_map_t args; + S32 groupcount = gAgent.mGroups.count(); + args["[COUNT]"] = llformat("%d", groupcount); + args["[REMAINING]"] = llformat("%d", gMaxAgentGroups - groupcount); + LLUIString groupcountstring = LLTrans::getString((gMaxAgentGroups ? "groupcountstring" : "groupcountunlimitedstring"), args); + return LLSD(groupcountstring); +} + diff --git a/indra/newview/fscommon.h b/indra/newview/fscommon.h index 9f3adf20f1..403fd4c440 100644 --- a/indra/newview/fscommon.h +++ b/indra/newview/fscommon.h @@ -76,6 +76,7 @@ namespace FSCommon extern S32 sObjectAddMsg; bool checkIsActionEnabled(const LLUUID& av_id, EFSRegistrarFunctionActionType); + LLSD populateGroupCount(); }; #endif // FS_COMMON_H diff --git a/indra/newview/fsdata.cpp b/indra/newview/fsdata.cpp index 54768e4dbc..25c07c1a5c 100644 --- a/indra/newview/fsdata.cpp +++ b/indra/newview/fsdata.cpp @@ -759,7 +759,37 @@ LLSD FSData::allowedLogin() } else { - return iter->second; + LLSD block = iter->second; + bool blocked = true; // default is to block all unless there is a gridtype or grids present. + if(block.has("gridtype")) + { + blocked = false; +#ifdef OPENSIM + if ((block["gridtype"].asString() == "opensim") && LLGridManager::getInstance()->isInOpenSim()) + { + return block; + } +#endif + if ((block["gridtype"].asString() == "secondlife") && LLGridManager::getInstance()->isInSecondLife()) + { + return block; + } + } + if(block.has("grids")) + { + blocked = false; + LLSD grids = block["grids"]; + for (LLSD::array_iterator grid_iter = grids.beginArray(); + grid_iter != grids.endArray(); + ++grid_iter) + { + if ((*grid_iter).asString() == LLGridManager::getInstance()->getGrid()) + { + return block; + } + } + } + return blocked ? block : LLSD(); } } diff --git a/indra/newview/fsfloatercontacts.cpp b/indra/newview/fsfloatercontacts.cpp index efa2ae07fe..ce53ffc9bf 100644 --- a/indra/newview/fsfloatercontacts.cpp +++ b/indra/newview/fsfloatercontacts.cpp @@ -51,6 +51,7 @@ #include "llstartup.h" #include "llviewercontrol.h" #include "llvoiceclient.h" +#include "fscommon.h" //Maximum number of people you can select to do an operation on at once. const U32 MAX_FRIEND_SELECT = 20; @@ -171,15 +172,13 @@ void FSFloaterContacts::updateGroupButtons() LLUUID groupId = getCurrentItemID(); bool isGroup = groupId.notNull(); - LLUICtrl* groupcount = mGroupsTab->getChild("groupcount"); - groupcount->setTextArg("[COUNT]", llformat("%d", gAgent.mGroups.count())); - groupcount->setTextArg("[MAX]", llformat("%d", gMaxAgentGroups)); + mGroupsTab->getChild("groupcount")->setValue(FSCommon::populateGroupCount()); getChildView("chat_btn")->setEnabled(isGroup && gAgent.hasPowerInGroup(groupId, GP_SESSION_JOIN)); getChildView("info_btn")->setEnabled(isGroup); getChildView("activate_btn")->setEnabled(groupId != gAgent.getGroupID()); getChildView("leave_btn")->setEnabled(isGroup); - getChildView("create_btn")->setEnabled(gAgent.mGroups.count() < gMaxAgentGroups); + getChildView("create_btn")->setEnabled((!gMaxAgentGroups) || (gAgent.mGroups.count() < gMaxAgentGroups)); getChildView("invite_btn")->setEnabled(isGroup && gAgent.hasPowerInGroup(groupId, GP_MEMBER_INVITE)); } diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index 629760346b..dd3bf18173 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -592,12 +592,19 @@ void FSFloaterIM::updateButtons(bool is_call_started) void FSFloaterIM::changed(U32 mask) { LL_DEBUGS("FSFloaterIM") << "FSFloaterIM::changed(U32 mask)" << LL_ENDL; - getChild("call_btn")->setEnabled(!LLAvatarActions::isFriend(mOtherParticipantUUID)); - // Disable "Teleport" button if friend is offline if(LLAvatarActions::isFriend(mOtherParticipantUUID)) { - getChild("teleport_btn")->setEnabled(LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID)); + bool is_online = LLAvatarTracker::instance().isBuddyOnline(mOtherParticipantUUID); + getChild("teleport_btn")->setEnabled(is_online); + getChild("call_btn")->setEnabled(is_online); + } + else + { + // If friendship dissolved, enable buttons by default because we don't + // know about their online status anymore + getChild("teleport_btn")->setEnabled(TRUE); + getChild("call_btn")->setEnabled(TRUE); } } diff --git a/indra/newview/fsfloaterimcontainer.cpp b/indra/newview/fsfloaterimcontainer.cpp index c76a9b4093..01e9a854d0 100644 --- a/indra/newview/fsfloaterimcontainer.cpp +++ b/indra/newview/fsfloaterimcontainer.cpp @@ -42,6 +42,7 @@ #include "llviewercontrol.h" #include "fsfloaterim.h" #include "llvoiceclient.h" +#include "lltoolbarview.h" static const F32 VOICE_STATUS_UPDATE_INTERVAL = 1.0f; @@ -288,6 +289,15 @@ void FSFloaterIMContainer::setMinimized(BOOL b) } } +void FSFloaterIMContainer::setVisible(BOOL b) +{ + LLMultiFloater::setVisible(b); + + if (b) + { + mFlashingSessions.clear(); + } +} //virtual void FSFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, BOOL has_offline_msg) @@ -309,6 +319,13 @@ void FSFloaterIMContainer::sessionRemoved(const LLUUID& session_id) { iMfloater->closeFloater(); } + + uuid_vec_t::iterator found = std::find(mFlashingSessions.begin(), mFlashingSessions.end(), session_id); + if (found != mFlashingSessions.end()) + { + mFlashingSessions.erase(found); + checkFlashing(); + } } // static @@ -438,4 +455,20 @@ LLFloater* FSFloaterIMContainer::getCurrentVoiceFloater() return NULL; } +void FSFloaterIMContainer::addFlashingSession(const LLUUID& session_id) +{ + uuid_vec_t::iterator found = std::find(mFlashingSessions.begin(), mFlashingSessions.end(), session_id); + if (found == mFlashingSessions.end()) + { + mFlashingSessions.push_back(session_id); + } +} + +void FSFloaterIMContainer::checkFlashing() +{ + if (mFlashingSessions.empty()) + { + gToolBarView->flashCommand(LLCommandId("chat"), false); + } +} // EOF diff --git a/indra/newview/fsfloaterimcontainer.h b/indra/newview/fsfloaterimcontainer.h index d6f1007db0..9d6a413dd7 100644 --- a/indra/newview/fsfloaterimcontainer.h +++ b/indra/newview/fsfloaterimcontainer.h @@ -64,6 +64,7 @@ public: static FSFloaterIMContainer* getInstance(); virtual void setMinimized(BOOL b); + virtual void setVisible(BOOL b); void onNewMessageReceived(const LLSD& data); // public so nearbychat can call it directly. TODO: handle via callback. -AO @@ -76,6 +77,8 @@ public: static void reloadEmptyFloaters(); void initTabs(); + void addFlashingSession(const LLUUID& session_id); + private: enum eVoiceState { @@ -97,6 +100,9 @@ private: typedef std::map avatarID_panel_map_t; avatarID_panel_map_t mSessions; boost::signals2::connection mNewMessageConnection; + + void checkFlashing(); + uuid_vec_t mFlashingSessions; }; #endif // FS_FLOATERIMCONTAINER_H diff --git a/indra/newview/fsfloatersearch.cpp b/indra/newview/fsfloatersearch.cpp index ef9de543e7..77f95a704f 100644 --- a/indra/newview/fsfloatersearch.cpp +++ b/indra/newview/fsfloatersearch.cpp @@ -286,6 +286,12 @@ void FSFloaterSearch::onOpen(const LLSD& key) { mTabContainer->selectTabPanel(mPanelGroups); } + + FSSearchPanelBase* current_panel = dynamic_cast(mTabContainer->getCurrentPanel()); + if (current_panel) + { + current_panel->focusDefaultElement(); + } } //virtual @@ -713,7 +719,7 @@ void FSFloaterSearch::onBtnEventReminder() static LLPanelInjector t_panel_fs_search_people("panel_ls_people"); -FSPanelSearchPeople::FSPanelSearchPeople() : LLPanel() +FSPanelSearchPeople::FSPanelSearchPeople() : FSSearchPanelBase() , mQueryID(NULL) , mStartSearch(0) , mResultsReceived(0) @@ -749,6 +755,11 @@ BOOL FSPanelSearchPeople::postBuild() return TRUE; } +void FSPanelSearchPeople::focusDefaultElement() +{ + mSearchComboBox->focusTextEntry(); +} + void FSPanelSearchPeople::find() { std::string text = mSearchComboBox->getSimple(); @@ -976,7 +987,7 @@ void FSPanelSearchPeople::processSearchReply(LLMessageSystem* msg, void**) static LLPanelInjector t_panel_fs_search_groups("panel_ls_groups"); -FSPanelSearchGroups::FSPanelSearchGroups() : LLPanel() +FSPanelSearchGroups::FSPanelSearchGroups() : FSSearchPanelBase() , mQueryID(NULL) , mStartSearch(0) , mResultsReceived(0) @@ -1012,6 +1023,11 @@ BOOL FSPanelSearchGroups::postBuild() return TRUE; } +void FSPanelSearchGroups::focusDefaultElement() +{ + mSearchComboBox->focusTextEntry(); +} + void FSPanelSearchGroups::find() { std::string text = filterShortWords(mSearchComboBox->getSimple()); @@ -1261,7 +1277,7 @@ void FSPanelSearchGroups::processSearchReply(LLMessageSystem* msg, void**) static LLPanelInjector t_panel_fs_search_places("panel_ls_places"); -FSPanelSearchPlaces::FSPanelSearchPlaces() : LLPanel() +FSPanelSearchPlaces::FSPanelSearchPlaces() : FSSearchPanelBase() , mQueryID(NULL) , mStartSearch(0) , mResultsReceived(0) @@ -1308,6 +1324,11 @@ BOOL FSPanelSearchPlaces::postBuild() return TRUE; } +void FSPanelSearchPlaces::focusDefaultElement() +{ + mSearchComboBox->focusTextEntry(); +} + void FSPanelSearchPlaces::find() { std::string text = filterShortWords(mSearchComboBox->getSimple()); @@ -1593,7 +1614,7 @@ void FSPanelSearchPlaces::processSearchReply(LLMessageSystem* msg, void**) static LLPanelInjector t_panel_fs_search_land("panel_ls_land"); -FSPanelSearchLand::FSPanelSearchLand() : LLPanel() +FSPanelSearchLand::FSPanelSearchLand() : FSSearchPanelBase() , mQueryID(NULL) , mStartSearch(0) , mResultsReceived(0) @@ -1944,7 +1965,7 @@ void FSPanelSearchLand::processSearchReply(LLMessageSystem* msg, void**) static LLPanelInjector t_panel_fs_search_classifieds("panel_ls_classifieds"); -FSPanelSearchClassifieds::FSPanelSearchClassifieds() : LLPanel() +FSPanelSearchClassifieds::FSPanelSearchClassifieds() : FSSearchPanelBase() , mQueryID(NULL) , mStartSearch(0) , mResultsReceived(0) @@ -1995,6 +2016,11 @@ BOOL FSPanelSearchClassifieds::postBuild() return TRUE; } +void FSPanelSearchClassifieds::focusDefaultElement() +{ + mSearchComboBox->focusTextEntry(); +} + void FSPanelSearchClassifieds::find() { std::string text = filterShortWords(mSearchComboBox->getSimple()); @@ -2246,7 +2272,7 @@ void FSPanelSearchClassifieds::processSearchReply(LLMessageSystem* msg, void**) static LLPanelInjector t_panel_fs_search_events("panel_ls_events"); -FSPanelSearchEvents::FSPanelSearchEvents() : LLPanel() +FSPanelSearchEvents::FSPanelSearchEvents() : FSSearchPanelBase() , mQueryID(NULL) , mResultsReceived(0) , mStartSearch(0) @@ -2298,6 +2324,11 @@ BOOL FSPanelSearchEvents::postBuild() return TRUE; } +void FSPanelSearchEvents::focusDefaultElement() +{ + mSearchComboBox->focusTextEntry(); +} + void FSPanelSearchEvents::find() { std::string text = filterShortWords(mSearchComboBox->getSimple()); @@ -2658,7 +2689,7 @@ void FSPanelSearchEvents::processSearchReply(LLMessageSystem* msg, void**) static LLPanelInjector t_panel_fs_search_web("panel_ls_web"); -FSPanelSearchWeb::FSPanelSearchWeb() : LLPanel() +FSPanelSearchWeb::FSPanelSearchWeb() : FSSearchPanelBase() , mWebBrowser(NULL) { // declare a map that transforms a category name into diff --git a/indra/newview/fsfloatersearch.h b/indra/newview/fsfloatersearch.h index 78a700bbcf..04b4b475f1 100644 --- a/indra/newview/fsfloatersearch.h +++ b/indra/newview/fsfloatersearch.h @@ -63,20 +63,30 @@ struct SearchQuery : public LLInitParam::Block // Search Panels // /////////////////////////////// -class FSPanelSearchPeople : public LLPanel +class FSSearchPanelBase : public LLPanel +{ +public: + FSSearchPanelBase() : LLPanel() { } + virtual ~FSSearchPanelBase() { } + virtual void focusDefaultElement() { } +}; + +class FSPanelSearchPeople : public FSSearchPanelBase { LOG_CLASS(FSFloaterSearch); public: FSPanelSearchPeople(); static void processSearchReply(LLMessageSystem* msg, void**); + /*virtual*/ void focusDefaultElement(); + protected: const S32& getNumResultsReturned() const { return mNumResultsReturned; }; const S32& getNumResultsReceived() const { return mResultsReceived; }; private: /*virtual*/ BOOL postBuild(); - /*virtual*/ ~FSPanelSearchPeople(); + virtual ~FSPanelSearchPeople(); void onBtnFind(); void onSelectItem(); @@ -101,16 +111,18 @@ private: LLScrollListCtrl* mSearchResults; }; -class FSPanelSearchGroups : public LLPanel +class FSPanelSearchGroups : public FSSearchPanelBase { LOG_CLASS(FSFloaterSearch); public: FSPanelSearchGroups(); static void processSearchReply(LLMessageSystem* msg, void**); -protected: + + /*virtual*/ void focusDefaultElement(); + private: /*virtual*/ BOOL postBuild(); - /*virtual*/ ~FSPanelSearchGroups(); + virtual ~FSPanelSearchGroups(); void onBtnFind(); void onSelectItem(); @@ -135,16 +147,18 @@ private: LLScrollListCtrl* mSearchResults; }; -class FSPanelSearchPlaces : public LLPanel +class FSPanelSearchPlaces : public FSSearchPanelBase { LOG_CLASS(FSFloaterSearch); public: FSPanelSearchPlaces(); static void processSearchReply(LLMessageSystem* msg, void**); -protected: + + /*virtual*/ void focusDefaultElement(); + private: /*virtual*/ BOOL postBuild(); - /*virtual*/ ~FSPanelSearchPlaces(); + virtual ~FSPanelSearchPlaces(); void onBtnFind(); void onSelectItem(); @@ -170,7 +184,7 @@ private: LLComboBox* mPlacesCategory; }; -class FSPanelSearchLand : public LLPanel +class FSPanelSearchLand : public FSSearchPanelBase { LOG_CLASS(FSFloaterSearch); public: @@ -179,7 +193,7 @@ public: protected: private: /*virtual*/ BOOL postBuild(); - /*virtual*/ ~FSPanelSearchLand(); + virtual ~FSPanelSearchLand(); void onBtnFind(); void onSelectItem(); @@ -205,16 +219,18 @@ private: LLScrollListCtrl* mSearchResults; }; -class FSPanelSearchClassifieds : public LLPanel +class FSPanelSearchClassifieds : public FSSearchPanelBase { LOG_CLASS(FSFloaterSearch); public: FSPanelSearchClassifieds(); static void processSearchReply(LLMessageSystem* msg, void**); -protected: + + /*virtual*/ void focusDefaultElement(); + private: /*virtual*/ BOOL postBuild(); - /*virtual*/ ~FSPanelSearchClassifieds(); + virtual ~FSPanelSearchClassifieds(); void onBtnFind(); void onSelectItem(); @@ -240,16 +256,18 @@ private: LLComboBox* mClassifiedsCategory; }; -class FSPanelSearchEvents : public LLPanel +class FSPanelSearchEvents : public FSSearchPanelBase { LOG_CLASS(FSFloaterSearch); public: FSPanelSearchEvents(); static void processSearchReply(LLMessageSystem* msg, void**); -protected: + + /*virtual*/ void focusDefaultElement(); + private: /*virtual*/ BOOL postBuild(); - /*virtual*/ ~FSPanelSearchEvents(); + virtual ~FSPanelSearchEvents(); void onBtnFind(); void onSelectItem(); @@ -281,15 +299,16 @@ private: LLRadioGroup* mEventsMode; }; -class FSPanelSearchWeb : public LLPanel, public LLViewerMediaObserver +class FSPanelSearchWeb : public FSSearchPanelBase, public LLViewerMediaObserver { LOG_CLASS(FSFloaterSearch); public: FSPanelSearchWeb(); /*virtual*/ BOOL postBuild(); void loadURL(const SearchQuery &query); + private: - ~FSPanelSearchWeb() {}; + virtual ~FSPanelSearchWeb() {}; LLMediaCtrl* mWebBrowser; LLSD mCategoryPaths; diff --git a/indra/newview/fskeywords.cpp b/indra/newview/fskeywords.cpp index f42e01a4ad..333c679594 100644 --- a/indra/newview/fskeywords.cpp +++ b/indra/newview/fskeywords.cpp @@ -27,6 +27,9 @@ #include "llviewerprecompiledheaders.h" #include "fskeywords.h" +#include "llagent.h" +#include "llinstantmessage.h" +#include "llmutelist.h" #include "llui.h" #include "llviewercontrol.h" @@ -83,8 +86,16 @@ bool FSKeywords::chatContainsKeyword(const LLChat& chat, bool is_local) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground void FSKeywords::notify(const LLChat& chat) { - static LLCachedControl PlayModeUISndFSKeywordSound(gSavedSettings, "PlayModeUISndFSKeywordSound"); - if(PlayModeUISndFSKeywordSound) - LLUI::sAudioCallback(LLUUID(gSavedSettings.getString("UISndFSKeywordSound"))); + if (chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) + { + if (!LLMuteList::getInstance()->isMuted(chat.mFromID)) + { + static LLCachedControl PlayModeUISndFSKeywordSound(gSavedSettings, "PlayModeUISndFSKeywordSound"); + if (PlayModeUISndFSKeywordSound) + { + LLUI::sAudioCallback(LLUUID(gSavedSettings.getString("UISndFSKeywordSound"))); + } + } + } } // diff --git a/indra/newview/fsleapexampletool.cpp b/indra/newview/fsleapexampletool.cpp index 8ab64ffa3b..f8cfffe515 100644 --- a/indra/newview/fsleapexampletool.cpp +++ b/indra/newview/fsleapexampletool.cpp @@ -48,12 +48,16 @@ namespace nd return 111; } - void ExampleTool::onFrame( Leap::HandList const &aHands ) + void ExampleTool::onLeapFrame( Leap::Frame const &aFrame ) { - mHands = aHands.count(); + mHands = aFrame.hands().count(); mFingers = 0; for( int i = 0; i < mHands; ++ i ) - mFingers += aHands[ i ].fingers().count(); + mFingers += aFrame.hands()[ i ].fingers().count(); + } + + void ExampleTool::onRenderFrame( Leap::Frame const &aFrame ) + { } void ExampleTool::render() diff --git a/indra/newview/fsleapexampletool.h b/indra/newview/fsleapexampletool.h index 2c504df7e3..2459f4eb1c 100644 --- a/indra/newview/fsleapexampletool.h +++ b/indra/newview/fsleapexampletool.h @@ -42,7 +42,8 @@ namespace nd public: virtual ~ExampleTool(){} - virtual void onFrame(Leap::HandList const&); + virtual void onLeapFrame( Leap::Frame const& ); + virtual void onRenderFrame( Leap::Frame const& ); virtual void render(); virtual std::string getDebugString(); virtual std::string getName(); diff --git a/indra/newview/fsleapmaniptool.cpp b/indra/newview/fsleapmaniptool.cpp new file mode 100644 index 0000000000..60b9e87d45 --- /dev/null +++ b/indra/newview/fsleapmaniptool.cpp @@ -0,0 +1,572 @@ +/** + * $LicenseInfo:firstyear=2014&license=fsviewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (C) 2014, Nicky Dasmijn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include + +#include "fsleapmaniptool.h" + +#include "llviewerwindow.h" +#include "llviewerobject.h" +#include "lldrawable.h" +#include "pipeline.h" +#include "llvoavatarself.h" +#include "llviewershadermgr.h" +#include "llselectmgr.h" + +namespace nd +{ + namespace leap + { + struct Finger + { + Finger( ) + { + clear(); + } + + void clear() + { + memset( this, 0, sizeof( Finger ) ); + } + + bool isValid( ) const + { return mTimestamp > 0; } + + U64 mId; + U64 mTimestamp; + + float mTip[3]; + float mDir[3]; + float mFromLast[3]; + float mLenFromLast; + float mWidth; + float mLength; + U16 mPartner; + LLViewerObject *mSelected; + }; + + struct Fingers + { + Fingers( ) + { + clear(); + } + + void clear() + { + mTimestamp = 0; + for( int i = 0; i < eMaxFingers; ++i ) + mFingers[ i ].clear(); + mStoredFingers = 0; + } + + Finger* getFinger( U64 aId ) + { + for( int i = 0; i < mStoredFingers; ++i ) + { + if( aId == mFingers[ i ].mId ) + return mFingers + i; + } + + return 0; + } + + Finger* at( U16 aIndex ) + { + return &mFingers[ aIndex ]; + } + + enum MAXFIGERS { eMaxFingers = 10 }; + + U64 mTimestamp; + U16 mStoredFingers; + Finger mFingers[eMaxFingers]; + }; + + + /* Do the rotation: + | 0 0 -1 | | x | + | -1 0 0 | * | y | + | 0 1 0 | | z | + + in this case it's just value flipping. + */ + static LLVector3 toAgentCS( float aX, float aY, float aZ ) + { + return LLVector3( -aZ, -aX, aY ); + } + + static float scaleY( float aIn ) + { + return aIn - 150.f; + } + + static LLVector3 scaleToSL( LLVector3 const &aIn ) + { + return aIn * 1.f/25.f; + } + + static void copy( Leap::Vector const &aFrom, float *aTo ) + { + aTo[0] = aFrom[0]; + aTo[1] = aFrom[1]; + aTo[2] = aFrom[2]; + } + + static float length( float const *aVec ) + { + return sqrt( aVec[0]*aVec[0] + aVec[1]*aVec[1] + aVec[2]*aVec[2] ); + } + + static float normalize( float *aVec ) + { + float len = length( aVec ); + if( fabs( len ) > 0.0001f ) + { + aVec[0] /= len; + aVec[1] /= len; + aVec[2] /= len; + } + else + { + len = aVec[0] = aVec[1] = aVec[2] = 0.f; + } + return len; + } + + static float dot( float const *aVec1, float const *aVec2, bool aUnitVectors = true ) + { + float alpha = aVec1[0]*aVec2[0] + aVec1[1]*aVec2[1] + aVec1[2]*aVec2[2]; + + if( !aUnitVectors ) + alpha /= ( length( aVec1 )*length(aVec2) ); + + return acos( alpha ); + } + + static void subtract( float const *aLeft, float const *aRight, float *aOut ) + { + aOut[0] = aLeft[0] - aRight[0]; + aOut[1] = aLeft[1] - aRight[1]; + aOut[2] = aLeft[2] - aRight[2]; + } + + static void move( float const *aStart, float const *aDirecton, float aScale, float *aOut ) + { + aOut[0] = aStart[0] + aDirecton[0]*aScale; + aOut[1] = aStart[1] + aDirecton[1]*aScale; + aOut[2] = aStart[2] + aDirecton[2]*aScale; + + } + + ManipTool::ManipTool() + { + mLastExaminedFrame = 0; + mLastStoredFrame = 0; + mNextRenderedFrame = 0; + mTotalStoredFrames = 0; + mFingersPerFrame = new Fingers[ eMaxKeptFrames ]; + } + + ManipTool::~ManipTool() + { + delete []mFingersPerFrame; + } + + std::string ManipTool::getName() + { + return "Manipulation tool"; + } + + std::string ManipTool::getDebugString() + { + return ""; + } + + S32 ManipTool::getId() + { + return 11; + } + + void ManipTool::clearSelection() + { + //for( std::vector< LLViewerObject* >::iterator itr = mHighlighted.begin(); itr != mHighlighted.end(); ++itr ) + //{ + // LLViewerObject *pO = *itr; + // LLSelectMgr::getInstance()->unhighlightObjectOnly( pO ); + //} + //mHighlighted.clear(); + + LLSelectMgr::getInstance()->unhighlightAll(); + + } + + void ManipTool::onLeapFrame( Leap::Frame const &aFrame ) + { + if( (aFrame.timestamp() - mLastExaminedFrame ) < 16*1000 ) + return; + + if( aFrame.hands().count() > 2 ) + return; + + mLastExaminedFrame = aFrame.timestamp(); + U16 curFrame = getNextFrameNo( mLastStoredFrame ); + Fingers &curFingers = mFingersPerFrame[ curFrame ]; + U16 curFinger = 0; + curFingers.clear(); + curFingers.mTimestamp = mLastExaminedFrame; + + Leap::HandList hands = aFrame.hands(); + for( int i = 0; i < hands.count(); ++i ) + { + for( int j = 0; j < hands[i].fingers().count(); ++j ) + { + Leap::Finger oFinger( hands[i].fingers()[j] ); + + Finger &oF = curFingers.mFingers[ curFinger++ ]; + + oF.mId = oFinger.id(); + oF.mTimestamp = mLastExaminedFrame; + copy( oFinger.direction(), oF.mDir ); + copy( oFinger.tipPosition(), oF.mTip ); + oF.mWidth = oFinger.width(); + oF.mLength = oFinger.length(); + } + } + + curFingers.mStoredFingers = curFinger; + + if( mTotalStoredFrames > 0 ) + { + Fingers &prevFingers = mFingersPerFrame[ mLastStoredFrame ]; + + for( U16 i = 0; i < curFingers.mStoredFingers; ++i ) + { + Finger &curFinger = curFingers.mFingers[i]; + Finger const *prevFinger = prevFingers.getFinger( curFinger.mId ); + if( !prevFinger ) + continue; + + subtract( curFinger.mTip, prevFinger->mTip, curFinger.mFromLast ); + curFinger.mLenFromLast = normalize( curFinger.mFromLast ); + } + } + + mLastStoredFrame = curFrame; + ++mTotalStoredFrames; + } + + void ManipTool::onRenderFrame( Leap::Frame const &aFrame ) + { + clearSelection(); + doSelect( ); + } + + void ManipTool::findPartner( U16 aIndex ) + { + Fingers &curFingers = mFingersPerFrame[ mNextRenderedFrame ]; + Finger &curFinger = curFingers.mFingers[ aIndex ]; + + if( !curFinger.mSelected ) + return; + + for( U16 i = 0; i < curFingers.mStoredFingers; ++i ) + { + if( curFingers.mFingers[i].mSelected == curFinger.mSelected ) + { + if( !curFingers.mFingers[i].mPartner ) + { + curFingers.mFingers[i].mPartner = aIndex; + curFinger.mPartner = i; + } + else + curFinger.mSelected = 0; + + break; + } + } + } + + void ManipTool::selectWithFinger( U16 aIndex ) + { + Finger &oFinger = mFingersPerFrame[ mNextRenderedFrame ].mFingers[ aIndex ]; + GLfloat x( oFinger.mTip[0] ); + GLfloat y( scaleY( oFinger.mTip[1] ) ); + GLfloat z( oFinger.mTip[2] ); + LLVector3 oV1( scaleToSL( toAgentCS( x, y, z) ) ); + + x += oFinger.mDir[0] * oFinger.mLength; + y += oFinger.mDir[1] * oFinger.mLength; + z += oFinger.mDir[2] * oFinger.mLength; + + LLVector3 oV2( scaleToSL( toAgentCS( x, y, z ) ) ); + + oV1 *= gAgentAvatarp->getRotationRegion(); + oV2 *= gAgentAvatarp->getRotationRegion(); + + oV1 += gAgentAvatarp->getPositionAgent( ); + oV2 += gAgentAvatarp->getPositionAgent( ); + + LLVector4a oF1,oF2; + oF1.load3( oV1.mV ); + oF2.load3( oV2.mV ); + + S32 nFace(0); + LLViewerObject *pHit = gPipeline.lineSegmentIntersectInWorld( oF1,oF2, FALSE, TRUE, &nFace ); + + if( pHit ) + oFinger.mSelected = pHit; + + findPartner( aIndex ); + } + + void ManipTool::doSelect() + { + Fingers &curFingers = mFingersPerFrame[ mNextRenderedFrame ]; + for( U16 i = 0; i < curFingers.mStoredFingers; ++i ) + selectWithFinger( i ); + + for( U16 i = 0; i < curFingers.mStoredFingers; ++i ) + { + Finger &curFinger = curFingers.mFingers[ i ]; + if( curFinger.mPartner < i ) + continue; + + if( !curFinger.mSelected ) + continue; + + LLColor4 oCol( 0.f, 0.f, 1.f ); + if( curFinger.mPartner ) + oCol.set( 0.f, 1.f, 0.f ); + + LLSelectMgr::getInstance()->highlightObjectOnly( curFinger.mSelected, oCol ); + } + } + + void ManipTool::renderCone( Finger const &aFinger ) + { + GLfloat x( aFinger.mTip[0] ); + GLfloat y( scaleY( aFinger.mTip[1] ) ); + GLfloat z( aFinger.mTip[2] ); + + LLVector3 oTip( scaleToSL( toAgentCS( x, y, z ) ) ); + + float dist = aFinger.mWidth*2; + x -= aFinger.mDir[0] *dist; + y -= aFinger.mDir[1] *dist; + z -= aFinger.mDir[2] *dist; + + LLVector3 oM( scaleToSL( toAgentCS( x, y, z) ) ); + float r = 0.25; + int slices = 16; + float alpha = (F_PI*2)/slices; + + for( int i = 0; i < slices; ++i ) + { + GLfloat cx = cos( alpha*i )*r; + GLfloat cy = sin( alpha*i )*r; + + GLfloat cx2 = cos( alpha*(i+1) )*r; + GLfloat cy2 = sin( alpha*(i+1) )*r; + + LLVector3 oV1( oM ); + LLVector3 oV2( oM ); + + oV1 += LLVector3( 0, cy, -cx ); + oV2 += LLVector3( 0, cy2, -cx2 ); + + gGL.vertex3fv( oTip.mV ); + gGL.vertex3fv( oV1.mV ); + + gGL.vertex3fv( oV1.mV ); + gGL.vertex3fv( oV2.mV ); + + gGL.vertex3fv( oV2.mV ); + gGL.vertex3fv( oTip.mV ); + } + } + + void ManipTool::renderMovementDirection( Finger const &aFinger ) + { + float lenDir = aFinger.mLenFromLast; + U16 prevFrame = getPrevFrameNo( mNextRenderedFrame ); + Finger *prevFinger = mFingersPerFrame[ prevFrame ].getFinger( aFinger.mId ); + + while( prevFinger && prevFinger->mTimestamp < aFinger.mTimestamp && (aFinger.mTimestamp - prevFinger->mTimestamp ) < getMaxBacktrackMicroseconds() ) + { + float alpha = dot( aFinger.mFromLast, prevFinger->mFromLast ); + if( alpha > F_PI/18 ) + break; + + lenDir += prevFinger->mLenFromLast; + + prevFrame = getPrevFrameNo( prevFrame ); + prevFinger = mFingersPerFrame[ prevFrame ].getFinger( aFinger.mId ); + } +#if 0 + float vec[3]; + bool haveVec( false ); + while( aFinger.mTimestamp > mFingersPerFrame[ prevFrame ].mTimestamp && + (aFinger.mTimestamp > mFingersPerFrame[ prevFrame ].mTimestamp) < getMaxBacktrackMicroseconds() ) + { + Finger *pFinger = mFingersPerFrame[ prevFrame ].getFinger( aFinger.mId ); + + if( pFinger ) + { + if( !haveVec ) + { + subtract( aFinger.mTip, pFinger->mTip, vec ); + lenDir = normalize( vec ); + haveVec = true; + } + else + { + float vec2[3]; + + subtract( aFinger.mTip, pFinger->mTip, vec2 ); + float lenDir2 = normalize( vec ); + + float alpha = dot( vec, vec2 ); + if( alpha > F_PI/18 ) + break; + lenDir += lenDir2; + } + } + prevFrame = getPrevFrameNo( prevFrame ); + } +#endif + + if( lenDir > 0 ) + { + GLfloat x( aFinger.mTip[0] ); + GLfloat y( scaleY( aFinger.mTip[1] ) ); + GLfloat z( aFinger.mTip[2] ); + + LLVector3 oStart( scaleToSL( toAgentCS( x, y, z ) ) ); + + x -= aFinger.mFromLast[0] *lenDir; + y -= aFinger.mFromLast[1] *lenDir; + z -= aFinger.mFromLast[2] *lenDir; + + LLVector3 oEnd( scaleToSL( toAgentCS( x, y, z) ) ); + gGL.vertex3fv( oStart.mV ); + gGL.vertex3fv( oEnd.mV ); + } + } + + void ManipTool::renderMovementAngle( Finger const &aFinger, U16 aIndex ) + { + if( !aFinger.mPartner || aFinger.mPartner < aIndex ) + return; + + U16 prevFrame = getPrevFrameNo( mNextRenderedFrame ); + Finger *prevFinger = mFingersPerFrame[ prevFrame ].getFinger( aFinger.mId ); + U16 startFrame(mNextRenderedFrame); + + while( prevFinger && + prevFinger->mTimestamp < aFinger.mTimestamp && (aFinger.mTimestamp - prevFinger->mTimestamp ) < getMaxBacktrackMicroseconds() && + prevFinger->mPartner ) + { + startFrame = prevFrame; + prevFrame = getPrevFrameNo( prevFrame ); + prevFinger = mFingersPerFrame[ prevFrame ].getFinger( aFinger.mId ); + } + + if( mNextRenderedFrame == startFrame ) + return; + + Finger const *startFinger( mFingersPerFrame[ startFrame ].getFinger( aFinger.mId ) ); + Finger const *startPartner( mFingersPerFrame[ startFrame ].at( startFinger->mPartner ) ); + + Finger const *endFinger( &aFinger ); + Finger const *endPartner( mFingersPerFrame[ startFrame ].at( endFinger->mPartner ) ); + + float vecStart[3], vecEnd[3]; + subtract( startFinger->mTip, startPartner->mTip, vecStart ); + subtract( endFinger->mTip, endPartner->mTip, vecEnd ); + + float lenStart = normalize( vecStart ); + float lenEnd = normalize( vecEnd ); + + float radius = lenStart>lenEnd?lenStart:lenEnd; + + float alpha = dot( vecStart, vecEnd ); + + float ptStart[3], ptEnd[3]; + move( startFinger->mTip, vecStart, radius/2, ptStart ); + + ptEnd[0] = ptStart[0]*cos(alpha) - ptStart[1]*sin(alpha); + ptEnd[1] = ptStart[1]*cos(alpha) + ptStart[0]*sin(alpha); + ptEnd[2] = ptStart[2]; + + gGL.vertex3fv( ptStart ); + gGL.vertex3fv( ptEnd ); + } + + void ManipTool::renderFinger( Finger const &aFinger, U16 aIndex ) + { + if( aFinger.mPartner ) + gGL.diffuseColor4f( 0.f, 1.0f, 0.0f, 1.f); + else if( aFinger.mSelected ) + gGL.diffuseColor4f( 0.f, 0.0f, 1.0f, 1.f); + else + gGL.diffuseColor4f( 1.f, 1.0f, 1.0f, 1.f); + + renderCone( aFinger ); + renderMovementDirection( aFinger ); + renderMovementAngle( aFinger, aIndex ); + } + + void ManipTool::render() + { + LLGLEnable blend(GL_BLEND); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + + gGL.matrixMode(LLRender::MM_MODELVIEW); + gGL.pushMatrix(); + gGL.begin(LLRender::LINES); + + LLQuaternion rot = gAgentAvatarp->getRotationRegion(); + LLVector3 pos = gAgentAvatarp->getPositionAgent(); + + gGL.translatef( pos.mV[0], pos.mV[1], pos.mV[2] ); + gGL.multMatrix( (GLfloat*) gAgentAvatarp->getRotationRegion().getMatrix4().mMatrix ); + + gGL.begin(LLRender::LINES); + + Fingers &curFingers = mFingersPerFrame[ mNextRenderedFrame ]; + for( U16 i = 0; i < curFingers.mStoredFingers; ++i ) + { + Finger &curFinger = curFingers.mFingers[ i ]; + renderFinger( curFinger, i ); + } + + gGL.end(); + + gGL.popMatrix(); + mNextRenderedFrame = mLastStoredFrame; + } + } +} diff --git a/indra/newview/fsleapmaniptool.h b/indra/newview/fsleapmaniptool.h new file mode 100644 index 0000000000..3988fe21b2 --- /dev/null +++ b/indra/newview/fsleapmaniptool.h @@ -0,0 +1,85 @@ +/** + * $LicenseInfo:firstyear=2014&license=fsviewerlgpl$ + * Phoenix Firestorm Viewer Source Code + * Copyright (C) 2014, Nicky Dasmijn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * The Phoenix Firestorm Project, Inc., 1831 Oakwood Drive, Fairmont, Minnesota 56031-3225 USA + * http://www.firestormviewer.org + * $/LicenseInfo$ + */ + +#ifndef NDLEAPMANIPTOOL_H +#define NDLEAPMANIPTOOL_H + +#pragma once + +#include "fsleaptool.h" +#include + +class LLViewerObject; + +namespace nd +{ + namespace leap + { + struct Finger; + struct Fingers; + class ManipTool: public Tool + { + enum EMAXKEPTFRAMES{ eMaxKeptFrames = 120 }; + + inline U16 getNextFrameNo( U16 aFrame ) const + { return aFrame==eMaxKeptFrames-1?0:aFrame+1; } + inline U16 getPrevFrameNo( U16 aFrame ) const + { return aFrame==0?eMaxKeptFrames-1:aFrame-1; } + + inline U32 getMaxBacktrackMicroseconds() const + { return 1500*1000; } + + U64 mLastExaminedFrame; + U16 mLastStoredFrame; + U16 mNextRenderedFrame; + U64 mTotalStoredFrames; + + Fingers *mFingersPerFrame; + + void clearSelection(); + void doSelect(); + + void selectWithFinger( U16 aIndex ); + void findPartner( U16 aIndex ); + + void renderCone( Finger const & ); + void renderMovementDirection( Finger const & ); + void renderMovementAngle( Finger const &, U16 aIndex ); + void renderFinger( Finger const&, U16 aIndex ); + + public: + ManipTool(); + virtual ~ManipTool(); + + virtual void onLeapFrame( Leap::Frame const& ); + virtual void onRenderFrame( Leap::Frame const& ); + virtual void render(); + virtual std::string getDebugString(); + virtual std::string getName(); + virtual S32 getId(); + }; + } +} + +#endif diff --git a/indra/newview/fsleaptool.cpp b/indra/newview/fsleaptool.cpp index 0784abf8b5..6714a46370 100644 --- a/indra/newview/fsleaptool.cpp +++ b/indra/newview/fsleaptool.cpp @@ -25,11 +25,14 @@ #include "fsleaptool.h" #include "fsleapexampletool.h" +#include "fsleapmaniptool.h" nd::leap::Tool* nd::leap::constructTool( S32 aTool ) { if( 111 == aTool ) return new nd::leap::ExampleTool(); + if( 11 == aTool ) + return new nd::leap::ManipTool(); return 0; } \ No newline at end of file diff --git a/indra/newview/fsleaptool.h b/indra/newview/fsleaptool.h index d3fba120a0..8cab0161ee 100644 --- a/indra/newview/fsleaptool.h +++ b/indra/newview/fsleaptool.h @@ -30,6 +30,7 @@ namespace Leap { class HandList; + class Frame; } namespace nd @@ -41,7 +42,8 @@ namespace nd public: virtual ~Tool(){} - virtual void onFrame( Leap::HandList const& ) = 0; + virtual void onLeapFrame( Leap::Frame const& ) = 0; + virtual void onRenderFrame( Leap::Frame const& ) = 0; virtual void render() = 0; virtual std::string getDebugString() = 0; virtual std::string getName() = 0; diff --git a/indra/newview/fsnearbychathub.cpp b/indra/newview/fsnearbychathub.cpp index 043d885b49..b6857edcd3 100644 --- a/indra/newview/fsnearbychathub.cpp +++ b/indra/newview/fsnearbychathub.cpp @@ -29,10 +29,7 @@ #include "fsnearbychathub.h" #include "fsnearbychatcontrol.h" -// [FS communication UI] -//#include "llfloaternearbychat.h" #include "fsfloaternearbychat.h" -// [FS communication UI] #include "llviewercontrol.h" #include "llviewerwindow.h" @@ -159,12 +156,12 @@ void send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channe U32 total = utf8_out_text.length(); // Don't break null messages - if(total == 0) + if (total == 0) { really_send_chat_from_viewer(utf8_out_text, type, channel); } - while(pos < total) + while (pos < total) { U32 next_split = split; @@ -222,11 +219,13 @@ void really_send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 LLMessageSystem* msg = gMessageSystem; // gMessageSystem can be 0, not sure how it is exactly to reproduce, maybe during viewer shutdown? - if( !msg ) + if (!msg) + { return; + } // - if(channel >= 0) + if (channel >= 0) { msg->newMessageFast(_PREHASH_ChatFromViewer); msg->nextBlockFast(_PREHASH_AgentData); @@ -270,10 +269,7 @@ void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, EChatType type, BO gSavedSettings.getBOOL("FSShowChatChannel") && (channel == 0)) { - // [FS communication UI] - //channel = (S32)(LLFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); - // [FS communication UI] } std::string utf8_out_text = wstring_to_utf8str(out_text); std::string utf8_text = wstring_to_utf8str(wtext); @@ -304,22 +300,22 @@ void FSNearbyChat::sendChatFromViewer(const LLWString& wtext, EChatType type, BO { if (type == CHAT_TYPE_WHISPER) { - lldebugs << "You whisper " << utf8_text << llendl; + LL_DEBUGS("FSNearbyChatHub") << "You whisper " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_WHISPER, ANIM_REQUEST_START); } else if (type == CHAT_TYPE_NORMAL) { - lldebugs << "You say " << utf8_text << llendl; + LL_DEBUGS("FSNearbyChatHub") << "You say " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_TALK, ANIM_REQUEST_START); } else if (type == CHAT_TYPE_SHOUT) { - lldebugs << "You shout " << utf8_text << llendl; + LL_DEBUGS("FSNearbyChatHub") << "You shout " << utf8_text << LL_ENDL; gAgent.sendAnimationRequest(ANIM_AGENT_SHOUT, ANIM_REQUEST_START); } else { - llinfos << "send_chat_from_viewer() - invalid volume" << llendl; + LL_INFOS("FSNearbyChatHub") << "send_chat_from_viewer() - invalid volume" << LL_ENDL; return; } } @@ -351,14 +347,20 @@ EChatType FSNearbyChat::processChatTypeTriggers(EChatType type, std::string &str // It's to remove space after trigger name if (length > trigger_length && str[trigger_length] == ' ') + { trigger_length++; + } str = str.substr(trigger_length, length); if (CHAT_TYPE_NORMAL == type) + { return sChatTypeTriggers[n].type; + } else + { break; + } } } } @@ -392,8 +394,10 @@ LLWString FSNearbyChat::stripChannelNumber(const LLWString &mesg, S32* channel) S32 pos = 0; // FIRE-11412: Allow saying /-channel for negative numbers // (this code was here; documenting for the future) - if(mesg[1] == '-') + if (mesg[1] == '-') + { pos++; + } // FIRE-11412 // Copy the channel number into a string @@ -401,16 +405,16 @@ LLWString FSNearbyChat::stripChannelNumber(const LLWString &mesg, S32* channel) llwchar c; do { - c = mesg[pos+1]; + c = mesg[pos + 1]; channel_string.push_back(c); pos++; } - while(c && pos < 64 && LLStringOps::isDigit(c)); + while (c && pos < 64 && LLStringOps::isDigit(c)); // Move the pointer forward to the first non-whitespace char // Check isspace before looping, so we can handle "/33foo" // as well as "/33 foo" - while(c && iswspace(c)) + while (c && iswspace(c)) { c = mesg[pos+1]; pos++; @@ -419,8 +423,10 @@ LLWString FSNearbyChat::stripChannelNumber(const LLWString &mesg, S32* channel) sLastSpecialChatChannel = strtol(wstring_to_utf8str(channel_string).c_str(), NULL, 10); // FIRE-11412: Allow saying /-channel for negative numbers // (this code was here; documenting for the future) - if(mesg[1] == '-') + if (mesg[1] == '-') + { sLastSpecialChatChannel = -sLastSpecialChatChannel; + } // FIRE-11412 *channel = sLastSpecialChatChannel; return mesg.substr(pos, mesg.length() - pos); @@ -433,13 +439,13 @@ LLWString FSNearbyChat::stripChannelNumber(const LLWString &mesg, S32* channel) } } -void FSNearbyChat::sendChat(LLWString text,EChatType type) +void FSNearbyChat::sendChat(LLWString text, EChatType type) { LLWStringUtil::trim(text); if (!text.empty()) { - if(type == CHAT_TYPE_OOC) + if (type == CHAT_TYPE_OOC) { std::string tempText = wstring_to_utf8str( text ); tempText = gSavedSettings.getString("FSOOCPrefix") + " " + tempText + " " + gSavedSettings.getString("FSOOCPostfix"); @@ -455,10 +461,7 @@ void FSNearbyChat::sendChat(LLWString text,EChatType type) gSavedSettings.getBOOL("FSShowChatChannel") && (channel == 0)) { - // [FS communication UI] - //channel = (S32)(LLFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); channel = (S32)(FSFloaterNearbyChat::getInstance()->getChild("ChatChannel")->get()); - // [FS communication UI] } std::string utf8text = wstring_to_utf8str(text); @@ -481,10 +484,14 @@ void FSNearbyChat::sendChat(LLWString text,EChatType type) utf8_revised_text = utf8str_trim(utf8_revised_text); EChatType nType; - if(type == CHAT_TYPE_OOC) + if (type == CHAT_TYPE_OOC) + { nType = CHAT_TYPE_NORMAL; + } else + { nType = type; + } type = processChatTypeTriggers(nType, utf8_revised_text); @@ -502,17 +509,19 @@ void FSNearbyChat::sendChat(LLWString text,EChatType type) void FSNearbyChat::registerChatBar(FSNearbyChatControl* chatBar) { // TODO: make this a Param option "is_default" - if(!mDefaultChatBar || chatBar->getName()=="default_chat_bar") + if (!mDefaultChatBar || chatBar->getName() == "default_chat_bar") { mDefaultChatBar=chatBar; } } // unhide the default nearby chat bar on request (pressing Enter or a letter key) -void FSNearbyChat::showDefaultChatBar(BOOL visible,const char* text) const +void FSNearbyChat::showDefaultChatBar(BOOL visible, const char* text) const { - if(!mDefaultChatBar) + if (!mDefaultChatBar) + { return; + } // change settings control to signal button state gSavedSettings.setBOOL("MainChatbarVisible",visible); @@ -522,7 +531,7 @@ void FSNearbyChat::showDefaultChatBar(BOOL visible,const char* text) const mDefaultChatBar->setFocus(visible); // Fix for bad edge snapping - if(visible) + if (visible) { gFloaterView->setSnapOffsetChatBar(mDefaultChatBar->getRect().getHeight() + MAGIC_CHAT_BAR_PAD); } @@ -531,10 +540,12 @@ void FSNearbyChat::showDefaultChatBar(BOOL visible,const char* text) const gFloaterView->setSnapOffsetChatBar(0); } - if(!text) + if (!text) + { return; + } - if(mDefaultChatBar->getText().empty()) + if (mDefaultChatBar->getText().empty()) { mDefaultChatBar->setText(LLStringExplicit(text)); mDefaultChatBar->setCursorToEnd(); @@ -543,23 +554,29 @@ void FSNearbyChat::showDefaultChatBar(BOOL visible,const char* text) const } // We want to know which nearby chat editor (if any) currently has focus -void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor,BOOL focus) +void FSNearbyChat::setFocusedInputEditor(FSNearbyChatControl* inputEditor, BOOL focus) { - if(focus) - mFocusedInputEditor=inputEditor; + if (focus) + { + mFocusedInputEditor = inputEditor; + } // only remove focus if the request came from the previously active input editor // to avoid races - else if(mFocusedInputEditor==inputEditor) - mFocusedInputEditor=NULL; + else if (mFocusedInputEditor == inputEditor) + { + mFocusedInputEditor = NULL; + } } // for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp // and the hide chat bar feature in mouselook in llagent.cpp BOOL FSNearbyChat::defaultChatBarIsIdle() const { - if(mFocusedInputEditor && mFocusedInputEditor->getName()=="default_chat_bar") + if (mFocusedInputEditor && mFocusedInputEditor->getName() == "default_chat_bar") + { return mFocusedInputEditor->getText().empty(); + } // if any other chat bar has focus, report "idle", because they're not the default return TRUE; @@ -568,8 +585,10 @@ BOOL FSNearbyChat::defaultChatBarIsIdle() const // for the "arrow key moves avatar when chat is empty" hack in llviewerwindow.cpp BOOL FSNearbyChat::defaultChatBarHasFocus() const { - if(mFocusedInputEditor && mFocusedInputEditor->getName()=="default_chat_bar") + if (mFocusedInputEditor && mFocusedInputEditor->getName() == "default_chat_bar") + { return TRUE; + } return FALSE; } @@ -579,9 +598,9 @@ class LLChatCommandHandler : public LLCommandHandler { public: // not allowed from outside the app - LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_BLOCK) { } + LLChatCommandHandler() : LLCommandHandler("chat", UNTRUSTED_THROTTLE) { } - // Your code here + // Your code here bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) { diff --git a/indra/newview/fspanelprofile.cpp b/indra/newview/fspanelprofile.cpp index e04f764401..ce8a5379bf 100644 --- a/indra/newview/fspanelprofile.cpp +++ b/indra/newview/fspanelprofile.cpp @@ -377,7 +377,7 @@ void FSPanelProfileSecondLife::onOpen(const LLSD& key) if (!own_profile) { - mVoiceStatus = LLAvatarActions::canCall(); + mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(avatar_id) ? LLAvatarTracker::instance().isBuddyOnline(avatar_id) : TRUE); drop_target->setAgentID( avatar_id ); updateOnlineStatus(); } @@ -711,7 +711,7 @@ void FSPanelProfileSecondLife::onChange(EStatusType status, const std::string &c return; } - mVoiceStatus = LLAvatarActions::canCall(); + mVoiceStatus = LLAvatarActions::canCall() && (LLAvatarActions::isFriend(getAvatarId()) ? LLAvatarTracker::instance().isBuddyOnline(getAvatarId()) : TRUE); } void FSPanelProfileSecondLife::setAvatarId(const LLUUID& id) diff --git a/indra/newview/gpu_table.txt b/indra/newview/gpu_table.txt index fa262e9956..79389d4624 100755 --- a/indra/newview/gpu_table.txt +++ b/indra/newview/gpu_table.txt @@ -453,6 +453,7 @@ NVIDIA GT 820M .*NVIDIA .*GT *82[0-9]M.* 3 1 0 4.4 NVIDIA GT 830M .*NVIDIA .*GT *83[0-9]M.* 3 1 0 4.4 NVIDIA GT 840M .*NVIDIA .*GT *84[0-9]M.* 3 1 0 4.4 NVIDIA GT 850M .*NVIDIA .*GT *85[0-9]M.* 3 1 0 4.4 +NVIDIA GTX 850M .*NVIDIA .*GTX *85[0-9]M.* 5 1 0 4.4 NVIDIA GTX 860M .*NVIDIA .*GTX *86[0-9]M.* 5 1 0 4.4 NVIDIA GTX 870M .*NVIDIA .*GTX *87[0-9]M.* 5 1 0 4.4 NVIDIA GTX 880M .*NVIDIA .*GTX *88[0-9]M.* 5 1 0 4.4 @@ -543,11 +544,11 @@ NVIDIA GeForce 4 Go .*NVIDIA .*GeForce ?4.*Go.* 0 0 0 0 NVIDIA GeForce 4 MX .*NVIDIA .*GeForce ?4 MX.* 0 0 0 0 NVIDIA GeForce 4 PCX .*NVIDIA .*GeForce ?4 PCX.* 0 0 0 0 NVIDIA GeForce 4 Ti .*NVIDIA .*GeForce ?4 Ti.* 0 0 0 0 -NVIDIA GeForce 6100 .*NVIDIA .*GeForce 61.* 0 0 1 2.1 -NVIDIA GeForce 6200 .*NVIDIA .*GeForce 62.* 0 0 1 2.1 -NVIDIA GeForce 6500 .*NVIDIA .*GeForce 65.* 0 0 1 2.1 -NVIDIA GeForce 6600 .*NVIDIA .*GeForce 66.* 2 1 1 2.1 -NVIDIA GeForce 6700 .*NVIDIA .*GeForce 67.* 2 1 1 2.1 +NVIDIA GeForce 6100 .*NVIDIA .*GeForce 61.* 0 1 1 2.1 +NVIDIA GeForce 6200 .*NVIDIA .*GeForce 62.* 0 1 1 2.1 +NVIDIA GeForce 6500 .*NVIDIA .*GeForce 65.* 0 1 1 2.1 +NVIDIA GeForce 6600 .*NVIDIA .*GeForce 66.* 1 1 1 2.1 +NVIDIA GeForce 6700 .*NVIDIA .*GeForce 67.* 1 1 1 2.1 NVIDIA GeForce 6800 .*NVIDIA .*GeForce 68.* 1 1 1 2.1 NVIDIA GeForce 7000 .*NVIDIA .*GeForce 70.* 1 1 1 2.1 NVIDIA GeForce 7100 .*NVIDIA .*GeForce 71.* 1 1 1 2.1 @@ -665,4 +666,4 @@ Apple Software Renderer Apple.*Software Renderer.* 0 0 0 0 Oracle VirtualBox.* 0 1 1 2.1 Humper Humper.* 0 1 1 2.1 PowerVR SGX545 .*PowerVR SGX.* 1 1 1 3 -ATI GeForce Lulz .*ATI.*GeForce.* 0 0 0 0 +ATI GeForce Lulz .*ATI .*GeForce.* 0 0 0 0 diff --git a/indra/newview/installers/windows_x64/build.bat b/indra/newview/installers/windows_x64/build.bat index 072348b5c5..df8f8168c6 100644 --- a/indra/newview/installers/windows_x64/build.bat +++ b/indra/newview/installers/windows_x64/build.bat @@ -46,13 +46,13 @@ candle -dPROGRAM_FILE=%PROGRAM_FILE% -dPROGRAM_VERSION=%PROGRAM_VERSION% -dCHANN light -sval -ext WixUIExtension -cultures:en-us -out %VIEWER_BUILDDIR%\%OUTPUT_FILE%.msi firestorm.wixobj character.wixobj fonts.wixobj fs_resources.wixobj llplugin.wixobj registry.wixobj -signtool.exe sign /n Phoenix /d Firestorm /du http://www.phoenixviewer.com %VIEWER_BUILDDIR%\%OUTPUT_FILE%.msi +signtool.exe sign /n Phoenix /d Firestorm /du http://www.phoenixviewer.com /t http://timestamp.verisign.com/scripts/timstamp.dll %VIEWER_BUILDDIR%\%OUTPUT_FILE%.msi candle -dMAJOR=%MAJOR% -dMINOR=%MINOR% -dHGCHANGE=%HGCHANGE% -dWIX_SOURCEDIR=%~dp0 -dFS_MSI_FILE=%VIEWER_BUILDDIR%\%OUTPUT_FILE%.msi -ext WixBalExtension %~dp0\installer.wxs light -sval -ext WixBalExtension -out %VIEWER_BUILDDIR%\%OUTPUT_FILE%.exe installer.wixobj insignia -ib %VIEWER_BUILDDIR%\%OUTPUT_FILE%.exe -o engine.exe -signtool.exe sign /n Phoenix /d Firestorm /du http://www.phoenixviewer.com engine.exe +signtool.exe sign /n Phoenix /d Firestorm /du http://www.phoenixviewer.com /t http://timestamp.verisign.com/scripts/timstamp.dll engine.exe insignia -ab engine.exe %VIEWER_BUILDDIR%\%OUTPUT_FILE%.exe -o %VIEWER_BUILDDIR%\%OUTPUT_FILE%.exe -signtool.exe sign /n Phoenix /d Firestorm /du http://www.phoenixviewer.com %VIEWER_BUILDDIR%\%OUTPUT_FILE%.exe +signtool.exe sign /n Phoenix /d Firestorm /du http://www.phoenixviewer.com /t http://timestamp.verisign.com/scripts/timstamp.dll %VIEWER_BUILDDIR%\%OUTPUT_FILE%.exe diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index e80f1aa7c9..6cb4e57e73 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -3404,7 +3404,10 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return mGroups.count() < gMaxAgentGroups; + // [CR] FIRE-12229 + //return mGroups.count() < gMaxAgentGroups; + return ((!gMaxAgentGroups) || (mGroups.count() < gMaxAgentGroups)); + // [/CR] } LLQuaternion LLAgent::getHeadRotation() diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index d84364a68a..701eac8431 100755 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -46,6 +46,8 @@ #include "lluictrlfactory.h" #include "lltrans.h" +#include "fscommon.h" + using namespace LLOldEvents; // helper functions @@ -171,8 +173,11 @@ void LLPanelGroups::reset() { group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } - getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - getChild("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + // [CR] FIRE-12229 + //getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); + //getChild("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + getChild("groupcount")->setValue(FSCommon::populateGroupCount()); + // [/CR] init_group_list(getChild("group list"), gAgent.getGroupID()); enableButtons(); @@ -182,8 +187,11 @@ BOOL LLPanelGroups::postBuild() { childSetCommitCallback("group list", onGroupList, this); - getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - getChild("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + // [CR] FIRE-12229 + //getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); + //getChild("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); + getChild("groupcount")->setValue(FSCommon::populateGroupCount()); + // [/CR] LLScrollListCtrl *list = getChild("group list"); if (list) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 240309ec1e..3320be1bd1 100755 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -392,8 +392,9 @@ BOOL LLPanelLandGeneral::postBuild() mContentRating = getChild("ContentRatingText"); mLandType = getChild("LandTypeText"); - mBtnProfile = getChild("Profile..."); - mBtnProfile->setClickedCallback(boost::bind(&LLPanelLandGeneral::onClickProfile, this)); + // Doesn't exists as of 2014-04-14 + //mBtnProfile = getChild("Profile..."); + //mBtnProfile->setClickedCallback(boost::bind(&LLPanelLandGeneral::onClickProfile, this)); mTextGroupLabel = getChild("Group:"); @@ -540,8 +541,9 @@ void LLPanelLandGeneral::refresh() mTextOwner->setText(LLStringUtil::null); mContentRating->setText(LLStringUtil::null); mLandType->setText(LLStringUtil::null); - mBtnProfile->setLabel(getString("profile_text")); - mBtnProfile->setEnabled(FALSE); + // Doesn't exists as of 2014-04-14 + //mBtnProfile->setLabel(getString("profile_text")); + //mBtnProfile->setEnabled(FALSE); mTextClaimDate->setText(LLStringUtil::null); mTextGroup->setText(LLStringUtil::null); @@ -603,7 +605,8 @@ void LLPanelLandGeneral::refresh() mTextSalePending->setEnabled(FALSE); mTextOwner->setText(getString("public_text")); mTextOwner->setEnabled(FALSE); - mBtnProfile->setEnabled(FALSE); + // Doesn't exists as of 2014-04-14 + //mBtnProfile->setEnabled(FALSE); mTextClaimDate->setText(LLStringUtil::null); mTextClaimDate->setEnabled(FALSE); mTextGroup->setText(getString("none_text")); @@ -633,12 +636,14 @@ void LLPanelLandGeneral::refresh() mTextOwner->setEnabled(TRUE); // We support both group and personal profiles - mBtnProfile->setEnabled(TRUE); + // Doesn't exists as of 2014-04-14 + //mBtnProfile->setEnabled(TRUE); if (parcel->getGroupID().isNull()) { // Not group owned, so "Profile" - mBtnProfile->setLabel(getString("profile_text")); + // Doesn't exists as of 2014-04-14 + //mBtnProfile->setLabel(getString("profile_text")); mTextGroup->setText(getString("none_text")); mTextGroup->setEnabled(FALSE); @@ -646,7 +651,8 @@ void LLPanelLandGeneral::refresh() else { // Group owned, so "Info" - mBtnProfile->setLabel(getString("info_text")); + // Doesn't exists as of 2014-04-14 + //mBtnProfile->setLabel(getString("info_text")); //mTextGroup->setText("HIPPOS!");//parcel->getGroupName()); mTextGroup->setEnabled(TRUE); @@ -914,22 +920,24 @@ void LLPanelLandGeneral::onClickSetGroup() } } -void LLPanelLandGeneral::onClickProfile() -{ - LLParcel* parcel = mParcel->getParcel(); - if (!parcel) return; - - if (parcel->getIsGroupOwned()) - { - const LLUUID& group_id = parcel->getGroupID(); - LLGroupActions::show(group_id); - } - else - { - const LLUUID& avatar_id = parcel->getOwnerID(); - LLAvatarActions::showProfile(avatar_id); - } -} +// Doesn't exists as of 2014-04-14 +//void LLPanelLandGeneral::onClickProfile() +//{ +// LLParcel* parcel = mParcel->getParcel(); +// if (!parcel) return; +// +// if (parcel->getIsGroupOwned()) +// { +// const LLUUID& group_id = parcel->getGroupID(); +// LLGroupActions::show(group_id); +// } +// else +// { +// const LLUUID& avatar_id = parcel->getOwnerID(); +// LLAvatarActions::showProfile(avatar_id); +// } +//} +// // public void LLPanelLandGeneral::setGroup(const LLUUID& group_id) diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 363181035c..afc62b2f0d 100755 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -140,7 +140,8 @@ public: virtual void draw(); void setGroup(const LLUUID& group_id); - void onClickProfile(); + // Doesn't exists as of 2014-04-14 + //void onClickProfile(); void onClickSetGroup(); static void onClickDeed(void*); static void onClickBuyLand(void* data); @@ -188,7 +189,8 @@ protected: LLTextBox* mTextOwnerLabel; LLTextBox* mTextOwner; - LLButton* mBtnProfile; + // Doesn't exists as of 2014-04-14 + //LLButton* mBtnProfile; LLTextBox* mContentRating; LLTextBox* mLandType; diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index f0ebecfb13..8536203742 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -5662,6 +5662,12 @@ BOOL LLModelPreview::render() position[j] = v; } + + // FIRE-13465 Make sure there's a material set before dereferencing it + if( instance.mModel->mMaterialList.size() > i && + instance.mMaterial.end() != instance.mMaterial.find( instance.mModel->mMaterialList[ i ] ) ) + { + // const std::string& binding = instance.mModel->mMaterialList[i]; const LLImportMaterial& material = instance.mMaterial[binding]; @@ -5676,7 +5682,14 @@ BOOL LLModelPreview::render() gGL.getTexUnit(0)->bind(material.mDiffuseMap, true); mTextureSet.insert(material.mDiffuseMap.get()); } + } + + } else // FIRE-13465 Make sure there's a material set before dereferencing it, if none, set buffer type and unbind texture. + { + buffer->setBuffer(type_mask & buffer->getTypeMask()); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + } // buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); gGL.diffuseColor3f(0.4f, 0.4f, 0.4f); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 79694b6538..d8c005d324 100755 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -430,6 +430,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) if (!im_container->getVisible() && nearby_chat_instance && im_container->hasFloater(nearby_chat_instance) && gSavedSettings.getBOOL("FSNotifyNearbyChatFlash")) { + im_container->addFlashingSession(session_id); gToolBarView->flashCommand(LLCommandId("chat"), true, im_container->isMinimized()); } return; @@ -453,6 +454,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg) if (!im_container->getVisible() && im_instance && im_container->hasFloater(im_instance) && gSavedSettings.getBOOL("FSNotifyIMFlash")) { + im_container->addFlashingSession(session_id); gToolBarView->flashCommand(LLCommandId("chat"), true, im_container->isMinimized()); } diff --git a/indra/newview/llleapmotioncontroller.cpp b/indra/newview/llleapmotioncontroller.cpp index ad50a739ac..447476c909 100644 --- a/indra/newview/llleapmotioncontroller.cpp +++ b/indra/newview/llleapmotioncontroller.cpp @@ -175,6 +175,9 @@ void LLLMImpl::onFrame(const Leap::Controller& controller) mCurrentFrameID = frame_id; mFrameAvailable = true; } + + if( mTool ) + mTool->onLeapFrame( frame); } } @@ -207,13 +210,14 @@ void LLLMImpl::stepFrame() static LLCachedControl sControllerMode(gSavedSettings, "LeapMotionTestMode", 0); - if( mTool && mTool->getId() != sControllerMode ) + if( !mTool || mTool->getId() != sControllerMode ) + { delete mTool; - - mTool = nd::leap::constructTool( sControllerMode ); + mTool = nd::leap::constructTool( sControllerMode ); + } if( mTool ) - mTool->onFrame( hands ); + mTool->onRenderFrame( frame ); else { switch (sControllerMode) diff --git a/indra/newview/llloginhandler.cpp b/indra/newview/llloginhandler.cpp index da52ac408c..854d9d785b 100755 --- a/indra/newview/llloginhandler.cpp +++ b/indra/newview/llloginhandler.cpp @@ -200,5 +200,9 @@ LLPointer LLLoginHandler::loadSavedUserLoginInfo() return gSecAPIHandler->createCredential(identifier["first_name"].asString() + " " + identifier["last_name"].asString() + "@" +LLGridManager::getInstance()->getGrid(), identifier, authenticator); } - return NULL; + // Fix --autologin by loading the currently selected credentials if the above fails. + // UserLoginInfo contains "First Last @ Grid" and gets set in LLPanelLogin::onClickConnect() + // return NULL; + return gSecAPIHandler->loadCredential(gSavedSettings.getLLSD("UserLoginInfo")); + // } diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index c981bc9a9e..0bf0da9d87 100755 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -2761,7 +2761,10 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id) // [/FS:CR] if(mSubTabContainer) - mSubTabContainer->selectTab(1); + // FIRE-13501: Activate "Members" tab by default + //mSubTabContainer->selectTab(1); + mSubTabContainer->selectTab(0); + // activate(); } diff --git a/indra/newview/llpanellandmedia.cpp b/indra/newview/llpanellandmedia.cpp index 26cd3ff1c1..2d7722d00f 100755 --- a/indra/newview/llpanellandmedia.cpp +++ b/indra/newview/llpanellandmedia.cpp @@ -136,7 +136,8 @@ void LLPanelLandMedia::refresh() mMediaURLEdit->setText(parcel->getMediaURL()); mMediaURLEdit->setEnabled( FALSE ); - getChild("current_url")->setValue(parcel->getMediaCurrentURL()); + // Doesn't exists as of 2014-04-14 + //getChild("current_url")->setValue(parcel->getMediaCurrentURL()); mMediaDescEdit->setText(parcel->getMediaDesc()); mMediaDescEdit->setEnabled( can_change_media ); @@ -241,7 +242,8 @@ void LLPanelLandMedia::setMediaURL(const std::string& media_url) mMediaURLEdit->onCommit(); // LLViewerParcelMedia::sendMediaNavigateMessage(media_url); - getChild("current_url")->setValue(media_url); + // Doesn't exists as of 2014-04-14 + //getChild("current_url")->setValue(media_url); } std::string LLPanelLandMedia::getMediaURL() { @@ -321,10 +323,12 @@ void LLPanelLandMedia::onSetBtn(void *userdata) void LLPanelLandMedia::onResetBtn(void *userdata) { LLPanelLandMedia *self = (LLPanelLandMedia *)userdata; - LLParcel* parcel = self->mParcel->getParcel(); + // Doesn't exists as of 2014-04-14 + //LLParcel* parcel = self->mParcel->getParcel(); // LLViewerMedia::navigateHome(); self->refresh(); - self->getChild("current_url")->setValue(parcel->getMediaURL()); + // Doesn't exists as of 2014-04-14 + //self->getChild("current_url")->setValue(parcel->getMediaURL()); // LLViewerParcelMedia::sendMediaNavigateMessage(parcel->getMediaURL()); } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 30316678c5..72bb2e350e 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -77,6 +77,7 @@ #include "llevents.h" // for LLEventPumps // Firestorm includes +#include "fscommon.h" #include "fspanelradar.h" #include "lggcontactsets.h" #include "llcombobox.h" @@ -97,8 +98,8 @@ static const std::string BLOCKED_TAB_NAME = "blocked_panel"; // blocked avatars static const std::string CONTACT_SETS_TAB_NAME = "contact_sets_panel"; // [FS:CR] Contact sets static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; - -extern S32 gMaxAgentGroups; +// [FS] FIRE-12229 +//extern S32 gMaxAgentGroups; /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator @@ -996,8 +997,11 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); // a real group selected - groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count()))); + // [CR] FIRE-12229 + //groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); + //groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count()))); + getChild("groupcount")->setValue(FSCommon::populateGroupCount()); + // [/CR] } else { diff --git a/indra/newview/llsearchcombobox.h b/indra/newview/llsearchcombobox.h index 68f3979532..8e0c77bdd7 100755 --- a/indra/newview/llsearchcombobox.h +++ b/indra/newview/llsearchcombobox.h @@ -61,6 +61,9 @@ public: ~LLSearchComboBox(); + // Made publicly accessible + void focusTextEntry(); + protected: LLSearchComboBox(const Params&p); @@ -96,7 +99,8 @@ protected: /** * Sets focus to text box */ - void focusTextEntry(); + // Made publicly accessible + //void focusTextEntry(); LLButton* mSearchButton; }; diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index e44ca54049..44943759cb 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1000,7 +1000,10 @@ LLSelectNode *LLSelectMgr::getPrimaryHoverNode() return mHoverObjects->mSelectNodeMap[mHoverObjects->mPrimaryObject]; } -void LLSelectMgr::highlightObjectOnly(LLViewerObject* objectp) +// Color per highlighted object +//void LLSelectMgr::highlightObjectOnly(LLViewerObject* objectp) +void LLSelectMgr::highlightObjectOnly(LLViewerObject *objectp, LLColor4 const &aColor ) +// { if (!objectp) { @@ -1027,6 +1030,8 @@ void LLSelectMgr::highlightObjectOnly(LLViewerObject* objectp) // mRectSelectedObjects.insert(objectp); + + mHighlightColor[ objectp ] = aColor; // Color per highlighted object } void LLSelectMgr::highlightObjectAndFamily(LLViewerObject* objectp) @@ -1088,6 +1093,7 @@ void LLSelectMgr::unhighlightObjectOnly(LLViewerObject* objectp) } mRectSelectedObjects.erase(objectp); + mHighlightColor.erase( objectp ); // Color per highlighted object } void LLSelectMgr::unhighlightObjectAndFamily(LLViewerObject* objectp) @@ -1115,6 +1121,8 @@ void LLSelectMgr::unhighlightAll() { mRectSelectedObjects.clear(); mHighlightedObjects->deleteAllNodes(); + + mHighlightColor.clear(); // Color per highlighted object } LLObjectSelectionHandle LLSelectMgr::selectHighlightedObjects() @@ -5575,6 +5583,11 @@ void LLSelectMgr::updateSilhouettes() LLSelectNode* rect_select_root_node = new LLSelectNode(objectp, TRUE); rect_select_root_node->selectAllTEs(TRUE); + // Color per highlighted object + if( mHighlightColor.find( objectp ) != mHighlightColor.end() ) + rect_select_root_node->mHighlightColor = mHighlightColor[ objectp ]; + // + if (!select_linked_set) { rect_select_root_node->mIndividualSelection = TRUE; @@ -6206,7 +6219,7 @@ void pushWireframe(LLDrawable* drawable) } -void LLSelectNode::renderOneWireframe(const LLColor4& color) +void LLSelectNode::renderOneWireframe(const LLColor4& color) { LLViewerObject* objectp = getObject(); if (!objectp) @@ -6296,8 +6309,17 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color) //----------------------------------------------------------------------------- // renderOneSilhouette() //----------------------------------------------------------------------------- -void LLSelectNode::renderOneSilhouette(const LLColor4 &color) +// Color per highlighted object +//void LLSelectNode::renderOneSilhouette(const LLColor4 &color) +void LLSelectNode::renderOneSilhouette(const LLColor4 &aColor) +// { + // Color per highlighted object + LLColor4 color( aColor ); + if( this->mHighlightColor.lengthSquared() > 0 ) + color = this->mHighlightColor; + // + LLViewerObject* objectp = getObject(); if (!objectp) { diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index 364bd91a25..2514095809 100755 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -194,6 +194,8 @@ public: std::vector mSilhouetteNormals; // array of normals to render silhouette of object BOOL mSilhouetteExists; // need to generate silhouette? + LLColor4 mHighlightColor; // Color per highlighted object + protected: LLPointer mObject; S32 mTESelectMask; @@ -440,7 +442,11 @@ public: LLSelectNode *getHoverNode(); LLSelectNode *getPrimaryHoverNode(); - void highlightObjectOnly(LLViewerObject *objectp); + // Color per highlighted object + // void highlightObjectOnly(LLViewerObject *objectp); + void highlightObjectOnly(LLViewerObject *objectp, LLColor4 const &aColor = LLColor4() ); + // + void highlightObjectAndFamily(LLViewerObject *objectp); void highlightObjectAndFamily(const std::vector& list); @@ -782,6 +788,8 @@ private: LLObjectSelectionHandle mHighlightedObjects; std::set > mRectSelectedObjects; + std::map< LLPointer< LLViewerObject >, LLColor4 > mHighlightColor; // Color per highlighted object + LLObjectSelection mGridObjects; LLQuaternion mGridRotation; LLVector3 mGridOrigin; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index acde80dc40..0f2473a33e 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -80,6 +80,7 @@ U32 LLSpatialGroup::sNodeCount = 0; std::set LLSpatialGroup::sPendingQueries; U32 gOctreeMaxCapacity; +F32 gOctreeMinSize; BOOL LLSpatialGroup::sNoDelete = FALSE; diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index aa02f22ffe..b779ac55fb 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -4093,9 +4093,16 @@ bool process_login_success_response(U32 &first_sim_size_x, U32 &first_sim_size_y } else { +// [CR] FIRE-12229 +#ifdef OPENSIM + gMaxAgentGroups = 0; + LL_INFOS("LLStartup") << "did not receive max-agent-groups. unlimited groups activated" << LL_ENDL; +#else gMaxAgentGroups = DEFAULT_MAX_AGENT_GROUPS; LL_INFOS("LLStartup") << "using gMaxAgentGroups default: " << gMaxAgentGroups << LL_ENDL; +#endif +// [CR] FIRE-12229 } // diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 1780fc97bf..d405ace0b9 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -34,6 +34,7 @@ #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" +#include "llnotifications.h" #include "llpanellogin.h" #include "llregionhandle.h" #include "llslurl.h" @@ -311,16 +312,14 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const LLSLURL& //--------------------------------------------------------------------------- // Teleportation links are handled here because they are tightly coupled // to SLURL parsing and sim-fragment parsing + class LLTeleportHandler : public LLCommandHandler { public: // Teleport requests *must* come from a trusted browser // inside the app, otherwise a malicious web page could // cause a constant teleport loop. JC - // FIRE-13303: Teleport SLURLs don't work anymore - //LLTeleportHandler() : LLCommandHandler("teleport", UNTRUSTED_BLOCK) { } LLTeleportHandler() : LLCommandHandler("teleport", UNTRUSTED_THROTTLE) { } - // bool handle(const LLSD& tokens, const LLSD& query_map, LLMediaCtrl* web) @@ -328,6 +327,7 @@ public: // construct a "normal" SLURL, resolve the region to // a global position, and teleport to it if (tokens.size() < 1) return false; + // #ifdef OPENSIM LLSLURL slurl(tokens, true); @@ -337,7 +337,7 @@ public: std::string region_name = slurl.getRegion(); std::string dest; std::string current = LLGridManager::getInstance()->getGrid(); - if((grid != current) && (!LLGridManager::getInstance()->isInOpenSim() || (!slurl.getHypergrid() && gatekeeper.empty()))) + if ((grid != current) && (!LLGridManager::getInstance()->isInOpenSim() || (!slurl.getHypergrid() && gatekeeper.empty()))) { dest = slurl.getSLURLString(); if (!dest.empty()) @@ -350,22 +350,19 @@ public: return true; } } - else if(!gatekeeper.empty() && gatekeeper != LLGridManager::getInstance()->getGatekeeper()) + else if (!gatekeeper.empty() && gatekeeper != LLGridManager::getInstance()->getGatekeeper()) { region_name = gatekeeper + ":" + region_name; } dest = "hop://" + current + "/" + region_name; - for(int i=2; tokens.size() > i; i++) + for (S32 i = 2; tokens.size() > i; i++) { dest.append("/" + tokens[i].asString()); } - LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, - LLURLDispatcherImpl::regionHandleCallback, - LLSLURL(dest).getSLURLString(), - true); // teleport + std::string callback_url = LLSLURL(dest).getSLURLString(); #else // OPENSIM LLVector3 coords(128, 128, 0); if (tokens.size() <= 4) @@ -379,14 +376,49 @@ public: std::string region_name = LLURI::unescape(tokens[0]); - LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, LLURLDispatcherImpl::regionHandleCallback, LLSLURL(region_name, coords).getSLURLString(), true);// teleport + std::string callback_url = LLSLURL(region_name, coords).getSLURLString(); #endif // OPENSIM // + LLSD args; + args["LOCATION"] = region_name; + + LLSD payload; + payload["region_name"] = region_name; + payload["callback_url"] = callback_url; + + LLNotificationsUtil::add("TeleportViaSLAPP", args, payload); + return true; } + + static void teleport_via_slapp(std::string region_name, std::string callback_url) + { + + LLWorldMapMessage::getInstance()->sendNamedRegionRequest(region_name, + LLURLDispatcherImpl::regionHandleCallback, + callback_url, + true); // teleport + } + + static bool teleport_via_slapp_callback(const LLSD& notification, const LLSD& response) + { + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + + std::string region_name = notification["payload"]["region_name"].asString(); + std::string callback_url = notification["payload"]["callback_url"].asString(); + + if (option == 0) + { + teleport_via_slapp(region_name, callback_url); + return true; + } + + return false; + } }; LLTeleportHandler gTeleportHandler; +static LLNotificationFunctorRegistration open_landmark_callback_reg("TeleportViaSLAPP", LLTeleportHandler::teleport_via_slapp_callback); //--------------------------------------------------------------------------- diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index af83bd8227..a210ce3785 100755 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -410,6 +410,7 @@ static bool handleRepartition(const LLSD&) if (gPipeline.isInit()) { gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity"); + gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize"); gObjectList.repartitionObjects(); } return true; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 7b977e0f61..5e13526451 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -322,14 +322,14 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("perm_prefs", "floater_perm_prefs.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("picks", "floater_picks.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("pref_joystick", "floater_joystick.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); + LLFloaterReg::add("preview_anim", "floater_preview_animation.xml", (LLFloaterBuildFunc)&LLFloaterReg::build/*, "preview"*/); LLFloaterReg::add("preview_conversation", "floater_conversation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); - LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); - LLFloaterReg::add("preview_notecard", "floater_preview_notecard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); - LLFloaterReg::add("preview_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); - LLFloaterReg::add("preview_scriptedit", "floater_live_lsleditor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); - LLFloaterReg::add("preview_sound", "floater_preview_sound.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); - LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview"); + LLFloaterReg::add("preview_gesture", "floater_preview_gesture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build/*, "preview"*/); + LLFloaterReg::add("preview_notecard", "floater_preview_notecard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build/*, "preview"*/); + LLFloaterReg::add("preview_script", "floater_script_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview_script" /*"preview"*/); + LLFloaterReg::add("preview_scriptedit", "floater_live_lsleditor.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "preview_script" /*"preview"*/); + LLFloaterReg::add("preview_sound", "floater_preview_sound.xml", (LLFloaterBuildFunc)&LLFloaterReg::build/*, "preview"*/); + LLFloaterReg::add("preview_texture", "floater_preview_texture.xml", (LLFloaterBuildFunc)&LLFloaterReg::build/*, "preview"*/); LLFloaterReg::add("properties", "floater_inventory_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("publish_classified", "floater_publish_classified.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d3ed8fe9a9..e6f5352fc7 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -4011,6 +4011,61 @@ bool enable_freeze_eject(const LLSD& avatar_id) // return new_value; } +// FIRE-13515: Re-add give calling card +class LLAvatarGiveCard : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LL_INFOS("LLAvatarGiveCard") << "handle_give_card()" << LL_ENDL; + LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); +// [RLVa:KB] - Checked: 2010-06-04 (RLVa-1.2.0d) | Modified: RLVa-1.2.0d | OK + //if(dest && dest->isAvatar()) + if ( (dest && dest->isAvatar()) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) +// [/RLVa:KB] + { + bool found_name = false; + LLSD args; + LLSD old_args; + LLNameValue* nvfirst = dest->getNVPair("FirstName"); + LLNameValue* nvlast = dest->getNVPair("LastName"); + if(nvfirst && nvlast) + { + std::string full_name = gCacheName->buildFullName(nvfirst->getString(), nvlast->getString()); + args["NAME"] = full_name; + old_args["NAME"] = full_name; + found_name = true; + } + LLViewerRegion* region = dest->getRegion(); + LLHost dest_host; + if(region) + { + dest_host = region->getHost(); + } + if(found_name && dest_host.isOk()) + { + LLMessageSystem* msg = gMessageSystem; + msg->newMessage("OfferCallingCard"); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_AgentBlock); + msg->addUUIDFast(_PREHASH_DestID, dest->getID()); + LLUUID transaction_id; + transaction_id.generate(); + msg->addUUIDFast(_PREHASH_TransactionID, transaction_id); + msg->sendReliable(dest_host); + LLNotificationsUtil::add("OfferedCard", args); + } + else + { + LLNotificationsUtil::add("CantOfferCallingCard", old_args); + } + } + return true; + } +}; +// FIRE-13515: Re-add give calling card + bool callback_leave_group(const LLSD& notification, const LLSD& response) { S32 option = LLNotificationsUtil::getSelectedOption(notification, response); @@ -9078,10 +9133,13 @@ class FSAddToContactSet : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLVOAvatar* avatarp = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); - if (avatarp) + if (!rlv_handler_t::isEnabled() || !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { - LLFloaterReg::showInstance("fs_add_contact", LLSD(avatarp->getID()), TRUE); + LLVOAvatar* avatarp = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); + if (avatarp) + { + LLFloaterReg::showInstance("fs_add_contact", LLSD(avatarp->getID()), TRUE); + } } return true; } @@ -10767,6 +10825,9 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarDebug(), "Avatar.Debug"); view_listener_t::addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); view_listener_t::addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup"); + // FIRE-13515: Re-add give calling card + view_listener_t::addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); + // FIRE-13515: Re-add give calling card commit.add("Avatar.Eject", boost::bind(&handle_avatar_eject, LLSD())); commit.add("Avatar.ShowInspector", boost::bind(&handle_avatar_show_inspector)); view_listener_t::addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); @@ -10896,10 +10957,7 @@ void initialize_menus() // [RLVa:KB] - Checked: 2010-04-23 (RLVa-1.2.0g) | Added: RLVa-1.2.0 commit.add("RLV.ToggleEnabled", boost::bind(&rlvMenuToggleEnabled)); enable.add("RLV.CheckEnabled", boost::bind(&rlvMenuCheckEnabled)); - if (rlv_handler_t::isEnabled()) - { - enable.add("RLV.EnableIfNot", boost::bind(&rlvMenuEnableIfNot, _2)); - } + enable.add("RLV.EnableIfNot", boost::bind(&rlvMenuEnableIfNot, _2)); // [/RLVa:KB] // Toggle internal web browser diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 276f5dd4bf..dbd4cce163 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -716,7 +716,10 @@ bool join_group_response(const LLSD& notification, const LLSD& response) S32 max_groups = gMaxAgentGroups; if(gAgent.isInGroup(group_id)) ++max_groups; - if(gAgent.mGroups.count() < max_groups) + // [CR] FIRE-12229 + //if(gAgent.mGroups.count() < max_groups) + if(!max_groups || gAgent.mGroups.count() < max_groups) + // [/CR] FIRE-12229 { accept_invite = true; } @@ -2830,7 +2833,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM) chat.mText = buffer; - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, false)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, false)) { FSKeywords::notify(chat); } @@ -2926,7 +2929,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM) chat.mText = message; - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, false)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, false)) { FSKeywords::notify(chat); } @@ -3386,7 +3389,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) chat.mText = message; // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of Task IM) - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, true)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, true)) { FSKeywords::notify(chat); } @@ -3488,7 +3491,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM) chat.mText = message; - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, false)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, false)) { FSKeywords::notify(chat); } @@ -4607,7 +4610,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) chat.mOwnerID = owner_id; // FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of local chat) - if ((chat.mFromID != gAgent.getID() || chat.mFromName == SYSTEM_FROM) && FSKeywords::getInstance()->chatContainsKeyword(chat, true)) + if (FSKeywords::getInstance()->chatContainsKeyword(chat, true)) { FSKeywords::notify(chat); } diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 3946c33fee..035fa41be9 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1683,40 +1683,69 @@ void LLViewerRegion::unpackRegionHandshake() { LLUUID tmp_id; + bool changed = false; + + // Get the 4 textures for land msg->getUUID("RegionInfo", "TerrainDetail0", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(0)); compp->setDetailTextureID(0, tmp_id); + msg->getUUID("RegionInfo", "TerrainDetail1", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(1)); compp->setDetailTextureID(1, tmp_id); + msg->getUUID("RegionInfo", "TerrainDetail2", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(2)); compp->setDetailTextureID(2, tmp_id); + msg->getUUID("RegionInfo", "TerrainDetail3", tmp_id); + changed |= (tmp_id != compp->getDetailTextureID(3)); compp->setDetailTextureID(3, tmp_id); + // Get the start altitude and range values for land textures F32 tmp_f32; msg->getF32("RegionInfo", "TerrainStartHeight00", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(0)); compp->setStartHeight(0, tmp_f32); + msg->getF32("RegionInfo", "TerrainStartHeight01", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(1)); compp->setStartHeight(1, tmp_f32); + msg->getF32("RegionInfo", "TerrainStartHeight10", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(2)); compp->setStartHeight(2, tmp_f32); + msg->getF32("RegionInfo", "TerrainStartHeight11", tmp_f32); + changed |= (tmp_f32 != compp->getStartHeight(3)); compp->setStartHeight(3, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange00", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(0)); compp->setHeightRange(0, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange01", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(1)); compp->setHeightRange(1, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange10", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(2)); compp->setHeightRange(2, tmp_f32); + msg->getF32("RegionInfo", "TerrainHeightRange11", tmp_f32); + changed |= (tmp_f32 != compp->getHeightRange(3)); compp->setHeightRange(3, tmp_f32); // If this is an UPDATE (params already ready, we need to regenerate // all of our terrain stuff, by if (compp->getParamsReady()) { - //this line creates frame stalls on region crossing and removing it appears to have no effect - //getLand().dirtyAllPatches(); + // Update if the land changed + if (changed) + { + getLand().dirtyAllPatches(); + } } else { diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index a9c55314aa..dce916b445 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -222,6 +222,13 @@ public: // [/SL:KB] mHasMouseHover(false) { + // Handle NULL pointers in mImage gracefully + if(!mImage) + { + LL_WARNS("UI") << "NULL Image pointer for text segment of embedded inventory." << LL_ENDL; + mImage=LLUI::getUIImage("Unknown_Icon"); + } + // mStyle = new LLStyle(LLStyle::Params().font(LLFontGL::getFontSansSerif())); mToolTip = inv_item->getName() + '\n' + inv_item->getDescription(); @@ -631,7 +638,13 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const case LLAssetType::AT_ANIMATION: img_name = "Inv_Animation"; break; case LLAssetType::AT_GESTURE: img_name = "Inv_Gesture"; break; case LLAssetType::AT_MESH: img_name = "Inv_Mesh"; break; - default: llassert(0); + // Don't crash, try to recover gracefully + // default: llassert(0); + default: + img_name = "Unknown_Icon"; + LL_WARNS("UI") << "Unknown asset type " << item->getType() << " for text segment of embedded inventory." << LL_ENDL; + break; + // } return LLUI::getUIImage(img_name); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index be25753acd..3dd3281152 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3648,6 +3648,9 @@ void LLViewerWindow::updateUI() updateLayout(); + // Backout MAINT-3250 + mLastMousePoint = mCurrentMousePoint; + // cleanup unused selections when no modal dialogs are open if (LLModalDialog::activeCount() == 0) { @@ -3888,7 +3891,8 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point) // Store last mouse location. // If mouse leaves window, pretend last point was on edge of window - mLastMousePoint = mCurrentMousePoint; + // Backout MAINT-3250 + //mLastMousePoint = mCurrentMousePoint; if (point.mX < 0) { diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 53ec199ce1..7e7fe5432b 100755 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -1696,6 +1696,16 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask, } +// Backout MAINT-3250 +BOOL outside_slop(S32 x, S32 y, S32 start_x, S32 start_y) +{ + S32 dx = x - start_x; + S32 dy = y - start_y; + + return (dx <= -2 || 2 <= dx || dy <= -2 || 2 <= dy); +} +// + BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask ) { gFocusMgr.setMouseCapture( this ); @@ -1778,7 +1788,10 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) { if (hasMouseCapture()) { - if (mPanning || llabs(x - mMouseDownX) > 1 || llabs(y - mMouseDownY) > 1) + // Backout MAINT-3250 + //if (mPanning || llabs(x - mMouseDownX) > 1 || llabs(y - mMouseDownY) > 1) + if (mPanning || outside_slop(x, y, mMouseDownX, mMouseDownY)) + // { // just started panning, so hide cursor if (!mPanning) @@ -1795,6 +1808,9 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask ) sPanY += delta_y; sTargetPanX = sPanX; sTargetPanY = sPanY; + + // Backout MAINT-3250 + gViewerWindow->moveCursorToCenter(); } // doesn't matter, cursor should be hidden diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a005bb0702..455dc55181 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -506,6 +506,7 @@ void LLPipeline::init() refreshCachedSettings(); gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity"); + gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize"); sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD"); sRenderBump = gSavedSettings.getBOOL("RenderObjectBump"); sUseTriStrips = gSavedSettings.getBOOL("RenderUseTriStrips"); diff --git a/indra/newview/skins/default/xui/de/menu_attachment_other.xml b/indra/newview/skins/default/xui/de/menu_attachment_other.xml index 12882a0e82..aa60a32af6 100755 --- a/indra/newview/skins/default/xui/de/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/de/menu_attachment_other.xml @@ -3,7 +3,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/menu_avatar_other.xml b/indra/newview/skins/default/xui/de/menu_avatar_other.xml index 585e5621bd..1a4a4d8e5b 100755 --- a/indra/newview/skins/default/xui/de/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/de/menu_avatar_other.xml @@ -3,7 +3,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/menu_inventory_add.xml b/indra/newview/skins/default/xui/de/menu_inventory_add.xml index 831b49a80e..75d63de096 100755 --- a/indra/newview/skins/default/xui/de/menu_inventory_add.xml +++ b/indra/newview/skins/default/xui/de/menu_inventory_add.xml @@ -8,6 +8,7 @@ + diff --git a/indra/newview/skins/default/xui/de/menu_pie_attachment_other.xml b/indra/newview/skins/default/xui/de/menu_pie_attachment_other.xml index 85332f9466..5e74b8c350 100644 --- a/indra/newview/skins/default/xui/de/menu_pie_attachment_other.xml +++ b/indra/newview/skins/default/xui/de/menu_pie_attachment_other.xml @@ -16,7 +16,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/menu_pie_avatar_other.xml b/indra/newview/skins/default/xui/de/menu_pie_avatar_other.xml index 6c919ac0f8..e774bbbdb1 100644 --- a/indra/newview/skins/default/xui/de/menu_pie_avatar_other.xml +++ b/indra/newview/skins/default/xui/de/menu_pie_avatar_other.xml @@ -16,7 +16,7 @@ - + diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index f17b38aea1..d2d2a20a7a 100755 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -1788,6 +1788,10 @@ womit Sie die Höchstgrenze von [LIMIT] überschreiten. Sind Sie sicher, dass Sie zu <nolink>[LOCATION]</nolink> teleportieren möchten? + + Sind Sie sicher, dass Sie zu <nolink>[LOCATION]</nolink> teleportieren möchten? + + Nach [PICK] teleportieren? @@ -2487,6 +2491,9 @@ Dies kann die Eingabe Ihres Passworts beeinflussen. Geschützte Kategorien können nicht entfernt werden. + + Sie haben [NAME] Ihre Vistenkarte angeboten. + Kauf nicht möglich. Objektdaten werden noch geladen. Bitte versuchen Sie es erneut. diff --git a/indra/newview/skins/default/xui/de/panel_avatar_list_item.xml b/indra/newview/skins/default/xui/de/panel_avatar_list_item.xml index ef26b30052..e550484e39 100755 --- a/indra/newview/skins/default/xui/de/panel_avatar_list_item.xml +++ b/indra/newview/skins/default/xui/de/panel_avatar_list_item.xml @@ -30,4 +30,5 @@