diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h
index d006e389c..a1ad68e4f 100644
--- a/indra/llappearance/llpolymesh.h
+++ b/indra/llappearance/llpolymesh.h
@@ -36,7 +36,7 @@
#include "llquaternion.h"
#include "llpolymorph.h"
#include "lljoint.h"
-//#include "lldarray.h"
+#include "lldarray.h"
class LLSkinJoint;
class LLAvatarAppearance;
diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp
index f38b98210..c3abbfd90 100644
--- a/indra/llappearance/lltexglobalcolor.cpp
+++ b/indra/llappearance/lltexglobalcolor.cpp
@@ -105,7 +105,8 @@ LLTexParamGlobalColor::LLTexParamGlobalColor(LLTexGlobalColor* tex_global_color)
void LLTexParamGlobalColor::onGlobalColorChanged(bool upload_bake)
{
- mAvatarAppearance->onGlobalColorChanged(mTexGlobalColor, upload_bake);
+ if (mAvatarAppearance)
+ mAvatarAppearance->onGlobalColorChanged(mTexGlobalColor, upload_bake);
}
//-----------------------------------------------------------------------------
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index f618b446f..bfa1c0bd8 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -269,6 +269,9 @@ public:
static std::vector< LLCharacter* > sInstances;
static BOOL sAllowInstancesChange ; //debug use
+ virtual void setHoverOffset(const LLVector3& hover_offset, bool send_update=true) { mHoverOffset = hover_offset; }
+ const LLVector3& getHoverOffset() const { return mHoverOffset; }
+
protected:
LLMotionController mMotionController;
@@ -293,6 +296,8 @@ private:
visual_param_index_map_t mVisualParamIndexMap;
visual_param_name_map_t mVisualParamNameMap;
static LLStringTable sVisualParamNames;
+
+ LLVector3 mHoverOffset;
};
#endif // LL_LLCHARACTER_H
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index f633fc32d..2196f47bb 100644
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -31,17 +31,16 @@
// Header Files
//-----------------------------------------------------------------------------
#include
+#include
-#include "linked_lists.h"
#include "v3math.h"
#include "v4math.h"
#include "m4math.h"
#include "llquaternion.h"
#include "xform.h"
-#include "lldarray.h"
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
-const U32 LL_CHARACTER_MAX_JOINTS = 32; // must be divisible by 16!
+const U32 LL_CHARACTER_MAX_JOINTS = 32; // must be divisible by 4!
const U32 LL_HAND_JOINT_NUM = 31;
const U32 LL_FACE_JOINT_NUM = 30;
const S32 LL_CHARACTER_MAX_PRIORITY = 7;
@@ -84,6 +83,7 @@ protected:
LLXformMatrix mDefaultXform;
LLUUID mId;
+
public:
U32 mDirtyFlags;
BOOL mUpdateXform;
diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index 4be835dce..e223b329d 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1047,7 +1047,8 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
{
case CONSTRAINT_TARGET_TYPE_GROUND:
target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos);
-// llinfos << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << llendl;
+ target_pos += mCharacter->getHoverOffset();
+// LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL;
break;
case CONSTRAINT_TARGET_TYPE_BODY:
target_pos = mCharacter->getVolumePos(shared_data->mTargetConstraintVolume, shared_data->mTargetConstraintOffset);
@@ -1111,7 +1112,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8
LLVector3 source_to_target = target_pos - keyframe_source_pos;
- S32 max_iteration_count = llmath::llround(clamp_rescale(
+ S32 max_iteration_count = ll_round(clamp_rescale(
mCharacter->getPixelArea(),
MAX_PIXEL_AREA_CONSTRAINTS,
MIN_PIXEL_AREA_CONSTRAINTS,
diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp
index 2764405e5..03162ff94 100644
--- a/indra/llcharacter/llmotioncontroller.cpp
+++ b/indra/llcharacter/llmotioncontroller.cpp
@@ -876,12 +876,12 @@ void LLMotionController::updateMotions(bool force_update)
//
// This old code is nonsense.
- //S32 quantum_count = llmax(0, llmath::llround((update_time - time_interval) / mTimeStep)) + 1;
- // (update_time - time_interval) / mTimeStep is an integer! We need llround to get rid of floating point errors, not llfloor.
- // Moreover, just rounding off to the nearest integer with llmath::llround(update_time / mTimeStep) makes a lot more sense:
+ //S32 quantum_count = llmax(0, ll_round((update_time - time_interval) / mTimeStep)) + 1;
+ // (update_time - time_interval) / mTimeStep is an integer! We need ll_round to get rid of floating point errors, not llfloor.
+ // Moreover, just rounding off to the nearest integer with ll_round(update_time / mTimeStep) makes a lot more sense:
// it is the best we can do to get as close to what we should draw as possible.
// However, mAnimTime may only be incremented; therefore make sure of that with the llmax.
- S32 quantum_count = llmax(llmath::llround(update_time / mTimeStep), llceil(mAnimTime / mTimeStep));
+ S32 quantum_count = llmax(ll_round(update_time / mTimeStep), llceil(mAnimTime / mTimeStep));
//
if (quantum_count == mTimeStepCount)
{
diff --git a/indra/llcharacter/llmultigesture.cpp b/indra/llcharacter/llmultigesture.cpp
index d8290681a..ef42576dc 100644
--- a/indra/llcharacter/llmultigesture.cpp
+++ b/indra/llcharacter/llmultigesture.cpp
@@ -49,6 +49,7 @@ LLMultiGesture::LLMultiGesture()
mReplaceText(),
mSteps(),
mPlaying(FALSE),
+ mLocal(false),
mCurrentStep(0),
mDoneCallback(NULL)
{
@@ -63,6 +64,7 @@ LLMultiGesture::~LLMultiGesture()
void LLMultiGesture::reset()
{
mPlaying = FALSE;
+ mLocal = false;
mCurrentStep = 0;
mWaitTimer.reset();
mWaitingTimer = FALSE;
diff --git a/indra/llcharacter/llmultigesture.h b/indra/llcharacter/llmultigesture.h
index 4c5a29cf0..8e4821357 100644
--- a/indra/llcharacter/llmultigesture.h
+++ b/indra/llcharacter/llmultigesture.h
@@ -79,6 +79,9 @@ public:
// Is the gesture currently playing?
BOOL mPlaying;
+ // Is the gesture to be played locally?
+ bool mLocal;
+
// "instruction pointer" for steps
S32 mCurrentStep;
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index db4823329..23ffd221b 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -69,6 +69,7 @@ set(llcommon_SOURCE_FILES
llmetrics.cpp
llmortician.cpp
lloptioninterface.cpp
+ llpredicate.cpp
llprocesslauncher.cpp
llprocessor.cpp
llptrto.cpp
@@ -177,7 +178,6 @@ set(llcommon_HEADER_FILES
llformat.h
llframetimer.h
llhandle.h
- llhash.h
llheartbeat.h
llhttpstatuscodes.h
llindexedqueue.h
@@ -199,6 +199,7 @@ set(llcommon_HEADER_FILES
llnametable.h
lloptioninterface.h
llpointer.h
+ llpredicate.h
llpreprocessor.h
llpriqueuemap.h
llprocesslauncher.h
@@ -241,7 +242,6 @@ set(llcommon_HEADER_FILES
lltypeinfolookup.h
lluri.h
lluuid.h
- sguuidhash.h
llversionviewer.h.in
llworkerthread.h
metaclass.h
diff --git a/indra/llcommon/indra_constants.h b/indra/llcommon/indra_constants.h
index ea8c91155..7e7bdaa85 100644
--- a/indra/llcommon/indra_constants.h
+++ b/indra/llcommon/indra_constants.h
@@ -140,10 +140,6 @@ const U32 DEFAULT_CGI_SERVICES_PORT = 12045;
// on a single host for map tile generation. JC
const U32 DEFAULT_MAPSERVER_PORT = 12124;
-// For automatic port discovery when running multiple viewers on one host
-const U32 PORT_DISCOVERY_RANGE_MIN = 13000;
-const U32 PORT_DISCOVERY_RANGE_MAX = PORT_DISCOVERY_RANGE_MIN + 50;
-
const char LAND_LAYER_CODE = 'L';
const char WATER_LAYER_CODE = 'W';
const char WIND_LAYER_CODE = '7';
diff --git a/indra/llcommon/llatomic.h b/indra/llcommon/llatomic.h
index 525deaa2a..3ffd7e125 100644
--- a/indra/llcommon/llatomic.h
+++ b/indra/llcommon/llatomic.h
@@ -50,7 +50,7 @@
#include "boost/atomic.hpp"
template
struct impl_atomic_type { typedef boost::atomic type; };
-#elif defined(USE_STD_ATOMIC) && (__cplusplus >= 201103L || _MSC_VER >= 1800)
+#elif defined(USE_STD_ATOMIC) && defined(LL_CPP11)
#include
template
struct impl_atomic_type { typedef std::atomic type; };
diff --git a/indra/llcommon/llbase32.h b/indra/llcommon/llbase32.h
index 0697f7b8e..417cd930a 100644
--- a/indra/llcommon/llbase32.h
+++ b/indra/llcommon/llbase32.h
@@ -3,31 +3,25 @@
* @brief base32 encoding that returns a std::string
* @author James Cook
*
- * $LicenseInfo:firstyear=2007&license=viewergpl$
- *
- * Copyright (c) 2007-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * 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.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
+ * 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.
*
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * 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
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
diff --git a/indra/llcommon/llbase64.cpp b/indra/llcommon/llbase64.cpp
index 7020a79a2..4e75e4591 100644
--- a/indra/llcommon/llbase64.cpp
+++ b/indra/llcommon/llbase64.cpp
@@ -3,31 +3,25 @@
* @brief Wrapper for apr base64 encoding that returns a std::string
* @author James Cook
*
- * $LicenseInfo:firstyear=2007&license=viewergpl$
- *
- * Copyright (c) 2007-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * 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.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * 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
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -36,32 +30,72 @@
#include "llbase64.h"
#include
-
#include "apr_base64.h"
-
// static
std::string LLBase64::encode(const U8* input, size_t input_size)
{
- std::string output;
- if (input
- && input_size > 0)
- {
- // Yes, it returns int.
- int b64_buffer_length = apr_base64_encode_len(input_size);
- char* b64_buffer = new char[b64_buffer_length];
-
- // This is faster than apr_base64_encode() if you know
- // you're not on an EBCDIC machine. Also, the output is
- // null terminated, even though the documentation doesn't
- // specify. See apr_base64.c for details. JC
- b64_buffer_length = apr_base64_encode_binary(
- b64_buffer,
- input,
- input_size);
- output.assign(b64_buffer);
- delete[] b64_buffer;
- }
- return output;
+ if (!(input && input_size > 0)) return LLStringUtil::null;
+
+ // Yes, it returns int.
+ int b64_buffer_length = apr_base64_encode_len(input_size);
+ char* b64_buffer = new char[b64_buffer_length];
+
+ // This is faster than apr_base64_encode() if you know
+ // you're not on an EBCDIC machine. Also, the output is
+ // null terminated, even though the documentation doesn't
+ // specify. See apr_base64.c for details. JC
+ b64_buffer_length = apr_base64_encode_binary(
+ b64_buffer,
+ input,
+ input_size);
+ std::string result;
+ result.assign(b64_buffer);
+ delete[] b64_buffer;
+
+ return result;
+}
+
+// static
+std::string LLBase64::encode(const std::string& in_str)
+{
+ size_t data_size = in_str.size();
+ std::vector data;
+ data.resize(data_size);
+ memcpy(&data[0], in_str.c_str(), data_size);
+ return encode(&data[0], data_size);
+}
+
+// static
+size_t LLBase64::decode(const std::string& input, U8 * buffer, size_t buffer_size)
+{
+ if (input.empty()) return 0;
+
+ size_t bytes_written = apr_base64_decode_binary(buffer, input.data());
+
+ return bytes_written;
+}
+
+std::string LLBase64::decode(const std::string& input)
+{
+ U32 buffer_len = LLBase64::requiredDecryptionSpace(input);
+ std::vector buffer(buffer_len);
+ buffer_len = LLBase64::decode(input, &buffer[0], buffer_len);
+ buffer.resize(buffer_len);
+ return std::string(reinterpret_cast(&buffer[0]), buffer_len);
+}
+
+// static
+size_t LLBase64::requiredDecryptionSpace(const std::string& str)
+{
+ size_t len = str.length();
+ U32 padding = 0;
+
+ if (str[len - 1] == '=' && str[len - 2] == '=') //last two chars are =
+ padding = 2;
+ else if (str[len - 1] == '=') //last char is =
+ padding = 1;
+
+ return len * 0.75 - padding;
}
diff --git a/indra/llcommon/llbase64.h b/indra/llcommon/llbase64.h
index c48fea247..74e5b4645 100644
--- a/indra/llcommon/llbase64.h
+++ b/indra/llcommon/llbase64.h
@@ -3,31 +3,25 @@
* @brief Wrapper for apr base64 encoding that returns a std::string
* @author James Cook
*
- * $LicenseInfo:firstyear=2007&license=viewergpl$
- *
- * Copyright (c) 2007-2009, Linden Research, Inc.
- *
+ * $LicenseInfo:firstyear=2007&license=viewerlgpl$
* Second Life Viewer Source Code
- * The source code in this file ("Source Code") is provided by Linden Lab
- * to you under the terms of the GNU General Public License, version 2.0
- * ("GPL"), unless you have obtained a separate licensing agreement
- * ("Other License"), formally executed by you and Linden Lab. Terms of
- * the GPL can be found in doc/GPL-license.txt in this distribution, or
- * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * 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.
*
- * There are special exceptions to the terms and conditions of the GPL as
- * it is applied to this Source Code. View the full text of the exception
- * in the file doc/FLOSS-exception.txt in this software distribution, or
- * online at
- * http://secondlifegrid.net/programs/open_source/licensing/flossexception
- *
- * By copying, modifying or distributing this software, you acknowledge
- * that you have read and understood your obligations described above,
- * and agree to abide by those obligations.
- *
- * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
- * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
- * COMPLETENESS OR PERFORMANCE.
+ * 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
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -37,7 +31,11 @@
class LL_COMMON_API LLBase64
{
public:
+ static std::string encode(const std::string& in_str);
static std::string encode(const U8* input, size_t input_size);
+ static size_t decode(const std::string& input, U8 * buffer, size_t buffer_size);
+ static std::string decode(const std::string& input);
+ static size_t requiredDecryptionSpace(const std::string& str);
};
#endif
diff --git a/indra/llcommon/llhash.h b/indra/llcommon/llhash.h
deleted file mode 100644
index 748bc9291..000000000
--- a/indra/llcommon/llhash.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * @file llhash.h
- * @brief Wrapper for a hash function.
- *
- * $LicenseInfo:firstyear=2004&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * 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
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLHASH_H
-#define LL_LLHASH_H
-
-#include "llpreprocessor.h" // for GCC_VERSION
-
-#if (LL_WINDOWS)
-#include
-#include
-#elif LL_DARWIN || LL_LINUX
-#if GCC_VERSION >= 40300 || LL_ICC || LL_CLANG// gcc 4.3 or icc 11 and up
-# include
-#elif GCC_VERSION >= 30400 // gcc 3.4 and up
-# include
-#elif __GNUC__ >= 3
-# include
-#else
-# include
-#endif
-#elif LL_SOLARIS
-#include
-#else
-#error Please define your platform.
-#endif
-
-// Warning - an earlier template-based version of this routine did not do
-// the correct thing on Windows. Since this is only used to get
-// a string hash, it was converted to a regular routine and
-// unit tests added.
-
-inline size_t llhash( const char * value )
-{
-#if LL_WINDOWS
- return stdext::hash_value(value);
-#elif ( (defined _STLPORT_VERSION) || ((LL_LINUX) && (__GNUC__ <= 2)) )
- std::hash H;
- return H(value);
-#elif LL_DARWIN || LL_LINUX || LL_SOLARIS
- __gnu_cxx::hash H;
- return H(value);
-#else
-#error Please define your platform.
-#endif
-}
-
-#endif
-
diff --git a/indra/llcommon/llinitparam.cpp b/indra/llcommon/llinitparam.cpp
index 89c831d29..dbd4eba7a 100644
--- a/indra/llcommon/llinitparam.cpp
+++ b/indra/llcommon/llinitparam.cpp
@@ -28,10 +28,17 @@
#include "linden_common.h"
#include "llinitparam.h"
+#include "llformat.h"
namespace LLInitParam
{
+
+ predicate_rule_t default_parse_rules()
+ {
+ return ll_make_predicate(PROVIDED) && !ll_make_predicate(EMPTY);
+ }
+
//
// Param
//
@@ -196,6 +203,9 @@ namespace LLInitParam
bool BaseBlock::validateBlock(bool emit_errors) const
{
+ // only validate block when it hasn't already passed validation with current data
+ if (!mValidated)
+ {
const BlockDescriptor& block_data = mostDerivedBlockDescriptor();
for (BlockDescriptor::param_validation_list_t::const_iterator it = block_data.mValidationList.begin(); it != block_data.mValidationList.end(); ++it)
{
@@ -209,11 +219,18 @@ namespace LLInitParam
return false;
}
}
- return true;
+ mValidated = true;
+ }
+ return mValidated;
}
- void BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const LLInitParam::BaseBlock* diff_block) const
+ bool BaseBlock::serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const LLInitParam::BaseBlock* diff_block) const
{
+ bool serialized = false;
+ if (!predicate_rule.check(ll_make_predicate(PROVIDED, isProvided())))
+ {
+ return false;
+ }
// named param is one like LLView::Params::follows
// unnamed param is like LLView::Params::rect - implicit
const BlockDescriptor& block_data = mostDerivedBlockDescriptor();
@@ -225,10 +242,10 @@ namespace LLInitParam
param_handle_t param_handle = (*it)->mParamHandle;
const Param* param = getParamFromHandle(param_handle);
ParamDescriptor::serialize_func_t serialize_func = (*it)->mSerializeFunc;
- if (serialize_func)
+ if (serialize_func && predicate_rule.check(ll_make_predicate(PROVIDED, param->anyProvided())))
{
const Param* diff_param = diff_block ? diff_block->getParamFromHandle(param_handle) : NULL;
- serialize_func(*param, parser, name_stack, diff_param);
+ serialized |= serialize_func(*param, parser, name_stack, predicate_rule, diff_param);
}
}
@@ -239,7 +256,7 @@ namespace LLInitParam
param_handle_t param_handle = it->second->mParamHandle;
const Param* param = getParamFromHandle(param_handle);
ParamDescriptor::serialize_func_t serialize_func = it->second->mSerializeFunc;
- if (serialize_func && param->anyProvided())
+ if (serialize_func && predicate_rule.check(ll_make_predicate(PROVIDED, param->anyProvided())))
{
// Ensure this param has not already been serialized
// Prevents from being serialized as its own tag.
@@ -264,10 +281,17 @@ namespace LLInitParam
name_stack.push_back(std::make_pair(it->first, !duplicate));
const Param* diff_param = diff_block ? diff_block->getParamFromHandle(param_handle) : NULL;
- serialize_func(*param, parser, name_stack, diff_param);
+ serialized |= serialize_func(*param, parser, name_stack, predicate_rule, diff_param);
name_stack.pop_back();
}
}
+
+ if (!serialized && predicate_rule.check(ll_make_predicate(EMPTY)))
+ {
+ serialized |= parser.writeValue(Flag(), name_stack);
+ }
+ // was anything serialized in this block?
+ return serialized;
}
bool BaseBlock::inspectBlock(Parser& parser, Parser::name_stack_t name_stack, S32 min_count, S32 max_count) const
diff --git a/indra/llcommon/llinitparam.h b/indra/llcommon/llinitparam.h
index 7870fd750..24f59c44a 100644
--- a/indra/llcommon/llinitparam.h
+++ b/indra/llcommon/llinitparam.h
@@ -29,14 +29,17 @@
#define LL_LLPARAM_H
#include
+#include
#include
+#include
#include
#include
#include
-#include
#include "llerror.h"
#include "llstl.h"
+#include "llpredicate.h"
+#include "llsd.h"
namespace LLTypeTags
{
@@ -195,6 +198,8 @@ namespace LLInitParam
return mValue;
}
+ bool isValid() const { return true; }
+
protected:
T mValue;
};
@@ -209,13 +214,11 @@ namespace LLInitParam
typedef T value_t;
ParamValue()
- : T(),
- mValidated(false)
+ : T()
{}
ParamValue(const default_value_t& other)
- : T(other),
- mValidated(false)
+ : T(other)
{}
void setValue(const value_t& val)
@@ -232,9 +235,6 @@ namespace LLInitParam
{
return *this;
}
-
- protected:
- mutable bool mValidated; // lazy validation flag
};
@@ -435,7 +435,7 @@ namespace LLInitParam
typedef self_t type_value_t;
TypeValuesHelper(const std::string& val)
- : base_t(val)
+ : base_t::TypeValuesHelper(val) // Fix invalid blah gcc
{}
void operator ()(const std::string& name)
@@ -579,6 +579,19 @@ namespace LLInitParam
class Param;
+ enum ESerializePredicates
+ {
+ PROVIDED,
+ REQUIRED,
+ VALID,
+ HAS_DEFAULT_VALUE,
+ EMPTY
+ };
+
+ typedef LLPredicate::Rule predicate_rule_t;
+
+ LL_COMMON_API predicate_rule_t default_parse_rules();
+
// various callbacks and constraints associated with an individual param
struct LL_COMMON_API ParamDescriptor
{
@@ -589,7 +602,7 @@ namespace LLInitParam
typedef bool(*merge_func_t)(Param&, const Param&, bool);
typedef bool(*deserialize_func_t)(Param&, Parser&, Parser::name_stack_range_t&, bool);
- typedef void(*serialize_func_t)(const Param&, Parser&, Parser::name_stack_t&, const Param* diff_param);
+ typedef bool(*serialize_func_t)(const Param&, Parser&, Parser::name_stack_t&, const predicate_rule_t rules, const Param* diff_param);
typedef void(*inspect_func_t)(const Param&, Parser&, Parser::name_stack_t&, S32 min_count, S32 max_count);
typedef bool(*validation_func_t)(const Param*);
@@ -829,12 +842,28 @@ namespace LLInitParam
LOG_CLASS(BaseBlock);
friend class Param;
+ BaseBlock()
+ : mValidated(false),
+ mParamProvided(false)
+ {}
+
virtual ~BaseBlock() {}
bool submitValue(Parser::name_stack_t& name_stack, Parser& p, bool silent=false);
param_handle_t getHandleFromParam(const Param* param) const;
bool validateBlock(bool emit_errors = true) const;
+ bool isProvided() const
+ {
+ return mParamProvided;
+ }
+
+ bool isValid() const
+ {
+ return validateBlock(false);
+ }
+
+
Param* getParamFromHandle(const param_handle_t param_handle)
{
if (param_handle == 0) return NULL;
@@ -852,10 +881,19 @@ namespace LLInitParam
void addSynonym(Param& param, const std::string& synonym);
// Blocks can override this to do custom tracking of changes
- virtual void paramChanged(const Param& changed_param, bool user_provided) {}
+ virtual void paramChanged(const Param& changed_param, bool user_provided)
+ {
+ if (user_provided)
+ {
+ // a child param has been explicitly changed
+ // so *some* aspect of this block is now provided
+ mValidated = false;
+ mParamProvided = true;
+ }
+ }
bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name);
- void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const;
+ bool serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const predicate_rule_t rule, const BaseBlock* diff_block = NULL) const;
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const;
virtual const BlockDescriptor& mostDerivedBlockDescriptor() const { return getBlockDescriptor(); }
@@ -893,6 +931,9 @@ namespace LLInitParam
return mergeBlock(block_data, source, overwrite);
}
+ mutable bool mValidated; // lazy validation flag
+ bool mParamProvided;
+
private:
const std::string& getParamName(const BlockDescriptor& block_data, const Param* paramp) const;
};
@@ -986,6 +1027,8 @@ namespace LLInitParam
bool isProvided() const { return Param::anyProvided(); }
+ bool isValid() const { return true; }
+
static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast(param);
@@ -1014,10 +1057,23 @@ namespace LLInitParam
return false;
}
- static void serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const Param* diff_param)
+ static bool serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const Param* diff_param)
{
+ bool serialized = false;
const self_t& typed_param = static_cast(param);
- if (!typed_param.isProvided()) return;
+ const self_t* diff_typed_param = static_cast(diff_param);
+
+ LLPredicate::Value predicate;
+ if (diff_typed_param && ParamCompare::equals(typed_param.getValue(), diff_typed_param->getValue()))
+ {
+ predicate.set(HAS_DEFAULT_VALUE);
+ }
+
+ predicate.set(VALID, typed_param.isValid());
+ predicate.set(PROVIDED, typed_param.anyProvided());
+ predicate.set(EMPTY, false);
+
+ if (!predicate_rule.check(predicate)) return false;
if (!name_stack.empty())
{
@@ -1030,25 +1086,27 @@ namespace LLInitParam
if (!key.empty())
{
- if (!diff_param || !ParamCompare::equals(static_cast(diff_param)->getValueName(), key))
+ if (!diff_typed_param || !ParamCompare::equals(diff_typed_param->getValueName(), key))
{
- parser.writeValue(key, name_stack);
+ serialized = parser.writeValue(key, name_stack);
}
}
// then try to serialize value directly
- else if (!diff_param || !ParamCompare::equals(typed_param.getValue(), static_cast(diff_param)->getValue()))
+ else if (!diff_typed_param || ParamCompare::equals(typed_param.getValue(), diff_typed_param->getValue()))
{
- if (!parser.writeValue(typed_param.getValue(), name_stack))
+ serialized = parser.writeValue(typed_param.getValue(), name_stack);
+ if (!serialized)
{
std::string calculated_key = typed_param.calcValueName(typed_param.getValue());
if (calculated_key.size()
- && (!diff_param
+ && (!diff_typed_param
|| !ParamCompare::equals(static_cast(diff_param)->getValueName(), calculated_key)))
{
- parser.writeValue(calculated_key, name_stack);
+ serialized = parser.writeValue(calculated_key, name_stack);
}
}
}
+ return serialized;
}
static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count)
@@ -1065,7 +1123,7 @@ namespace LLInitParam
void set(const value_t& val, bool flag_as_provided = true)
{
named_value_t::clearValueName();
- this->setValue(val);
+ named_value_t::setValue(val);
setProvided(flag_as_provided);
}
@@ -1113,15 +1171,15 @@ namespace LLInitParam
};
// parameter that is a block
- template
- class TypedParam
+ template
+ class TypedParam
: public Param,
public NAME_VALUE_LOOKUP::type_value_t
{
protected:
- typedef ParamValue::value_t> param_value_t;
+ typedef ParamValue::value_t> param_value_t;
typedef typename param_value_t::default_value_t default_value_t;
- typedef TypedParam self_t;
+ typedef TypedParam self_t;
typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t;
public:
using named_value_t::operator();
@@ -1166,10 +1224,16 @@ namespace LLInitParam
return false;
}
- static void serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const Param* diff_param)
+ static bool serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const Param* diff_param)
{
const self_t& typed_param = static_cast(param);
- if (!typed_param.isProvided()) return;
+
+ LLPredicate::Value predicate;
+
+ predicate.set(VALID, typed_param.isValid());
+ predicate.set(PROVIDED, typed_param.anyProvided());
+
+ if (!predicate_rule.check(predicate)) return false;
if (!name_stack.empty())
{
@@ -1182,12 +1246,15 @@ namespace LLInitParam
if (!diff_param || !ParamCompare::equals(static_cast(diff_param)->getValueName(), key))
{
parser.writeValue(key, name_stack);
+ return true;
}
}
else
{
- typed_param.serializeBlock(parser, name_stack, static_cast(diff_param));
+ return typed_param.serializeBlock(parser, name_stack, predicate_rule, static_cast(diff_param));
}
+
+ return false;
}
static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count)
@@ -1209,23 +1276,19 @@ namespace LLInitParam
// *and* the block as a whole validates
bool isProvided() const
{
- // only validate block when it hasn't already passed validation with current data
- if (Param::anyProvided() && !param_value_t::mValidated)
- {
- // a sub-block is "provided" when it has been filled in enough to be valid
- param_value_t::mValidated = param_value_t::validateBlock(false);
- }
- return Param::anyProvided() && param_value_t::mValidated;
+ return Param::anyProvided() && isValid();
+ }
+
+ bool isValid() const
+ {
+ return param_value_t::isValid();
}
// assign block contents to this param-that-is-a-block
void set(const value_t& val, bool flag_as_provided = true)
{
- this->setValue(val);
+ named_value_t::setValue(val);
named_value_t::clearValueName();
- // force revalidation of block
- // next call to isProvided() will update provision status based on validity
- param_value_t::mValidated = false;
setProvided(flag_as_provided);
}
@@ -1242,9 +1305,6 @@ namespace LLInitParam
if (user_provided)
{
- // a child param has been explicitly changed
- // so *some* aspect of this block is now provided
- param_value_t::mValidated = false;
setProvided();
named_value_t::clearValueName();
}
@@ -1296,13 +1356,13 @@ namespace LLInitParam
};
// list of non-block parameters
- template
- class TypedParam
+ template
+ class TypedParam
: public Param
{
protected:
- typedef TypedParam self_t;
- typedef ParamValue::value_t> param_value_t;
+ typedef TypedParam self_t;
+ typedef ParamValue::value_t> param_value_t;
typedef typename std::vector container_t;
typedef container_t default_value_t;
typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t;
@@ -1311,7 +1371,9 @@ namespace LLInitParam
typedef typename param_value_t::value_t value_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, const default_value_t& value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
- : Param(block_descriptor.mCurrentBlockPtr)
+ : Param(block_descriptor.mCurrentBlockPtr),
+ mMinCount(min_count),
+ mMaxCount(max_count)
{
std::copy(value.begin(), value.end(), std::back_inserter(mValues));
@@ -1322,7 +1384,13 @@ namespace LLInitParam
}
}
- bool isProvided() const { return Param::anyProvided(); }
+ bool isProvided() const { return Param::anyProvided() && isValid(); }
+
+ bool isValid() const
+ {
+ size_t num_elements = numValidElements();
+ return mMinCount < num_elements && num_elements < mMaxCount;
+ }
static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name)
{
@@ -1337,7 +1405,7 @@ namespace LLInitParam
}
// no further names in stack, attempt to parse value now
- if (name_stack_range.first == name_stack_range.second)
+ if (new_name_stack_range.first == new_name_stack_range.second)
{
std::string name;
@@ -1359,10 +1427,19 @@ namespace LLInitParam
return false;
}
- static void serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const Param* diff_param)
+ static bool serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const Param* diff_param)
{
+ bool serialized = false;
const self_t& typed_param = static_cast(param);
- if (!typed_param.isProvided()) return;
+
+ LLPredicate::Value predicate;
+
+ predicate.set(REQUIRED, typed_param.mMinCount > 0);
+ predicate.set(VALID, typed_param.isValid());
+ predicate.set(PROVIDED, typed_param.anyProvided());
+ predicate.set(EMPTY, typed_param.mValues.empty());
+
+ if (!predicate_rule.check(predicate)) return false;
for (const_iterator it = typed_param.mValues.begin(), end_it = typed_param.mValues.end();
it != end_it;
@@ -1378,7 +1455,11 @@ namespace LLInitParam
if (!value_written)
{
std::string calculated_key = it->calcValueName(it->getValue());
- if (!parser.writeValue(calculated_key, name_stack))
+ if (parser.writeValue(calculated_key, name_stack))
+ {
+ serialized = true;
+ }
+ else
{
break;
}
@@ -1386,19 +1467,23 @@ namespace LLInitParam
}
else
{
- if(!parser.writeValue(key, name_stack))
+ if(parser.writeValue(key, name_stack))
+ {
+ serialized = true;
+ }
+ else
{
break;
}
}
-
- name_stack.pop_back();
}
+
+ return serialized;
}
static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count)
{
- parser.inspectValue(name_stack, min_count, max_count, NULL);
+ parser.inspectValue(name_stack, min_count, max_count, NULL);
if (named_value_t::getPossibleValues())
{
parser.inspectValue(name_stack, min_count, max_count, named_value_t::getPossibleValues());
@@ -1453,7 +1538,7 @@ namespace LLInitParam
bool empty() const { return mValues.empty(); }
size_t size() const { return mValues.size(); }
- U32 numValidElements() const
+ size_t numValidElements() const
{
return mValues.size();
}
@@ -1483,6 +1568,8 @@ namespace LLInitParam
}
container_t mValues;
+ size_t mMinCount,
+ mMaxCount;
private:
void init( BlockDescriptor &block_descriptor, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count, const char* name )
@@ -1500,13 +1587,13 @@ namespace LLInitParam
};
// list of block parameters
- template
- class TypedParam
+ template
+ class TypedParam
: public Param
{
protected:
- typedef TypedParam self_t;
- typedef ParamValue::value_t> param_value_t;
+ typedef TypedParam self_t;
+ typedef ParamValue::value_t> param_value_t;
typedef typename std::vector container_t;
typedef typename NAME_VALUE_LOOKUP::type_value_t named_value_t;
typedef container_t default_value_t;
@@ -1516,7 +1603,9 @@ namespace LLInitParam
typedef typename param_value_t::value_t value_t;
TypedParam(BlockDescriptor& block_descriptor, const char* name, const default_value_t& value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count)
- : Param(block_descriptor.mCurrentBlockPtr)
+ : Param(block_descriptor.mCurrentBlockPtr),
+ mMinCount(min_count),
+ mMaxCount(max_count)
{
std::copy(value.begin(), value.end(), back_inserter(mValues));
@@ -1526,7 +1615,14 @@ namespace LLInitParam
}
}
- bool isProvided() const { return Param::anyProvided(); }
+ bool isProvided() const { return Param::anyProvided() && isValid(); }
+
+ bool isValid() const
+ {
+ size_t num_elements = numValidElements();
+ return mMinCount < num_elements && num_elements < mMaxCount;
+ }
+
static bool deserializeParam(Param& param, Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name)
{
@@ -1549,7 +1645,7 @@ namespace LLInitParam
}
param_value_t& value = typed_param.mValues.back();
- if (name_stack_range.first == name_stack_range.second)
+ if (new_name_stack_range.first == new_name_stack_range.second)
{ // try to parse a known named value
std::string name;
@@ -1559,6 +1655,10 @@ namespace LLInitParam
{
typed_param.mValues.back().setValueName(name);
typed_param.setProvided();
+ if (new_array_value)
+ {
+ name_stack_range.first->second = false;
+ }
return true;
}
}
@@ -1583,10 +1683,18 @@ namespace LLInitParam
return false;
}
- static void serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const Param* diff_param)
+ static bool serializeParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const Param* diff_param)
{
+ bool serialized = false;
const self_t& typed_param = static_cast(param);
- if (!typed_param.isProvided()) return;
+ LLPredicate::Value predicate;
+
+ predicate.set(REQUIRED, typed_param.mMinCount > 0);
+ predicate.set(VALID, typed_param.isValid());
+ predicate.set(PROVIDED, typed_param.anyProvided());
+ predicate.set(EMPTY, typed_param.mValues.empty());
+
+ if (!predicate_rule.check(predicate)) return false;
for (const_iterator it = typed_param.mValues.begin(), end_it = typed_param.mValues.end();
it != end_it;
@@ -1597,17 +1705,24 @@ namespace LLInitParam
std::string key = it->getValueName();
if (!key.empty())
{
- parser.writeValue(key, name_stack);
+ serialized |= parser.writeValue(key, name_stack);
}
// Not parsed via named values, write out value directly
- // NOTE: currently we don't worry about removing default values in Multiple
+ // NOTE: currently we don't do diffing of Multiples
else
{
- it->serializeBlock(parser, name_stack, NULL);
+ serialized = it->serializeBlock(parser, name_stack, predicate_rule, NULL);
}
name_stack.pop_back();
}
+
+ if (!serialized && predicate_rule.check(ll_make_predicate(EMPTY)))
+ {
+ serialized |= parser.writeValue(Flag(), name_stack);
+ }
+
+ return serialized;
}
static void inspectParam(const Param& param, Parser& parser, Parser::name_stack_t& name_stack, S32 min_count, S32 max_count)
@@ -1670,14 +1785,14 @@ namespace LLInitParam
bool empty() const { return mValues.empty(); }
size_t size() const { return mValues.size(); }
- U32 numValidElements() const
+ size_t numValidElements() const
{
- U32 count = 0;
+ size_t count = 0;
for (const_iterator it = mValues.begin(), end_it = mValues.end();
it != end_it;
++it)
{
- if(it->validateBlock(false)) count++;
+ if(it->isValid()) count++;
}
return count;
}
@@ -1709,6 +1824,8 @@ namespace LLInitParam
}
container_t mValues;
+ size_t mMinCount,
+ mMaxCount;
private:
void init( BlockDescriptor &block_descriptor, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count, const char* name )
@@ -1937,7 +2054,7 @@ namespace LLInitParam
Optional& operator =(const value_t& val)
{
- this->set(val);
+ super_t::set(val);
return *this;
}
@@ -1967,7 +2084,7 @@ namespace LLInitParam
Mandatory& operator =(const value_t& val)
{
- this->set(val);
+ super_t::set(val);
return *this;
}
@@ -2003,7 +2120,7 @@ namespace LLInitParam
Multiple& operator =(const container_t& val)
{
- set(val);
+ super_t::set(val);
return *this;
}
@@ -2015,7 +2132,7 @@ namespace LLInitParam
static bool validate(const Param* paramp)
{
- U32 num_valid = ((super_t*)paramp)->numValidElements();
+ size_t num_valid = ((super_t*)paramp)->numValidElements();
return RANGE::minCount <= num_valid && num_valid <= RANGE::maxCount;
}
};
@@ -2158,13 +2275,11 @@ namespace LLInitParam
typedef T default_value_t;
ParamValue()
- : mValue(),
- mValidated(false)
+ : mValue()
{}
ParamValue(const default_value_t& value)
- : mValue(value),
- mValidated(false)
+ : mValue(value)
{}
void setValue(const value_t& val)
@@ -2191,12 +2306,12 @@ namespace LLInitParam
return mValue.deserializeBlock(p, name_stack_range, new_name);
}
- void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const self_t* diff_block = NULL) const
+ bool serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const self_t* diff_block = NULL) const
{
const BaseBlock* base_block = diff_block
? &(diff_block->mValue)
: NULL;
- mValue.serializeBlock(p, name_stack, base_block);
+ return mValue.serializeBlock(p, name_stack, predicate_rule, base_block);
}
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
@@ -2213,8 +2328,6 @@ namespace LLInitParam
resetToDefault();
return mValue.mergeBlock(block_data, source.getValue(), overwrite);
}
-
-
return mValue.mergeBlock(block_data, source.getValue(), overwrite);
}
@@ -2223,14 +2336,17 @@ namespace LLInitParam
return mValue.validateBlock(emit_errors);
}
+ bool isValid() const
+ {
+ return validateBlock(false);
+ }
+
static BlockDescriptor& getBlockDescriptor()
{
return value_t::getBlockDescriptor();
}
- mutable bool mValidated; // lazy validation flag
-
private:
void resetToDefault()
{
@@ -2251,15 +2367,13 @@ namespace LLInitParam
typedef T default_value_t;
ParamValue()
- : mValue(),
- mValidated(false)
+ : mValue()
{
mCurParam = getBlockDescriptor().mAllParams.begin();
}
ParamValue(const default_value_t& value)
- : mValue(value),
- mValidated(false)
+ : mValue(value)
{
mCurParam = getBlockDescriptor().mAllParams.begin();
}
@@ -2311,12 +2425,12 @@ namespace LLInitParam
}
}
- void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const self_t* diff_block = NULL) const
+ bool serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const self_t* diff_block = NULL) const
{
const BaseBlock* base_block = diff_block
? &(diff_block->mValue)
: NULL;
- mValue.serializeBlock(p, name_stack, base_block);
+ return mValue.serializeBlock(p, name_stack, predicate_rule, base_block);
}
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
@@ -2334,13 +2448,16 @@ namespace LLInitParam
return mValue.validateBlock(emit_errors);
}
+ bool isValid() const
+ {
+ return validateBlock(false);
+ }
+
static BlockDescriptor& getBlockDescriptor()
{
return value_t::getBlockDescriptor();
}
- mutable bool mValidated; // lazy validation flag
-
private:
BlockDescriptor::all_params_list_t::iterator mCurParam;
@@ -2358,16 +2475,14 @@ namespace LLInitParam
typedef T default_value_t;
ParamValue()
- : T(),
- mValidated(false)
+ : T()
{}
ParamValue(const default_value_t& value)
- : T(value.getValue()),
- mValidated(false)
+ : T(value.getValue())
{}
- mutable bool mValidated; // lazy validation flag
+ bool isValid() const { return true; }
};
template
@@ -2380,18 +2495,15 @@ namespace LLInitParam
typedef LazyValue default_value_t;
ParamValue()
- : mValue(),
- mValidated(false)
+ : mValue()
{}
ParamValue(const default_value_t& other)
- : mValue(other),
- mValidated(false)
+ : mValue(other)
{}
ParamValue(const T& value)
- : mValue(value),
- mValidated(false)
+ : mValue(value)
{}
void setValue(const value_t& val)
@@ -2414,14 +2526,14 @@ namespace LLInitParam
return mValue.get().deserializeBlock(p, name_stack_range, new_name);
}
- void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const self_t* diff_block = NULL) const
+ bool serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const self_t* diff_block = NULL) const
{
- if (mValue.empty()) return;
+ if (mValue.empty()) return false;
const BaseBlock* base_block = (diff_block && !diff_block->mValue.empty())
? &(diff_block->mValue.get().getValue())
: NULL;
- mValue.get().serializeBlock(p, name_stack, base_block);
+ return mValue.get().serializeBlock(p, name_stack, predicate_rule, base_block);
}
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
@@ -2439,13 +2551,16 @@ namespace LLInitParam
return mValue.empty() || mValue.get().validateBlock(emit_errors);
}
+ bool isValid() const
+ {
+ return validateBlock(false);
+ }
+
static BlockDescriptor& getBlockDescriptor()
{
return value_t::getBlockDescriptor();
}
- mutable bool mValidated; // lazy validation flag
-
private:
LazyValue mValue;
};
@@ -2460,18 +2575,15 @@ namespace LLInitParam
typedef LazyValue default_value_t;
ParamValue()
- : mValue(),
- mValidated(false)
+ : mValue()
{}
ParamValue(const default_value_t& other)
- : mValue(other),
- mValidated(false)
+ : mValue(other)
{}
ParamValue(const T& value)
- : mValue(value),
- mValidated(false)
+ : mValue(value)
{}
void setValue(const value_t& val)
@@ -2489,7 +2601,10 @@ namespace LLInitParam
return mValue.get().getValue();
}
- mutable bool mValidated; // lazy validation flag
+ bool isValid() const
+ {
+ return true;
+ }
private:
LazyValue mValue;
@@ -2504,12 +2619,10 @@ namespace LLInitParam
typedef LLSD default_value_t;
ParamValue()
- : mValidated(false)
{}
ParamValue(const default_value_t& other)
- : mValue(other),
- mValidated(false)
+ : mValue(other)
{}
void setValue(const value_t& val) { mValue = val; }
@@ -2519,16 +2632,13 @@ namespace LLInitParam
// block param interface
LL_COMMON_API bool deserializeBlock(Parser& p, Parser::name_stack_range_t& name_stack_range, bool new_name);
- LL_COMMON_API void serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const;
+ LL_COMMON_API bool serializeBlock(Parser& p, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const BaseBlock* diff_block = NULL) const;
bool inspectBlock(Parser& p, Parser::name_stack_t name_stack = Parser::name_stack_t(), S32 min_count = 0, S32 max_count = S32_MAX) const
{
//TODO: implement LLSD params as schema type Any
return true;
}
- protected:
- mutable bool mValidated; // lazy validation flag
-
private:
static void serializeElement(Parser& p, const LLSD& sd, Parser::name_stack_t& name_stack);
@@ -2547,9 +2657,9 @@ namespace LLInitParam
BLOCK_AUTHORITATIVE // mValue is derived from the block parameters, which are authoritative
} EValueAge;
- typedef ParamValue derived_t;
+ typedef TypeValues derived_t;
typedef CustomParamValue self_t;
- typedef Block block_t;
+ typedef Block > block_t;
typedef T default_value_t;
typedef T value_t;
typedef void baseblock_base_class_t;
@@ -2557,8 +2667,7 @@ namespace LLInitParam
CustomParamValue(const default_value_t& value = T())
: mValue(value),
- mValueAge(VALUE_AUTHORITATIVE),
- mValidated(false)
+ mValueAge(VALUE_AUTHORITATIVE)
{}
bool deserializeBlock(Parser& parser, Parser::name_stack_range_t& name_stack_range, bool new_name)
@@ -2580,16 +2689,30 @@ namespace LLInitParam
return typed_param.BaseBlock::deserializeBlock(parser, name_stack_range, new_name);
}
- void serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const BaseBlock* diff_block = NULL) const
+ bool serializeBlock(Parser& parser, Parser::name_stack_t& name_stack, const predicate_rule_t predicate_rule, const BaseBlock* diff_block = NULL) const
{
const derived_t& typed_param = static_cast(*this);
const derived_t* diff_param = static_cast(diff_block);
+ //std::string key = typed_param.getValueName();
+
+ //// first try to write out name of name/value pair
+ //if (!key.empty())
+ //{
+ // if (!diff_param || !ParamCompare::equals(diff_param->getValueName(), key))
+ // {
+ // return parser.writeValue(key, name_stack);
+ // }
+ //}
// then try to serialize value directly
if (!diff_param || !ParamCompare::equals(typed_param.getValue(), diff_param->getValue()))
{
- if (!parser.writeValue(typed_param.getValue(), name_stack))
+ if (parser.writeValue(typed_param.getValue(), name_stack))
+ {
+ return true;
+ }
+ else
{
//RN: *always* serialize provided components of BlockValue (don't pass diff_param on),
// since these tend to be viewed as the constructor arguments for the value T. It seems
@@ -2606,14 +2729,15 @@ namespace LLInitParam
// and serialize those params
derived_t copy(typed_param);
copy.updateBlockFromValue(true);
- copy.block_t::serializeBlock(parser, name_stack, NULL);
+ return copy.block_t::serializeBlock(parser, name_stack, predicate_rule, NULL);
}
else
{
- block_t::serializeBlock(parser, name_stack, NULL);
+ return block_t::serializeBlock(parser, name_stack, predicate_rule, NULL);
}
}
}
+ return false;
}
bool validateBlock(bool emit_errors = true) const
@@ -2705,8 +2829,6 @@ namespace LLInitParam
return block_t::mergeBlock(block_data, source, overwrite);
}
- mutable bool mValidated; // lazy validation flag
-
private:
mutable T mValue;
mutable EValueAge mValueAge;
diff --git a/indra/llcommon/llpredicate.cpp b/indra/llcommon/llpredicate.cpp
new file mode 100644
index 000000000..1278948e2
--- /dev/null
+++ b/indra/llcommon/llpredicate.cpp
@@ -0,0 +1,41 @@
+/**
+ * @file llpredicate.cpp
+ * @brief abstraction for filtering objects by predicates, with arbitrary boolean expressions
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * 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
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+#include "linden_common.h"
+
+#include "llpredicate.h"
+
+namespace LLPredicate
+{
+ const U32 cPredicateFlagsFromEnum[5] =
+ {
+ 0xAAAAaaaa, // 10101010101010101010101010101010
+ 0xCCCCcccc, // 11001100110011001100110011001100
+ 0xF0F0F0F0, // 11110000111100001111000011110000
+ 0xFF00FF00, // 11111111000000001111111100000000
+ 0xFFFF0000 // 11111111111111110000000000000000
+ };
+}
+
diff --git a/indra/llcommon/llpredicate.h b/indra/llcommon/llpredicate.h
new file mode 100644
index 000000000..a8300fc9b
--- /dev/null
+++ b/indra/llcommon/llpredicate.h
@@ -0,0 +1,210 @@
+/**
+ * @file llpredicate.h
+ * @brief abstraction for filtering objects by predicates, with arbitrary boolean expressions
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * 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
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#ifndef LL_LLPREDICATE_H
+#define LL_LLPREDICATE_H
+
+#include "llerror.h"
+
+namespace LLPredicate
+{
+ template class Rule;
+
+ extern LL_COMMON_API const U32 cPredicateFlagsFromEnum[5];
+
+ template
+ class Value
+ {
+ public:
+ typedef U32 predicate_flag_t;
+ static const S32 cMaxEnum = 5;
+
+ Value(ENUM e, bool predicate_value = true)
+ : mPredicateFlags(predicate_value ? cPredicateFlagsFromEnum[e] : ~cPredicateFlagsFromEnum[e])
+ {
+ llassert(0 <= e && e < cMaxEnum);
+ }
+
+ Value()
+ : mPredicateFlags(0xFFFFffff)
+ {}
+
+ Value operator!() const
+ {
+ Value new_value;
+ new_value.mPredicateFlags = ~mPredicateFlags;
+ return new_value;
+ }
+
+ Value operator &&(const Value other) const
+ {
+ Value new_value;
+ new_value.mPredicateFlags = mPredicateFlags & other.mPredicateFlags;
+ return new_value;
+ }
+
+ Value operator ||(const Value other) const
+ {
+ Value new_value;
+ new_value.mPredicateFlags = mPredicateFlags | other.mPredicateFlags;
+ return new_value;
+ }
+
+ void set(ENUM e, bool value = true)
+ {
+ llassert(0 <= e && e < cMaxEnum);
+ predicate_flag_t flags_to_modify;
+ predicate_flag_t mask = cPredicateFlagsFromEnum[e];
+ if (value)
+ { // add predicate "e" to flags that don't contain it already
+ flags_to_modify = (mPredicateFlags & ~mask);
+ // clear flags not containing e
+ mPredicateFlags &= mask;
+ // add back flags shifted to contain e
+ mPredicateFlags |= flags_to_modify << (0x1 << e);
+ }
+ else
+ { // remove predicate "e" from flags that contain it
+ flags_to_modify = (mPredicateFlags & mask);
+ // clear flags containing e
+ mPredicateFlags &= ~mask;
+ // add back flags shifted to not contain e
+ mPredicateFlags |= flags_to_modify >> (0x1 << e);
+ }
+ }
+
+ void forget(ENUM e)
+ {
+ set(e, true);
+ U32 flags_with_predicate = mPredicateFlags;
+ set(e, false);
+ // ambiguous value is result of adding and removing predicate at the same time!
+ mPredicateFlags |= flags_with_predicate;
+ }
+
+ bool allSet() const
+ {
+ return mPredicateFlags == ~0;
+ }
+
+ bool noneSet() const
+ {
+ return mPredicateFlags == 0;
+ }
+
+ bool someSet() const
+ {
+ return mPredicateFlags != 0;
+ }
+
+ private:
+ predicate_flag_t mPredicateFlags;
+ };
+
+ template
+ class Rule
+ {
+ public:
+ Rule(ENUM value)
+ : mRule(value)
+ {}
+
+ Rule(const Value other)
+ : mRule(other)
+ {}
+
+ Rule()
+ {}
+
+ void require(ENUM e, bool match)
+ {
+ mRule.set(e, match);
+ }
+
+ void allow(ENUM e)
+ {
+ mRule.forget(e);
+ }
+
+ bool check(const Value value) const
+ {
+ return (mRule && value).someSet();
+ }
+
+ bool requires(const Value value) const
+ {
+ return (mRule && value).someSet() && (!mRule && value).noneSet();
+ }
+
+ bool isAmbivalent(const Value value) const
+ {
+ return (mRule && value).someSet() && (!mRule && value).someSet();
+ }
+
+ bool acceptsAll() const
+ {
+ return mRule.allSet();
+ }
+
+ bool acceptsNone() const
+ {
+ return mRule.noneSet();
+ }
+
+ Rule operator!() const
+ {
+ Rule new_rule;
+ new_rule.mRule = !mRule;
+ return new_rule;
+ }
+
+ Rule operator &&(const Rule other) const
+ {
+ Rule new_rule;
+ new_rule.mRule = mRule && other.mRule;
+ return new_rule;
+ }
+
+ Rule operator ||(const Rule other) const
+ {
+ Rule new_rule;
+ new_rule.mRule = mRule || other.mRule;
+ return new_rule;
+ }
+
+ private:
+ Value mRule;
+ };
+}
+
+template
+LLPredicate::Value ll_make_predicate(ENUM e, bool predicate_value = true)
+{
+ return LLPredicate::Value(e, predicate_value);
+}
+
+
+#endif // LL_LLPREDICATE_H
diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h
index a6f5f9fa9..84087cee3 100644
--- a/indra/llcommon/llpreprocessor.h
+++ b/indra/llcommon/llpreprocessor.h
@@ -80,8 +80,8 @@
#define LL_CLANG 1
#endif
#elif defined (__ICC)
- #ifndef LL_ICC
- #define LL_ICC 1
+ #ifndef LL_INTELC
+ #define LL_INTELC 1
#endif
#elif defined(__GNUC__)
#define GCC_VERSION (__GNUC__ * 10000 \
@@ -94,9 +94,6 @@
#ifndef LL_MSVC
#define LL_MSVC 1
#endif
- #if _MSC_VER < 1400
- #define LL_MSVC7 //Visual C++ 2003 or earlier
- #endif
#endif
// Deal with minor differences on Unixy OSes.
@@ -112,6 +109,16 @@
#endif
+// Check for C++11 support
+#if __cplusplus >= 201100L || _MSC_VER >= 1800
+# define LL_CPP11
+#endif
+
+#if LL_WINDOWS
+# define LL_THREAD_LOCAL __declspec(thread)
+#else
+# define LL_THREAD_LOCAL __thread
+#endif
// Static linking with apr on windows needs to be declared.
#if LL_WINDOWS && !LL_COMMON_LINK_SHARED
@@ -142,7 +149,7 @@
#pragma warning( 3 : 4265 ) // "class has virtual functions, but destructor is not virtual"
#pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden
#pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored
-#pragma warning( disable : 4284 ) // silly MS warning deep inside their
0
+ LogInventoryDecline
+
+ Comment
+ Log in system chat whenever an inventory offer is declined
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 1
+
UseHTTPInventory
Comment
@@ -18521,6 +18543,22 @@ This should be as low as possible, but too low may break functionality
0
+ FloaterRegionTrackerRect
+
+ Comment
+ Rectangle for Region Tracker Floater
+ Persist
+ 1
+ Type
+ Rect
+ Value
+
+ 500
+ 450
+ 850
+ 400
+
+
WindEnabled
Comment
@@ -18745,7 +18783,7 @@ This should be as low as possible, but too low may break functionality
Type
U32
Value
- 2
+ 0
diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml
index 41207d047..38e39bb7a 100644
--- a/indra/newview/app_settings/settings_ascent.xml
+++ b/indra/newview/app_settings/settings_ascent.xml
@@ -113,6 +113,28 @@
Value
1
+ AlchemyChatCommandHoverHeight
+
+ Comment
+ Command to hover your height or something
+ Persist
+ 1
+ Type
+ String
+ Value
+ /hover
+
+ AlchemyChatCommandResyncAnim
+
+ Comment
+ Command to stop/start in order to resync animations
+ Persist
+ 1
+ Type
+ String
+ Value
+ /resync
+
AlchemyConnectToNeighbors
Comment
@@ -135,6 +157,39 @@
Value
0
+ AlchemyMouselookIFF
+
+ Comment
+ Display user that is currently focused upon by crosshair in mouselook
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 1
+
+ AlchemyMouselookIFFRange
+
+ Comment
+ Range of IFF display
+ Persist
+ 1
+ Type
+ F32
+ Value
+ 380.0
+
+ AlchemyMouselookInstructions
+
+ Comment
+ Draw Mouselook Instructions
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 1
+
AlchemyRainbowEffects
Comment
@@ -156,6 +211,17 @@
Boolean
Value
0
+
+ AlchemySitOnAway
+
+ Comment
+ Agent groundsits in away mode
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 0
AscentPowerfulWizard
@@ -1714,6 +1780,17 @@
Value
0
+ ToolbarVisibleRegionTracker
+
+ Comment
+ Whether or not the button for the region tracker is on the toolbar
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 0
+
ToolbarVisibleScriptErrors
Comment
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 7e369cf26..2dd4904f4 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -8,6 +8,17 @@
+ AvatarHoverOffsetZ
+
+ Comment
+ After-everything-else fixup for avatar Z position.
+ Persist
+ 1
+ Type
+ F32
+ Value
+ 0.0
+
AOConfigNotecardID
@@ -393,6 +404,17 @@
Value
This is an autoresponse!
+ AutoresponseMutedShow
+
+ Comment
+ Whether to show that AutoresponseMuted's were sent
+ Persist
+ 1
+ Type
+ Boolean
+ Value
+ 0
+
AutoresponseOnlyIfAway
Comment
diff --git a/indra/newview/ascentprefschat.cpp b/indra/newview/ascentprefschat.cpp
index c604a3260..aacfe6826 100644
--- a/indra/newview/ascentprefschat.cpp
+++ b/indra/newview/ascentprefschat.cpp
@@ -83,6 +83,7 @@ LLPrefsAscentChat::LLPrefsAscentChat()
childSetValue("AutoresponseMuted", gSavedPerAccountSettings.getBOOL("AutoresponseMuted"));
childSetValue("AutoresponseMutedItem", gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"));
childSetValue("AutoresponseMutedMessage", gSavedPerAccountSettings.getString("AutoresponseMutedMessage"));
+ childSetValue("AutoresponseMutedShow", gSavedPerAccountSettings.getBOOL("AutoresponseMutedShow"));
childSetValue("BusyModeResponse", gSavedPerAccountSettings.getString("BusyModeResponse"));
childSetValue("BusyModeResponseItem", gSavedPerAccountSettings.getBOOL("BusyModeResponseItem"));
childSetValue("BusyModeResponseShow", gSavedPerAccountSettings.getBOOL("BusyModeResponseShow"));
@@ -291,6 +292,7 @@ void LLPrefsAscentChat::refreshValues()
gSavedPerAccountSettings.setBOOL("AutoresponseMuted", childGetValue("AutoresponseMuted"));
gSavedPerAccountSettings.setBOOL("AutoresponseMutedItem", childGetValue("AutoresponseMutedItem"));
gSavedPerAccountSettings.setString("AutoresponseMutedMessage", childGetValue("AutoresponseMutedMessage"));
+ gSavedPerAccountSettings.setBOOL("AutoresponseMutedShow", childGetValue("AutoresponseMutedShow"));
gSavedPerAccountSettings.setString("BusyModeResponse", childGetValue("BusyModeResponse"));
gSavedPerAccountSettings.setBOOL("BusyModeResponseItem", childGetValue("BusyModeResponseItem"));
gSavedPerAccountSettings.setBOOL("BusyModeResponseShow", childGetValue("BusyModeResponseShow"));
diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp
index 2170d0824..b172627fd 100644
--- a/indra/newview/ascentprefssys.cpp
+++ b/indra/newview/ascentprefssys.cpp
@@ -73,6 +73,8 @@ LLPrefsAscentSys::LLPrefsAscentSys()
getChild("SinguCmdLineAway")->setCommitCallback(lineEditorControl);
getChild("SinguCmdLineRegionSay")->setCommitCallback(lineEditorControl);
getChild("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
+ getChild("AlchemyChatCommandResyncAnim")->setCommitCallback(lineEditorControl);
+ getChild("AlchemyChatCommandHoverHeight")->setCommitCallback(lineEditorControl);
//Security ----------------------------------------------------------------------------
getChild("UISndRestart")->setCommitCallback(lineEditorControl);
@@ -113,10 +115,8 @@ void LLPrefsAscentSys::onCommitCheckBox(LLUICtrl* ctrl, const LLSD& value)
LLVector3d lpos_global = gAgent.getPositionGlobal();
if(gAudiop)
gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
- LLChat chat;
- chat.mSourceType = CHAT_SOURCE_SYSTEM;
- chat.mText = LLTrans::getString("PowerUser1") + "\n" + LLTrans::getString("PowerUser2") + "\n" + LLTrans::getString("Unlocked:") + "\n" + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5");
- LLFloaterChat::addChat(chat);
+ void cmdline_printchat(const std::string& message);
+ cmdline_printchat(LLTrans::getString("PowerUser1") + '\n' + LLTrans::getString("PowerUser2") + '\n' + LLTrans::getString("Unlocked:") + '\n' + LLTrans::getString("PowerUser3") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser4") + "\n- " + LLTrans::getString("RightClick") + " > " + LLTrans::getString("PowerUser5"));
}
}
else if (name == "next_owner_copy")
@@ -186,6 +186,8 @@ void LLPrefsAscentSys::refreshValues()
mCmdLineAway = gSavedSettings.getString("SinguCmdLineAway");
mCmdLineRegionSay = gSavedSettings.getString("SinguCmdLineRegionSay");
mCmdLineURL = gSavedSettings.getString("SinguCmdLineURL");
+ mCmdLineResync = gSavedSettings.getString("AlchemyChatCommandResyncAnim");
+ mCmdLineHover = gSavedSettings.getString("AlchemyChatCommandHoverHeight");
//Security ----------------------------------------------------------------------------
mBroadcastViewerEffects = gSavedSettings.getBOOL("BroadcastViewerEffects");
@@ -196,6 +198,7 @@ void LLPrefsAscentSys::refreshValues()
mLookAtLines = gSavedSettings.getBOOL("AlchemyLookAtLines");
mQuietSnapshotsToDisk = gSavedSettings.getBOOL("QuietSnapshotsToDisk");
mAnnounceBumps = gSavedSettings.getBOOL("AnnounceBumps");
+ mSitOnAway = gSavedSettings.getBOOL("AlchemySitOnAway");
mDetachBridge = gSavedSettings.getBOOL("SGDetachBridge");
mRevokePermsOnStandUp = gSavedSettings.getBOOL("RevokePermsOnStandUp");
mDisableClickSit = gSavedSettings.getBOOL("DisableClickSit");
@@ -257,6 +260,8 @@ void LLPrefsAscentSys::refresh()
childSetValue("SinguCmdLineAway", mCmdLineAway);
childSetValue("SinguCmdLineRegionSay", mCmdLineRegionSay);
childSetValue("SinguCmdLineURL", mCmdLineURL);
+ childSetValue("AlchemyChatCommandResyncAnim", mCmdLineResync);
+ childSetValue("AlchemyChatCommandHoverHeight", mCmdLineHover);
//Security ----------------------------------------------------------------------------
getChildView("UISndRestart")->setValue(mRestartSound);
@@ -328,6 +333,8 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setString("SinguCmdLineAway", mCmdLineAway);
gSavedSettings.setString("SinguCmdLineRegionSay", mCmdLineRegionSay);
gSavedSettings.setString("SinguCmdLineURL", mCmdLineURL);
+ gSavedSettings.setString("AlchemyChatCommandResyncAnim", mCmdLineResync);
+ gSavedSettings.setString("AlchemyChatCommandHoverHeight", mCmdLineHover);
//Security ----------------------------------------------------------------------------
gSavedSettings.setBOOL("BroadcastViewerEffects", mBroadcastViewerEffects);
@@ -338,6 +345,7 @@ void LLPrefsAscentSys::cancel()
gSavedSettings.setBOOL("AlchemyLookAtLines", mLookAtLines);
gSavedSettings.setBOOL("QuietSnapshotsToDisk", mQuietSnapshotsToDisk);
gSavedSettings.setBOOL("AnnounceBumps", mAnnounceBumps);
+ gSavedSettings.setBOOL("AlchemySitOnAway", mSitOnAway);
gSavedSettings.setBOOL("SGDetachBridge", mDetachBridge);
gSavedSettings.setBOOL("RevokePermsOnStandUp", mRevokePermsOnStandUp);
gSavedSettings.setBOOL("DisableClickSit", mDisableClickSit);
diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h
index 50fbdae30..c55c5cceb 100644
--- a/indra/newview/ascentprefssys.h
+++ b/indra/newview/ascentprefssys.h
@@ -96,6 +96,8 @@ private:
std::string mCmdLineAway;
std::string mCmdLineRegionSay;
std::string mCmdLineURL;
+ std::string mCmdLineResync;
+ std::string mCmdLineHover;
//Security ----------------------------------------------------------------------------
bool mBroadcastViewerEffects;
@@ -106,6 +108,7 @@ private:
bool mLookAtLines;
bool mQuietSnapshotsToDisk;
bool mAnnounceBumps;
+ bool mSitOnAway;
bool mDetachBridge;
bool mRevokePermsOnStandUp;
bool mDisableClickSit;
diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp
index 3eda4098f..82ae5514e 100644
--- a/indra/newview/chatbar_as_cmdline.cpp
+++ b/indra/newview/chatbar_as_cmdline.cpp
@@ -66,9 +66,9 @@
#include "llchat.h"
#include "llfloaterchat.h"
+#include "rlvhandler.h"
-
-void cmdline_printchat(std::string message);
+void cmdline_printchat(const std::string& message);
void cmdline_rezplat(bool use_saved_value = true, F32 visual_radius = 30.0);
void cmdline_tp2name(std::string target);
@@ -241,6 +241,8 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
static LLCachedControl sSinguCmdLineAway(gSavedSettings, "SinguCmdLineAway");
static LLCachedControl sSinguCmdLineRegionSay(gSavedSettings, "SinguCmdLineRegionSay");
static LLCachedControl sSinguCmdLineURL(gSavedSettings, "SinguCmdLineURL");
+ static LLCachedControl sResyncAnimCommand(gSavedSettings, "AlchemyChatCommandResyncAnim", "/resync");
+ static LLCachedControl sHoverHeight(gSavedSettings, "AlchemyChatCommandHoverHeight", "/hover");
if(sAscentCmdLine)
{
@@ -450,6 +452,12 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
{
if (revised_text.length() > command.length() + 1)
{
+ const std::string& message = revised_text.substr(command.length()+1);
+ if (!gAgent.getRegion()->isEstateManager())
+ {
+ gChatBar->sendChatFromViewer(message, CHAT_TYPE_REGION, false);
+ return false;
+ }
std::vector strings(5, "-1");
// [0] grid_x, unused here
// [1] grid_y, unused here
@@ -458,11 +466,39 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
std::string name;
LLAgentUI::buildFullname(name);
strings[3] = name;
- strings[4] = revised_text.substr(command.length()+1); // [4] message
+ strings[4] = message; // [4] message
LLRegionInfoModel::sendEstateOwnerMessage(gMessageSystem, "simulatormessage", LLFloaterRegionInfo::getLastInvoice(), strings);
}
return false;
}
+ else if (command == utf8str_tolower(sHoverHeight)) // Hover height
+ {
+ F32 height;
+ if (i >> height)
+ {
+ gSavedPerAccountSettings.set("AvatarHoverOffsetZ",
+ llclamp(height, MIN_HOVER_Z, MAX_HOVER_Z));
+ return false;
+ }
+ }
+ else if (command == utf8str_tolower(sResyncAnimCommand)) // Resync Animations
+ {
+ for (S32 i = 0; i < gObjectList.getNumObjects(); i++)
+ {
+ LLViewerObject* object = gObjectList.getObject(i);
+ if (object && object->isAvatar())
+ {
+ LLVOAvatar& avatarp = *(LLVOAvatar*)object;
+ for (LLVOAvatar::AnimIterator it = avatarp.mPlayingAnimations.begin(), end = avatarp.mPlayingAnimations.end(); it != end; ++it)
+ {
+ const std::pair& playpair = *it;
+ avatarp.stopMotion(playpair.first, TRUE);
+ avatarp.startMotion(playpair.first);
+ }
+ }
+ }
+ return false;
+ }
else if(command == "typingstop")
{
std::string text;
@@ -623,11 +659,38 @@ void cmdline_rezplat(bool use_saved_value, F32 visual_radius) //cmdline_rezplat(
msg->sendReliable(gAgent.getRegionHost());
}
-void cmdline_printchat(std::string message)
+void cmdline_printchat(const std::string& message)
{
- LLChat chat;
- chat.mText = message;
+ LLChat chat(message);
chat.mSourceType = CHAT_SOURCE_SYSTEM;
- LLFloaterChat::addChat(chat, FALSE, FALSE);
+ if (rlv_handler_t::isEnabled()) chat.mRlvLocFiltered = chat.mRlvNamesFiltered = true;
+ LLFloaterChat::addChat(chat);
}
+static void fake_local_chat(LLChat chat, const std::string& name)
+{
+ chat.mFromName = name;
+ chat.mText = name + chat.mText;
+ LLFloaterChat::addChat(chat);
+}
+void fake_local_chat(std::string msg)
+{
+ bool action(LLStringUtil::startsWith(msg, "/me") && (msg[3] == ' ' || msg[3] == '\''));
+ if (action) msg.erase(0, 4);
+ LLChat chat((action ? " " : ": ") + msg);
+ chat.mFromID = gAgentID;
+ chat.mSourceType = CHAT_SOURCE_SYSTEM;
+ if (rlv_handler_t::isEnabled()) chat.mRlvLocFiltered = chat.mRlvNamesFiltered = true;
+ chat.mPosAgent = gAgent.getPositionAgent();
+ chat.mURL = "secondlife:///app/agent/" + gAgentID.asString() + "/about";
+ if (action) chat.mChatStyle = CHAT_STYLE_IRC;
+ if (!LLAvatarNameCache::getNSName(gAgentID, chat.mFromName))
+ {
+ LLAvatarNameCache::get(gAgentID, boost::bind(fake_local_chat, chat, boost::bind(&LLAvatarName::getNSName, _2, main_name_system())));
+ }
+ else
+ {
+ chat.mText = chat.mFromName + chat.mText;
+ LLFloaterChat::addChat(chat);
+ }
+}
diff --git a/indra/newview/floaterao.cpp b/indra/newview/floaterao.cpp
index c9386d95a..ace2fbad9 100644
--- a/indra/newview/floaterao.cpp
+++ b/indra/newview/floaterao.cpp
@@ -38,7 +38,7 @@
#include
// Uncomment and use instead if we ever add the chatbar as a command line - MC
-void cmdline_printchat(std::string message);
+void cmdline_printchat(const std::string& message);
class AONotecardCallback : public LLInventoryCallback
{
diff --git a/indra/newview/importtracker.cpp b/indra/newview/importtracker.cpp
index bddbf790e..568567c50 100644
--- a/indra/newview/importtracker.cpp
+++ b/indra/newview/importtracker.cpp
@@ -87,7 +87,7 @@ void ImportTracker::expectRez()
state = IDLE;
finish();
}
-void cmdline_printchat(std::string message);*/
+void cmdline_printchat(const std::string& message);*/
LLViewerObject* find(U32 local)
{
S32 i;
diff --git a/indra/newview/jcfloaterareasearch.cpp b/indra/newview/jcfloaterareasearch.cpp
index 3beacdf3d..c447f00c6 100644
--- a/indra/newview/jcfloaterareasearch.cpp
+++ b/indra/newview/jcfloaterareasearch.cpp
@@ -41,6 +41,7 @@
#include "lluictrlfactory.h"
#include "llagent.h"
+#include "llagentcamera.h"
#include "lltracker.h"
#include "llviewerobjectlist.h"
@@ -84,6 +85,8 @@ BOOL JCFloaterAreaSearch::postBuild()
getChild("Refresh")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::onRefresh,this));
getChild("Stop")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::onStop,this));
+ getChild("TP")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::teleportToSelected, this));
+ getChild("Look")->setClickedCallback(boost::bind(&JCFloaterAreaSearch::lookAtSelected, this));
getChild("Name query chunk")->setCommitCallback(boost::bind(&JCFloaterAreaSearch::onCommitLine,this,_1,_2,LIST_OBJECT_NAME));
getChild("Description query chunk")->setCommitCallback(boost::bind(&JCFloaterAreaSearch::onCommitLine,this,_1,_2,LIST_OBJECT_DESC));
@@ -113,22 +116,32 @@ void JCFloaterAreaSearch::checkRegion(bool force_clear)
}
}
+LLViewerObject* JCFloaterAreaSearch::getSelectedObject()
+{
+ if (LLScrollListItem* item = mResultList->getFirstSelected())
+ return gObjectList.findObject(item->getUUID());
+ return NULL;
+}
+
void JCFloaterAreaSearch::onDoubleClick()
{
- LLScrollListItem *item = mResultList->getFirstSelected();
- if (!item) return;
- LLUUID object_id = item->getUUID();
- std::map::iterator it = mCachedObjects.find(object_id);
- if(it != mCachedObjects.end())
- {
- LLViewerObject* objectp = gObjectList.findObject(object_id);
- if (objectp)
- {
- LLTracker::trackLocation(objectp->getPositionGlobal(), it->second.name, "", LLTracker::LOCATION_ITEM);
- }
- }
+ if (LLViewerObject* objectp = getSelectedObject())
+ LLTracker::trackLocation(objectp->getPositionGlobal(), mCachedObjects[objectp->getID()].name, "", LLTracker::LOCATION_ITEM);
}
+void JCFloaterAreaSearch::teleportToSelected()
+{
+ if (LLViewerObject* objectp = getSelectedObject())
+ gAgent.teleportViaLocation(objectp->getPositionGlobal());
+}
+
+void JCFloaterAreaSearch::lookAtSelected()
+{
+ if (LLScrollListItem* item = mResultList->getFirstSelected())
+ gAgentCamera.lookAtObject(item->getUUID(), false);
+}
+
+
void JCFloaterAreaSearch::onStop()
{
mStopped = true;
diff --git a/indra/newview/jcfloaterareasearch.h b/indra/newview/jcfloaterareasearch.h
index 71cd1c7af..413dbab99 100644
--- a/indra/newview/jcfloaterareasearch.h
+++ b/indra/newview/jcfloaterareasearch.h
@@ -72,7 +72,10 @@ private:
void onRefresh();
void onCommitLine(LLUICtrl* caller, const LLSD& value, OBJECT_COLUMN_ORDER type);
bool requestIfNeeded(LLUUID object_id);
+ class LLViewerObject* getSelectedObject();
void onDoubleClick();
+ void teleportToSelected();
+ void lookAtSelected();
LLTextBox* mCounterText;
LLScrollListCtrl* mResultList;
@@ -94,4 +97,4 @@ private:
std::string mFilterStrings[LIST_OBJECT_COUNT];
};
-#endif
\ No newline at end of file
+#endif
diff --git a/indra/newview/lfsimfeaturehandler.cpp b/indra/newview/lfsimfeaturehandler.cpp
index 6937e1205..65d1e6e55 100644
--- a/indra/newview/lfsimfeaturehandler.cpp
+++ b/indra/newview/lfsimfeaturehandler.cpp
@@ -46,13 +46,13 @@ void LFSimFeatureHandler::handleRegionChange()
{
if (LLViewerRegion* region = gAgent.getRegion())
{
- if (region->getFeaturesReceived())
+ if (region->simulatorFeaturesReceived())
{
setSupportedFeatures();
}
else
{
- region->setFeaturesReceivedCallback(boost::bind(&LFSimFeatureHandler::setSupportedFeatures, this));
+ region->setSimulatorFeaturesReceivedCallback(boost::bind(&LFSimFeatureHandler::setSupportedFeatures, this));
}
}
}
diff --git a/indra/newview/linux_tools/install.sh.in b/indra/newview/linux_tools/install.sh.in
index 2bfd6d192..2d42c13dd 100755
--- a/indra/newview/linux_tools/install.sh.in
+++ b/indra/newview/linux_tools/install.sh.in
@@ -59,7 +59,7 @@ function homedir_install()
fi
install_to_prefix "$HOME/.@VIEWER_BRANDING_ID@-install"
- $HOME/.@VIEWER_BRANDING_ID@-install/refresh_desktop_app_entry.sh
+ $HOME/.@VIEWER_BRANDING_ID@-install/etc/refresh_desktop_app_entry.sh
}
function root_install()
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index a8fa1568b..ab06f2ac9 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -396,7 +396,8 @@ LLAgent::LLAgent() :
mShowAvatar(TRUE),
mFrameAgent(),
- mIsBusy(FALSE),
+ mIsAwaySitting(false),
+ mIsDoNotDisturb(false),
mControlFlags(0x00000000),
mbFlagsDirty(FALSE),
@@ -1427,12 +1428,13 @@ void LLAgent::setAFK()
{
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START);
setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP);
- LL_INFOS("AFK") << "Setting Away" << LL_ENDL;
gAwayTimer.start();
+
+ if (isAgentAvatarValid() && !gAgentAvatarp->isSitting() && gSavedSettings.getBOOL("AlchemySitOnAway"))
+ gAgent.setSitDownAway(true);
+
if (gAFKMenu)
- {
gAFKMenu->setLabel(LLTrans::getString("AvatarSetNotAway"));
- }
}
}
@@ -1452,14 +1454,27 @@ void LLAgent::clearAFK()
{
sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_STOP);
clearControlFlags(AGENT_CONTROL_AWAY);
- LL_INFOS("AFK") << "Clearing Away" << LL_ENDL;
+
+ if (isAgentAvatarValid() && gAgentAvatarp->isSitting() && gAgent.isAwaySitting())
+ gAgent.setSitDownAway(false);
+
if (gAFKMenu)
- {
gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway"));
- }
}
}
+//-----------------------------------------------------------------------------
+// setSitDownAway(bool)
+//-----------------------------------------------------------------------------
+void LLAgent::setSitDownAway(bool go_away)
+{
+ if (go_away)
+ gAgent.sitDown();
+ else
+ gAgent.standUp();
+ mIsAwaySitting = go_away;
+}
+
//-----------------------------------------------------------------------------
// getAFK()
//-----------------------------------------------------------------------------
@@ -1469,39 +1484,25 @@ BOOL LLAgent::getAFK() const
}
//-----------------------------------------------------------------------------
-// setBusy()
+// setDoNotDisturb()
//-----------------------------------------------------------------------------
-void LLAgent::setBusy()
+void LLAgent::setDoNotDisturb(bool pIsDoNotDisturb)
{
- sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_START);
- mIsBusy = TRUE;
+ sendAnimationRequest(ANIM_AGENT_BUSY, pIsDoNotDisturb ? ANIM_REQUEST_START : ANIM_REQUEST_STOP);
+ mIsDoNotDisturb = pIsDoNotDisturb;
if (gBusyMenu)
{
- gBusyMenu->setLabel(LLTrans::getString("AvatarSetNotBusy"));
+ gBusyMenu->setLabel(LLTrans::getString(pIsDoNotDisturb ? "AvatarSetNotBusy" : "AvatarSetBusy"));
}
LLFloaterMute::getInstance()->updateButtons();
}
//-----------------------------------------------------------------------------
-// clearBusy()
+// isDoNotDisturb()
//-----------------------------------------------------------------------------
-void LLAgent::clearBusy()
+bool LLAgent::isDoNotDisturb() const
{
- mIsBusy = FALSE;
- sendAnimationRequest(ANIM_AGENT_BUSY, ANIM_REQUEST_STOP);
- if (gBusyMenu)
- {
- gBusyMenu->setLabel(LLTrans::getString("AvatarSetBusy"));
- }
- LLFloaterMute::getInstance()->updateButtons();
-}
-
-//-----------------------------------------------------------------------------
-// getBusy()
-//-----------------------------------------------------------------------------
-BOOL LLAgent::getBusy() const
-{
- return mIsBusy;
+ return mIsDoNotDisturb;
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 6294d2e0a..cb332a497 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -462,15 +462,20 @@ public:
/// @brief ground-sit at agent's current position
void sitDown();
+ void setSitDownAway(bool away);
+ bool isAwaySitting() const { return mIsAwaySitting; }
+
+private:
+ bool mIsAwaySitting;
+
//--------------------------------------------------------------------
- // Busy
+ // Do Not Disturb
//--------------------------------------------------------------------
public:
- void setBusy();
- void clearBusy();
- BOOL getBusy() const;
+ void setDoNotDisturb(bool pIsDoNotDisturb);
+ bool isDoNotDisturb() const;
private:
- BOOL mIsBusy;
+ bool mIsDoNotDisturb;
//--------------------------------------------------------------------
// Grab
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 7d16a5340..47a0fb861 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -38,9 +38,10 @@
# endif
#endif
+#include "llwindowwin32.h" // *FIX: for setting gIconResource.
+
#include "llappviewerwin32.h"
-#include "llwindowwin32.h" // *FIX: for setting gIconResource.
#include "llgl.h"
#include "res/resource.h" // *FIX: for setting gIconResource.
@@ -49,6 +50,7 @@
#include // for AddERExcludedApplicationA()
#include // _spawnl()
#include // For TCHAR support
+#include
#include "llviewercontrol.h"
#include "lldxhardware.h"
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 963a546a0..a56db3f12 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -432,7 +432,7 @@ void LLAvatarActions::pay(const LLUUID& id)
LLNotification::Params params("BusyModePay");
params.functor(boost::bind(&LLAvatarActions::handlePay, _1, _2, id));
- if (gAgent.getBusy())
+ if (gAgent.isDoNotDisturb())
{
// warn users of being in busy mode during a transaction
LLNotifications::instance().add(params);
@@ -1110,7 +1110,7 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response,
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
- gAgent.clearBusy();
+ gAgent.setDoNotDisturb(false);
}
LLFloaterPay::payDirectly(&give_money, avatar_id, /*is_group=*/false);
diff --git a/indra/newview/llcloud.cpp b/indra/newview/llcloud.cpp
index 12c260b87..d826c5fbf 100644
--- a/indra/newview/llcloud.cpp
+++ b/indra/newview/llcloud.cpp
@@ -189,7 +189,7 @@ void LLCloudGroup::updatePuffCount()
return;
}
S32 i;
- S32 target_puff_count = llmath::llround(CLOUD_DENSITY * mDensity);
+ S32 target_puff_count = ll_round(CLOUD_DENSITY * mDensity);
target_puff_count = llmax(0, target_puff_count);
target_puff_count = llmin(CLOUD_COUNT_MAX, target_puff_count);
S32 current_puff_count = (S32) mCloudPuffs.size();
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 449753b47..d23c520c7 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -812,7 +812,7 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
}
pos -= camera.getOrigin();
- mDistanceWRTCamera = llmath::llround(pos.magVec(), 0.01f);
+ mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f);
mVObjp->updateLOD();
}
}
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 280f6e914..1a5cecb47 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -1309,7 +1309,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
for( i = minimum; i <= maximum; i++ )
{
F32 minus_one_to_one = F32(maximum - i) * twice_one_over_range - 1.f;
- bias_and_scale_lut[i] = llclampb(llmath::llround(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
+ bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
}
}
else
@@ -1318,7 +1318,7 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
for( i = minimum; i <= maximum; i++ )
{
F32 minus_one_to_one = F32(i - minimum) * twice_one_over_range - 1.f;
- bias_and_scale_lut[i] = llclampb(llmath::llround(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
+ bias_and_scale_lut[i] = llclampb(ll_round(127 * minus_one_to_one * ARTIFICIAL_SCALE + 128));
}
}
diff --git a/indra/newview/lldroptarget.cpp b/indra/newview/lldroptarget.cpp
index f41d0681a..6354ae522 100644
--- a/indra/newview/lldroptarget.cpp
+++ b/indra/newview/lldroptarget.cpp
@@ -253,8 +253,8 @@ void LLDropTarget::doDrop(EDragAndDropType cargo_type, void* cargo_data)
BOOL LLDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void* cargo_data, EAcceptance* accept, std::string& tooltip_msg)
{
- if (mEntityID.notNull())
- return getParent() ? LLToolDragAndDrop::handleGiveDragAndDrop(mEntityID, LLUUID::null, drop, cargo_type, cargo_data, accept) : false;
+ if (mID.notNull())
+ return getParent() ? LLToolDragAndDrop::handleGiveDragAndDrop(mID, LLUUID::null, drop, cargo_type, cargo_data, accept) : false;
if (LLViewerInventoryItem* inv_item = static_cast(cargo_data))
{
diff --git a/indra/newview/lldroptarget.h b/indra/newview/lldroptarget.h
index 69d9a6998..8edc4c691 100644
--- a/indra/newview/lldroptarget.h
+++ b/indra/newview/lldroptarget.h
@@ -76,13 +76,13 @@ public:
void setChildRects(LLRect rect);
void fillParent(const LLView* parent);
- void setEntityID(const LLUUID& id) { mEntityID = id;}
+ void setEntityID(const LLUUID& id) { mID = id; }
protected:
virtual void setItem(const class LLInventoryItem* item);
void setControlValue(const std::string& val);
- LLUUID mEntityID;
+ LLUUID mID;
class LLViewBorder* mBorder;
LLControlVariable* mControl;
boost::signals2::scoped_connection mConnection;
diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp
index eb360e120..05cbefacf 100644
--- a/indra/newview/llfasttimerview.cpp
+++ b/indra/newview/llfasttimerview.cpp
@@ -256,7 +256,7 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
if (hasMouseCapture())
{
F32 lerp = llclamp(1.f - (F32) (x - mGraphRect.mLeft) / (F32) mGraphRect.getWidth(), 0.f, 1.f);
- mScrollIndex = llmath::llround( lerp * (F32)(LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
+ mScrollIndex = ll_round( lerp * (F32)(LLFastTimer::NamedTimer::HISTORY_NUM - MAX_VISIBLE_HISTORY));
mScrollIndex = llclamp( mScrollIndex, 0, LLFastTimer::getLastFrameIndex());
return TRUE;
}
@@ -298,9 +298,9 @@ BOOL LLFastTimerView::handleHover(S32 x, S32 y, MASK mask)
}
mToolTipRect.set(mBarStart[mHoverBarIndex][i],
- mBarRect.mBottom + llmath::llround(((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex + 1)) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))),
+ mBarRect.mBottom + ll_round(((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex + 1)) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))),
mBarEnd[mHoverBarIndex][i],
- mBarRect.mBottom + llmath::llround((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))));
+ mBarRect.mBottom + ll_round((F32)(MAX_VISIBLE_HISTORY - mHoverBarIndex) * ((F32)mBarRect.getHeight() / ((F32)MAX_VISIBLE_HISTORY + 2.f))));
}
if ((*it)->getCollapsed())
@@ -432,7 +432,7 @@ void LLFastTimerView::draw()
mAverageCyclesPerTimer = LLFastTimer::sTimerCalls == 0
? 0
- : llmath::llround(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f));
+ : ll_round(lerp((F32)mAverageCyclesPerTimer, (F32)(LLFastTimer::sTimerCycles / (U64)LLFastTimer::sTimerCalls), 0.1f));
LLFastTimer::sTimerCycles = 0;
LLFastTimer::sTimerCalls = 0;
@@ -800,7 +800,7 @@ void LLFastTimerView::draw()
? (F32)idp->getCountAverage() / (F32)totalticks
: (F32)idp->getHistoricalCount(tidx) / (F32)totalticks;
- dx = llmath::llround(frac * (F32)barw);
+ dx = ll_round(frac * (F32)barw);
S32 prev_delta_x = deltax.empty() ? 0 : deltax.back();
deltax.push_back(dx);
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index 1bcf79278..380ea0df1 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -302,7 +302,7 @@ void LLVolumeImplFlexible::updateRenderRes()
mRenderRes = (S32) (12.f*app_angle);
#else //legacy behavior
//number of segments only cares about z axis
- F32 app_angle = llmath::llround((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
+ F32 app_angle = ll_round((F32) atan2( mVO->getScale().mV[2]*2.f, drawablep->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
// Rendering sections increases with visible angle on the screen
mRenderRes = (S32)(FLEXIBLE_OBJECT_MAX_SECTIONS*4*app_angle*DEG_TO_RAD/LLViewerCamera::getInstance()->getView());
diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp
index b2b7e71aa..4f4ac87fc 100644
--- a/indra/newview/llfloaterabout.cpp
+++ b/indra/newview/llfloaterabout.cpp
@@ -70,11 +70,6 @@
#include "lldxhardware.h"
#endif
-
-
-
-
-
extern LLMemoryInfo gSysMemory;
extern U32 gPacketsIn;
@@ -158,7 +153,7 @@ LLFloaterAbout::LLFloaterAbout()
support.append(llformat("Built with Clang version %d\n\n", CLANG_VERSION));
#endif
-#if LL_ICC
+#if LL_INTELC
support.append(llformat("Built with ICC version %d\n\n", __ICC));
#endif
diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp
index 51f7728a7..5085aac4d 100644
--- a/indra/newview/llfloateravatarlist.cpp
+++ b/indra/newview/llfloateravatarlist.cpp
@@ -530,25 +530,22 @@ void LLFloaterAvatarList::updateAvatarList()
}
{
- std::vector avatar_ids;
- std::vector sorted_avatar_ids;
- std::vector positions;
-
+ LLWorld::pos_map_t avs;
LLVector3d mypos = gAgent.getPositionGlobal();
static const LLCachedControl radar_range_radius("RadarRangeRadius", 0);
- LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, radar_range_radius ? radar_range_radius : F32_MAX);
+ LLWorld::instance().getAvatars(&avs, mypos, radar_range_radius ? radar_range_radius : F32_MAX);
static LLCachedControl announce(gSavedSettings, "RadarChatKeys");
std::queue announce_keys;
- for (size_t i = 0, count = avatar_ids.size(); i < count; ++i)
+ for (LLWorld::pos_map_t::const_iterator i = avs.cbegin(), end = avs.cend(); i != end; ++i)
{
- const LLUUID& avid = avatar_ids[i];
+ const LLUUID& avid = i->first;
std::string name;
static const LLCachedControl namesystem("RadarNameSystem");
if (!LLAvatarNameCache::getNSName(avid, name, namesystem)) continue; //prevent (Loading...)
- LLVector3d position = positions[i];
+ LLVector3d position = i->second;
LLVOAvatar* avatarp = gObjectList.findAvatar(avid);
if (avatarp) position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition());
@@ -653,7 +650,7 @@ void LLFloaterAvatarList::updateAvatarSorting()
}
}
-bool mm_getMarkerColor(const LLUUID&, LLColor4&);
+bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate);
/**
* Redraws the avatar list
@@ -740,37 +737,7 @@ void LLFloaterAvatarList::refreshAvatarList()
}
// custom colors for certain types of avatars!
- //Changed a bit so people can modify them in settings. And since they're colors, again it's possibly account-based. Starting to think I need a function just to determine that. - HgB
- //name.color = gColors.getColor( "MapAvatar" );
- LLUUID estate_owner = LLUUID::null;
- if (LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition()))
- if (parent_estate->isAlive())
- estate_owner = parent_estate->getOwner();
-
- //Lindens are always more Linden than your friend, make that take precedence
- if (mm_getMarkerColor(av_id, color)) {}
- else if (LLMuteList::getInstance()->isLinden(av_id))
- {
- static const LLCachedControl ascent_linden_color("AscentLindenColor", LLColor4(0.f,0.f,1.f,1.f));
- color = ascent_linden_color;
- }
- //check if they are an estate owner at their current position
- else if (estate_owner.notNull() && av_id == estate_owner)
- {
- static const LLCachedControl ascent_estate_owner_color("AscentEstateOwnerColor", LLColor4(1.f,0.6f,1.f,1.f));
- color = ascent_estate_owner_color;
- }
- //without these dots, SL would suck.
- else if (LLAvatarActions::isFriend(av_id))
- {
- static const LLCachedControl ascent_friend_color("AscentFriendColor", LLColor4(1.f,1.f,0.f,1.f));
- color = ascent_friend_color;
- }
- //big fat jerkface who is probably a jerk, display them as such.
- else if (LLMuteList::getInstance()->isMuted(av_id))
- {
- color = ascent_muted_color;
- }
+ getCustomColor(av_id, color, LLWorld::getInstance()->getRegionFromPosGlobal(entry->getPosition()));
name.color = color*0.5f + unselected_color*0.5f;
element.columns.add(name);
}
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index 86ed6505f..875925e26 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/indra/newview/llfloaterbuyland.cpp
@@ -386,9 +386,9 @@ void LLFloaterBuyLandUI::updateParcelInfo()
}
mParcelBillableArea =
- llmath::llround(mRegion->getBillableFactor() * mParcelActualArea);
+ ll_round(mRegion->getBillableFactor() * mParcelActualArea);
- mParcelSupportedObjects = llmath::llround(
+ mParcelSupportedObjects = ll_round(
parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
// Can't have more than region max tasks, regardless of parcel
// object bonus factor.
diff --git a/indra/newview/llfloaterdirectory.cpp b/indra/newview/llfloaterdirectory.cpp
index e6606de36..25ee21f7d 100644
--- a/indra/newview/llfloaterdirectory.cpp
+++ b/indra/newview/llfloaterdirectory.cpp
@@ -106,13 +106,13 @@ public:
{
if (LLViewerRegion* region = gAgent.getRegion())
{
- if (region->getFeaturesReceived())
+ if (region->simulatorFeaturesReceived())
{
setMarketplaceURL(container);
}
else
{
- region->setFeaturesReceivedCallback(boost::bind(&LLPanelDirMarket::setMarketplaceURL, this, container));
+ region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLPanelDirMarket::setMarketplaceURL, this, container));
}
}
}
diff --git a/indra/newview/llfloatereditui.cpp b/indra/newview/llfloatereditui.cpp
index 0bc8fcc15..2d7b42438 100644
--- a/indra/newview/llfloatereditui.cpp
+++ b/indra/newview/llfloatereditui.cpp
@@ -164,7 +164,7 @@ LLFloaterEditUI::LLFloaterEditUI()
spin = new LLSpinCtrl(std::string("width_spin"), LLRect(x, y+20, x+100, y),
std::string("Width:"), LLFontGL::getFontSansSerifSmall(),
- boost::bind(&LLFloaterEditUI::onCommitHeight,_1),
+ boost::bind(&LLFloaterEditUI::onCommitWidth,_1),
0.f,
2.f,
1000.f,
diff --git a/indra/newview/llfloaterenvsettings.cpp b/indra/newview/llfloaterenvsettings.cpp
index d6b053f97..3461b2461 100644
--- a/indra/newview/llfloaterenvsettings.cpp
+++ b/indra/newview/llfloaterenvsettings.cpp
@@ -316,7 +316,7 @@ std::string LLFloaterEnvSettings::timeToString(F32 curTime)
// get hours and minutes
hours = (S32) (24.0 * curTime);
curTime -= ((F32) hours / 24.0f);
- min = llmath::llround(24.0f * 60.0f * curTime);
+ min = ll_round(24.0f * 60.0f * curTime);
// handle case where it's 60
if(min == 60)
diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp
index bd5517c4e..b170a858e 100644
--- a/indra/newview/llfloaterfriends.cpp
+++ b/indra/newview/llfloaterfriends.cpp
@@ -459,11 +459,6 @@ void LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
itemp->getColumn(LIST_VISIBLE_MAP_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION));
itemp->getColumn(LIST_EDIT_THEIRS)->setValue(info->isRightGrantedFrom(LLRelationship::GRANT_MODIFY_OBJECTS));
- // enable this item, in case it was disabled after user input
- itemp->getColumn(LIST_VISIBLE_ONLINE)->setEnabled(true);
- itemp->getColumn(LIST_VISIBLE_MAP)->setEnabled(true);
- itemp->getColumn(LIST_EDIT_MINE)->setEnabled(true);
-
mFriendsList->setNeedsSort();
// Do not resort, this function can be called frequently.
@@ -471,30 +466,7 @@ void LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationsh
void LLPanelFriends::refreshRightsChangeList()
{
- const uuid_vec_t friends = mFriendsList->getSelectedIDs();
-
- size_t num_selected = friends.size();
- bool can_offer_teleport = num_selected;
-
- /* if (LLTextBox* processing_label = getChild("process_rights_label"))
- {
- processing_label->setVisible(true);
- // ignore selection for now
- friends.clear();
- num_selected = 0;
- } Making Dummy View -HgB */
- for(uuid_vec_t::const_iterator itr = friends.begin(); itr != friends.end(); ++itr)
- {
- if (const LLRelationship* friend_status = LLAvatarTracker::instance().getBuddyInfo(*itr))
- {
- if (!friend_status->isOnline())
- can_offer_teleport = false;
- }
- else // missing buddy info, don't allow any operations
- {
- can_offer_teleport = false;
- }
- }
+ S32 num_selected = mFriendsList->getNumSelected();
//Stuff for the online/total/select counts.
getChild("s_num")->setValue(llformat("%d", num_selected));
@@ -510,7 +482,7 @@ void LLPanelFriends::refreshRightsChangeList()
{
getChildView("im_btn")->setEnabled(true);
//getChildView("assign_btn")->setEnabled(num_selected == 1);
- getChildView("offer_teleport_btn")->setEnabled(can_offer_teleport);
+ getChildView("offer_teleport_btn")->setEnabled(true);
}
}
@@ -958,15 +930,7 @@ void LLPanelFriends::applyRightsToFriends()
}
if (rights_changed)
- {
rights_updates.insert(std::make_pair(id, rights));
- // disable these ui elements until response from server
- // to avoid race conditions
- LLScrollListItem& item = *(*itr);
- item.getColumn(LIST_VISIBLE_ONLINE)->setEnabled(false);
- item.getColumn(LIST_VISIBLE_MAP)->setEnabled(false);
- item.getColumn(LIST_EDIT_MINE)->setEnabled(false);
- }
}
// separately confirm grant and revoke of modify rights
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 57e4c0f20..85aae36b4 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1228,7 +1228,7 @@ void LLPanelLandObjects::refresh()
{
S32 sw_max = parcel->getSimWideMaxPrimCapacity();
S32 sw_total = parcel->getSimWidePrimCount();
- S32 max = llmath::llround(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
+ S32 max = ll_round(parcel->getMaxPrimCapacity() * parcel->getParcelPrimBonus());
S32 total = parcel->getPrimCount();
S32 owned = parcel->getOwnerPrimCount();
S32 group = parcel->getGroupPrimCount();
@@ -1574,8 +1574,7 @@ void LLPanelLandObjects::processParcelObjectOwnersReply(LLMessageSystem *msg, vo
LLVector3d mypos = gAgent.getPositionGlobal();
std::vector avatar_ids;
- std::vector positions;
- LLWorld::instance().getAvatars(&avatar_ids, &positions, mypos, F32_MAX);
+ LLWorld::instance().getAvatars(&avatar_ids, NULL, mypos, F32_MAX);
for(S32 i = 0; i < rows; ++i)
{
@@ -2106,9 +2105,9 @@ void LLPanelLandOptions::refresh()
else
{
mLocationText->setTextArg("[LANDING]",llformat("%d, %d, %d",
- llmath::llround(pos.mV[VX]),
- llmath::llround(pos.mV[VY]),
- llmath::llround(pos.mV[VZ])));
+ ll_round(pos.mV[VX]),
+ ll_round(pos.mV[VY]),
+ ll_round(pos.mV[VZ])));
}
mSetBtn->setEnabled( can_change_landing_point );
diff --git a/indra/newview/llfloaterlandholdings.cpp b/indra/newview/llfloaterlandholdings.cpp
index b672cbe91..12a0cc797 100644
--- a/indra/newview/llfloaterlandholdings.cpp
+++ b/indra/newview/llfloaterlandholdings.cpp
@@ -227,8 +227,8 @@ void LLFloaterLandHoldings::processPlacesReply(LLMessageSystem* msg, void**)
self->mActualArea += actual_area;
self->mBillableArea += billable_area;
- S32 region_x = llmath::llround(global_x) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround(global_y) % REGION_WIDTH_UNITS;
+ S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS;
std::string location;
location = llformat("%s (%d, %d)", sim_name.c_str(), region_x, region_y);
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp
index d335b9566..0cccc80f7 100644
--- a/indra/newview/llfloaterpathfindingcharacters.cpp
+++ b/indra/newview/llfloaterpathfindingcharacters.cpp
@@ -219,7 +219,7 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListItemData(const LLPa
columns[2]["column"] = "owner";
columns[2]["value"] = getOwnerName(pCharacterPtr);
- S32 cpuTime = llmath::llround(pCharacterPtr->getCPUTime());
+ S32 cpuTime = ll_round(pCharacterPtr->getCPUTime());
std::string cpuTimeString = llformat("%d", cpuTime);
LLStringUtil::format_map_t string_args;
string_args["[CPU_TIME]"] = cpuTimeString;
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index f8c1b504b..73626b21b 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -493,16 +493,16 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
if (mAspectRatio > window_aspect_ratio)
{
// trim off top and bottom
- S32 height_diff = llmath::llround(getRect().getHeight() - (F32)getRect().getWidth() / mAspectRatio);
- S32 half_height_diff = llmath::llround((getRect().getHeight() - (F32)getRect().getWidth() / mAspectRatio) * 0.5);
+ S32 height_diff = ll_round(getRect().getHeight() - (F32)getRect().getWidth() / mAspectRatio);
+ S32 half_height_diff = ll_round((getRect().getHeight() - (F32)getRect().getWidth() / mAspectRatio) * 0.5);
rect.mBottom += half_height_diff;
rect.mTop -= height_diff - half_height_diff;
}
else if (mAspectRatio < window_aspect_ratio)
{
// trim off left and right
- S32 width_diff = llmath::llround(getRect().getWidth() - (F32)getRect().getHeight() * mAspectRatio);
- S32 half_width_diff = llmath::llround((getRect().getWidth() - (F32)getRect().getHeight() * mAspectRatio) * 0.5f);
+ S32 width_diff = ll_round(getRect().getWidth() - (F32)getRect().getHeight() * mAspectRatio);
+ S32 half_width_diff = ll_round((getRect().getWidth() - (F32)getRect().getHeight() * mAspectRatio) * 0.5f);
rect.mLeft += half_width_diff;
rect.mRight -= width_diff - half_width_diff;
}
@@ -639,9 +639,9 @@ void LLSnapshotLivePreview::draw()
LLLocalClipRect clip(getLocalRect());
{
// draw diagonal stripe with gradient that passes over screen
- S32 x1 = gViewerWindow->getWindowWidthScaled() * llmath::llround((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
- S32 x2 = x1 + llmath::llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
- S32 x3 = x2 + llmath::llround(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
+ S32 x1 = gViewerWindow->getWindowWidthScaled() * ll_round((clamp_rescale(shine_interp, 0.f, 1.f, -1.f - SHINE_WIDTH, 1.f)));
+ S32 x2 = x1 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
+ S32 x3 = x2 + ll_round(gViewerWindow->getWindowWidthScaled() * SHINE_WIDTH);
S32 y1 = 0;
S32 y2 = gViewerWindow->getWindowHeightScaled();
@@ -719,7 +719,7 @@ void LLSnapshotLivePreview::draw()
gGL.pushMatrix();
{
LLRect const& rect = mFallFullScreenImageRect;
- gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - llmath::llround(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
+ gGL.translatef((F32)rect.mLeft, (F32)rect.mBottom - ll_round(getRect().getHeight() * 2.f * (fall_interp * fall_interp)), 0.f);
gGL.rotatef(-45.f * fall_interp, 0.f, 0.f, 1.f);
gGL.begin(LLRender::QUADS);
{
@@ -772,13 +772,13 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
{
// image too wide, shrink to width
mThumbnailWidth = max_width;
- mThumbnailHeight = llmath::llround((F32)max_width / window_aspect_ratio);
+ mThumbnailHeight = ll_round((F32)max_width / window_aspect_ratio);
}
else
{
// image too tall, shrink to height
mThumbnailHeight = max_height;
- mThumbnailWidth = llmath::llround((F32)max_height * window_aspect_ratio);
+ mThumbnailWidth = ll_round((F32)max_height * window_aspect_ratio);
}
if(mThumbnailWidth > window_width || mThumbnailHeight > window_height)
@@ -790,11 +790,11 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize()
F32 ratio = mAspectRatio * window_height / window_width;
if(ratio > 1.f)
{
- top = llmath::llround(top / ratio);
+ top = ll_round(top / ratio);
}
else
{
- right = llmath::llround(right * ratio);
+ right = ll_round(right * ratio);
}
left = (mThumbnailWidth - right + 1) / 2;
bottom = (mThumbnailHeight - top + 1) / 2;
@@ -991,8 +991,8 @@ LLSnapshotLivePreview::EAspectSizeProblem LLSnapshotLivePreview::getAspectSizePr
// We need an image with the aspect mAspectRatio (from which mWidth and mHeight were derived).
// The current aspect ratio of mRawSnapshot. This should be (almost) equal to window_width / window_height,
- // since these values are calculated in rawRawSnapshot with llmath::llround(window_width * scale_factor) and
- // llmath::llround(window_height * scale_factor) respectively (since we set uncrop = true).
+ // since these values are calculated in rawRawSnapshot with ll_round(window_width * scale_factor) and
+ // ll_round(window_height * scale_factor) respectively (since we set uncrop = true).
F32 raw_aspect = (F32)mRawSnapshotWidth / mRawSnapshotHeight;
// The smaller dimension might have been rounded up to 0.5 up or down. Calculate upper and lower limits.
F32 lower_raw_aspect = (mRawSnapshotWidth - 0.5) / (mRawSnapshotHeight + 0.5);
@@ -1017,7 +1017,7 @@ LLSnapshotLivePreview::EAspectSizeProblem LLSnapshotLivePreview::getAspectSizePr
height_out = mRawSnapshotHeight;
if (mAspectRatio < lower_raw_aspect)
{
- width_out = llmath::llround(width_out * mAspectRatio / raw_aspect);
+ width_out = ll_round(width_out * mAspectRatio / raw_aspect);
if (width_out < mRawSnapshotWidth)
{
// Only set this to false when there is actually something to crop.
@@ -1033,7 +1033,7 @@ LLSnapshotLivePreview::EAspectSizeProblem LLSnapshotLivePreview::getAspectSizePr
}
else if (mAspectRatio > upper_raw_aspect)
{
- height_out = llmath::llround(height_out * raw_aspect / mAspectRatio);
+ height_out = ll_round(height_out * raw_aspect / mAspectRatio);
if (height_out < mRawSnapshotHeight)
{
if (!allow_vertical_crop)
@@ -2407,8 +2407,8 @@ void LLFloaterSnapshot::Impl::keepAspect(LLFloaterSnapshot* view, bool on, bool
LLSnapshotLivePreview* previewp = getPreviewView();
if (previewp)
{
- S32 w = llmath::llround(view->childGetValue("snapshot_width").asReal(), 1.0);
- S32 h = llmath::llround(view->childGetValue("snapshot_height").asReal(), 1.0);
+ S32 w = ll_round(view->childGetValue("snapshot_width").asReal(), 1.0);
+ S32 h = ll_round(view->childGetValue("snapshot_height").asReal(), 1.0);
gSavedSettings.setS32(lastSnapshotWidthName(), w);
gSavedSettings.setS32(lastSnapshotHeightName(), h);
comboSetCustom(view, previewp->resolutionComboName());
@@ -2468,8 +2468,8 @@ void LLFloaterSnapshot::Impl::updateResolution(LLUICtrl* ctrl, void* data, bool
// The size is actually the source aspect now, encoded in the width.
F32 source_aspect = width / 630.f;
// Use the size of the current window, cropped to the required aspect.
- width = llmin(gViewerWindow->getWindowDisplayWidth(), llmath::llround(gViewerWindow->getWindowDisplayHeight() * source_aspect));
- height = llmin(gViewerWindow->getWindowDisplayHeight(), llmath::llround(gViewerWindow->getWindowDisplayWidth() / source_aspect));
+ width = llmin(gViewerWindow->getWindowDisplayWidth(), ll_round(gViewerWindow->getWindowDisplayHeight() * source_aspect));
+ height = llmin(gViewerWindow->getWindowDisplayHeight(), ll_round(gViewerWindow->getWindowDisplayWidth() / source_aspect));
previewp->setSize(width, height);
}
else
@@ -2656,8 +2656,8 @@ void LLFloaterSnapshot::Impl::enforceResolution(LLFloaterSnapshot* floater, F32
nw = llmin(nw, nh * new_aspect);
nh = llmin(nh, nw / new_aspect);
// Round off to nearest integer.
- S32 new_width = llmath::llround(nw);
- S32 new_height = llmath::llround(nh);
+ S32 new_width = ll_round(nw);
+ S32 new_height = ll_round(nh);
gSavedSettings.setS32(lastSnapshotWidthName(), new_width);
gSavedSettings.setS32(lastSnapshotHeightName(), new_height);
@@ -2758,8 +2758,8 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
LLSpinCtrl* width_spinner = view->getChild("snapshot_width");
LLSpinCtrl* height_spinner = view->getChild("snapshot_height");
- S32 w = llmath::llround((F32)width_spinner->getValue().asReal(), 1.0f);
- S32 h = llmath::llround((F32)height_spinner->getValue().asReal(), 1.0f);
+ S32 w = ll_round((F32)width_spinner->getValue().asReal(), 1.0f);
+ S32 h = ll_round((F32)height_spinner->getValue().asReal(), 1.0f);
LLSnapshotLivePreview* previewp = getPreviewView();
if (previewp)
@@ -2786,12 +2786,12 @@ void LLFloaterSnapshot::Impl::onCommitCustomResolution(LLUICtrl *ctrl, void* dat
if (h == curh)
{
// Width was changed. Change height to keep aspect constant.
- h = llmath::llround(w / aspect);
+ h = ll_round(w / aspect);
}
else
{
// Height was changed. Change width to keep aspect constant.
- w = llmath::llround(h * aspect);
+ w = ll_round(h * aspect);
}
}
width_spinner->forceSetValue(LLSD::Real(w));
diff --git a/indra/newview/llfloaterurldisplay.cpp b/indra/newview/llfloaterurldisplay.cpp
index c265c6169..514f1f758 100644
--- a/indra/newview/llfloaterurldisplay.cpp
+++ b/indra/newview/llfloaterurldisplay.cpp
@@ -48,7 +48,7 @@ LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd)
{
mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this);
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_preview_url.xml", &getFactoryMap());
- this->setVisible(false);
+ setVisible(false);
// If positioned at 0,0 the teleport button is behind the toolbar.
LLRect r = getRect();
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 3fdb07d81..83135dc9f 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -39,6 +39,7 @@
#include "llfloaterworldmap.h"
+#include "alfloaterregiontracker.h"
#include "llagent.h"
#include "llagentcamera.h"
#include "llbutton.h"
@@ -268,6 +269,7 @@ LLFloaterWorldMap::LLFloaterWorldMap()
mCommitCallbackRegistrar.add("WMap.ShowAgent", boost::bind(&LLFloaterWorldMap::onShowAgentBtn, this));
mCommitCallbackRegistrar.add("WMap.Clear", boost::bind(&LLFloaterWorldMap::onClearBtn, this));
mCommitCallbackRegistrar.add("WMap.CopySLURL", boost::bind(&LLFloaterWorldMap::onCopySLURL, this));
+ mCommitCallbackRegistrar.add("WMap.TrackRegion", boost::bind(&LLFloaterWorldMap::onTrackRegion, this));
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_world_map.xml", &getFactoryMap());
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterWorldMap::onChangeMaturity, this));
@@ -535,8 +537,10 @@ void LLFloaterWorldMap::draw()
getChildView("Teleport")->setEnabled((BOOL)tracking_status);
// getChildView("Clear")->setEnabled((BOOL)tracking_status);
- getChildView("Show Destination")->setEnabled((BOOL)tracking_status || LLWorldMap::getInstance()->isTracking());
+ bool is_tracking((BOOL)tracking_status || LLWorldMap::instance().isTracking());
+ getChildView("Show Destination")->setEnabled(is_tracking);
getChildView("copy_slurl")->setEnabled((mSLURL.isValid()) );
+ getChild("track_region")->setEnabled(is_tracking);
setMouseOpaque(TRUE);
getDragHandle()->setMouseOpaque(TRUE);
@@ -709,9 +713,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
//
std::string full_name = llformat("%s (%d, %d, %d)",
sim_name.c_str(),
- llmath::llround(region_x),
- llmath::llround(region_y),
- llmath::llround((F32)pos_global.mdV[VZ]));
+ ll_round(region_x),
+ ll_round(region_y),
+ ll_round((F32)pos_global.mdV[VZ]));
std::string tooltip("");
mTrackedStatus = LLTracker::TRACKING_LOCATION;
@@ -1427,6 +1431,28 @@ void LLFloaterWorldMap::onCopySLURL()
LLNotificationsUtil::add("CopySLURL", args);
}
+void LLFloaterWorldMap::onTrackRegion()
+{
+ ALFloaterRegionTracker* floaterp = ALFloaterRegionTracker::getInstance();
+ if (floaterp)
+ {
+ if (LLTracker::getTrackingStatus() != LLTracker::TRACKING_NOTHING)
+ {
+ std::string sim_name;
+ LLWorldMap::getInstance()->simNameFromPosGlobal(LLTracker::getTrackedPositionGlobal(), sim_name);
+ if (!sim_name.empty())
+ {
+ const std::string& temp_label = floaterp->getRegionLabelIfExists(sim_name);
+ LLSD args, payload;
+ args["REGION"] = sim_name;
+ args["LABEL"] = !temp_label.empty() ? temp_label : sim_name;
+ payload["name"] = sim_name;
+ LLNotificationsUtil::add("RegionTrackerAdd", args, payload, boost::bind(&ALFloaterRegionTracker::onRegionAddedCallback, floaterp, _1, _2));
+ }
+ }
+ }
+}
+
// protected
void LLFloaterWorldMap::centerOnTarget(BOOL animate)
{
@@ -1741,10 +1767,10 @@ void LLFloaterWorldMap::onChangeMaturity()
bool can_access_adult = gAgent.canAccessAdult();
getChildView("events_mature_icon")->setVisible( can_access_mature);
- getChildView("event_mature_chk")->setVisible( can_access_mature);
+ getChildView("events_mature_chk")->setVisible( can_access_mature);
getChildView("events_adult_icon")->setVisible( can_access_adult);
- getChildView("event_adult_chk")->setVisible( can_access_adult);
+ getChildView("events_adult_chk")->setVisible( can_access_adult);
// disable mature / adult events.
if (!can_access_mature)
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 652c23e1f..952570287 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -132,6 +132,7 @@ protected:
void onShowTargetBtn();
void onShowAgentBtn();
void onCopySLURL();
+ void onTrackRegion();
void centerOnTarget(BOOL animate);
void updateLocation();
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 14259fe99..291a1efe1 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -535,7 +535,7 @@ S32 LLFolderView::arrange( S32* unused_width, S32* unused_height, S32 filter_gen
updateRenamerPosition();
mTargetHeight = (F32)target_height;
- return llmath::llround(mTargetHeight);
+ return ll_round(mTargetHeight);
}
const std::string LLFolderView::getFilterSubString(BOOL trim)
@@ -2041,7 +2041,7 @@ void LLFolderView::scrollToShowItem(LLFolderViewItem* item, const LLRect& constr
LLRect item_scrolled_rect; // item position relative to display area of scroller
S32 icon_height = mIcon.isNull() ? 0 : mIcon->getHeight();
- S32 label_height = llmath::llround(getLabelFontForStyle(mLabelStyle)->getLineHeight());
+ S32 label_height = ll_round(getLabelFontForStyle(mLabelStyle)->getLineHeight());
// when navigating with keyboard, only move top of opened folder on screen, otherwise show whole folder
S32 max_height_to_show = item->isOpen() && mScrollContainer->hasFocus() ? (llmax( icon_height, label_height ) + ICON_PAD) : local_rect.getHeight();
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 3014bf180..f71eb1cf6 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -454,6 +454,9 @@ void LLFolderViewItem::filter( LLInventoryFilter& filter)
setFiltered(passed_filter, filter.getCurrentGeneration());
mStringMatchOffset = filter.getStringMatchOffset();
+ // If Creator is part of the filter, don't let it get highlighted if it matches
+ if (mSearchType & 4 && mStringMatchOffset >= mSearchable.length()-mSearchableLabelCreator.length())
+ mStringMatchOffset = std::string::npos;
filter.decrementFilterCount();
if (getRoot()->getDebugFilters())
@@ -1088,7 +1091,7 @@ void LLFolderViewItem::draw()
if (filter_string_length > 0 && (mRoot->getSearchType() & 1))
{
std::string combined_string = mLabel + mLabelSuffix;
- S32 left = llmath::llround(text_left) + font->getWidth(combined_string, 0, mStringMatchOffset) - 1;
+ S32 left = ll_round(text_left) + font->getWidth(combined_string, 0, mStringMatchOffset) - 1;
S32 right = left + font->getWidth(combined_string, mStringMatchOffset, filter_string_length) + 2;
S32 bottom = llfloor(getRect().getHeight() - font->getLineHeight() - 3 - TOP_PAD);
S32 top = getRect().getHeight() - TOP_PAD;
@@ -1225,7 +1228,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
{
S32 child_width = *width;
S32 child_height = 0;
- S32 child_top = parent_item_height - llmath::llround(running_height);
+ S32 child_top = parent_item_height - ll_round(running_height);
target_height += folderp->arrange( &child_width, &child_height, filter_generation );
@@ -1251,7 +1254,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
{
S32 child_width = *width;
S32 child_height = 0;
- S32 child_top = parent_item_height - llmath::llround(running_height);
+ S32 child_top = parent_item_height - ll_round(running_height);
target_height += itemp->arrange( &child_width, &child_height, filter_generation );
// don't change width, as this item is as wide as its parent folder by construction
@@ -1288,7 +1291,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
folders_t::iterator fit = iter++;
// number of pixels that bottom of folder label is from top of parent folder
if (getRect().getHeight() - (*fit)->getRect().mTop + (*fit)->getItemHeight()
- > llmath::llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
+ > ll_round(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
{
// hide if beyond current folder height
(*fit)->setVisible(FALSE);
@@ -1301,7 +1304,7 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
items_t::iterator iit = iter++;
// number of pixels that bottom of item label is from top of parent folder
if (getRect().getHeight() - (*iit)->getRect().mBottom
- > llmath::llround(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
+ > ll_round(mCurHeight) + MAX_FOLDER_ITEM_OVERLAP)
{
(*iit)->setVisible(FALSE);
}
@@ -1313,12 +1316,12 @@ S32 LLFolderViewFolder::arrange( S32* width, S32* height, S32 filter_generation)
}
// don't change width as this item is already as wide as its parent folder
- reshape(getRect().getWidth(),llmath::llround(mCurHeight));
+ reshape(getRect().getWidth(),ll_round(mCurHeight));
// pass current height value back to parent
- *height = llmath::llround(mCurHeight);
+ *height = ll_round(mCurHeight);
- return llmath::llround(mTargetHeight);
+ return ll_round(mTargetHeight);
}
BOOL LLFolderViewFolder::needsArrange()
diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp
index 517266097..3a1a076e5 100644
--- a/indra/newview/llgesturemgr.cpp
+++ b/indra/newview/llgesturemgr.cpp
@@ -61,6 +61,8 @@
#include "shcommandhandler.h"
#endif //shy_mod
+void fake_local_chat(std::string msg);
+
// Longest time, in seconds, to wait for all animations to stop playing
const F32 MAX_WAIT_ANIM_SECS = 30.f;
@@ -522,7 +524,7 @@ void LLGestureMgr::replaceGesture(const LLUUID& item_id, const LLUUID& new_asset
LLGestureMgr::instance().replaceGesture(base_item_id, gesture, new_asset_id);
}
-void LLGestureMgr::playGesture(LLMultiGesture* gesture)
+void LLGestureMgr::playGesture(LLMultiGesture* gesture, bool local)
{
if (!gesture) return;
@@ -531,6 +533,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
// Add to list of playing
gesture->mPlaying = TRUE;
+ gesture->mLocal = local;
mPlaying.push_back(gesture);
// Load all needed assets to minimize the delays
@@ -608,7 +611,7 @@ void LLGestureMgr::playGesture(LLMultiGesture* gesture)
// Convenience function that looks up the item_id for you.
-void LLGestureMgr::playGesture(const LLUUID& item_id)
+void LLGestureMgr::playGesture(const LLUUID& item_id, bool local)
{
const LLUUID& base_item_id = get_linked_uuid(item_id);
@@ -826,8 +829,7 @@ void LLGestureMgr::stepGesture(LLMultiGesture* gesture)
{
// look in signaled animations (simulator's view of what is
// currently playing.
- LLVOAvatar::AnimIterator play_it = gAgentAvatarp->mSignaledAnimations.find(*gest_it);
- if (play_it != gAgentAvatarp->mSignaledAnimations.end())
+ if (gesture->mLocal ? !!gAgentAvatarp->findMotion(*gest_it) : (gAgentAvatarp->mSignaledAnimations.find(*gest_it) != gAgentAvatarp->mSignaledAnimations.end()))
{
++gest_it;
}
@@ -970,21 +972,37 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
if (anim_step->mFlags & ANIM_FLAG_STOP)
{
- gAgent.sendAnimationRequest(anim_step->mAnimAssetID, ANIM_REQUEST_STOP);
- // remove it from our request set in case we just requested it
- std::set::iterator set_it = gesture->mRequestedAnimIDs.find(anim_step->mAnimAssetID);
- if (set_it != gesture->mRequestedAnimIDs.end())
+ if (gesture->mLocal)
{
- gesture->mRequestedAnimIDs.erase(set_it);
+ gAgentAvatarp->stopMotion(anim_step->mAnimAssetID);
+ }
+ else
+ {
+ gAgent.sendAnimationRequest(anim_step->mAnimAssetID, ANIM_REQUEST_STOP);
+ // remove it from our request set in case we just requested it
+ std::set::iterator set_it = gesture->mRequestedAnimIDs.find(anim_step->mAnimAssetID);
+ if (set_it != gesture->mRequestedAnimIDs.end())
+ {
+ gesture->mRequestedAnimIDs.erase(set_it);
+ }
}
}
else
{
- gAgent.sendAnimationRequest(anim_step->mAnimAssetID, ANIM_REQUEST_START);
- // Indicate that we've requested this animation to play as
- // part of this gesture (but it won't start playing for at
- // least one round-trip to simulator).
- gesture->mRequestedAnimIDs.insert(anim_step->mAnimAssetID);
+ if (gesture->mLocal)
+ {
+ gAgentAvatarp->startMotion(anim_step->mAnimAssetID);
+ // Indicate we're playing this animation now.
+ gesture->mPlayingAnimIDs.insert(anim_step->mAnimAssetID);
+ }
+ else
+ {
+ gAgent.sendAnimationRequest(anim_step->mAnimAssetID, ANIM_REQUEST_START);
+ // Indicate that we've requested this animation to play as
+ // part of this gesture (but it won't start playing for at
+ // least one round-trip to simulator).
+ gesture->mRequestedAnimIDs.insert(anim_step->mAnimAssetID);
+ }
}
gesture->mCurrentStep++;
break;
@@ -994,7 +1012,10 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
LLGestureStepSound* sound_step = (LLGestureStepSound*)step;
const LLUUID& sound_id = sound_step->mSoundAssetID;
const F32 volume = 1.f;
- send_sound_trigger(sound_id, volume);
+ if (gesture->mLocal)
+ gAudiop->triggerSound(sound_id, gAgentID, volume, LLAudioEngine::AUDIO_TYPE_UI, gAgent.getPositionGlobal());
+ else
+ send_sound_trigger(sound_id, volume);
gesture->mCurrentStep++;
break;
}
@@ -1011,7 +1032,7 @@ void LLGestureMgr::runStep(LLMultiGesture* gesture, LLGestureStep* step)
#if SHY_MOD //Command handler
if(!SHCommandHandler::handleCommand(true, chat_text, gAgentID, gAgentAvatarp))//returns true if handled
#endif //shy_mod
- gChatBar->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate);
+ gesture->mLocal ? fake_local_chat(chat_text) : gChatBar->sendChatFromViewer(chat_text, CHAT_TYPE_NORMAL, animate);
}
gesture->mCurrentStep++;
break;
@@ -1284,7 +1305,10 @@ void LLGestureMgr::stopGesture(LLMultiGesture* gesture)
for (set_it = gesture->mPlayingAnimIDs.begin(); set_it != gesture->mPlayingAnimIDs.end(); ++set_it)
{
const LLUUID& anim_id = *set_it;
- gAgent.sendAnimationRequest(anim_id, ANIM_REQUEST_STOP);
+ if (gesture->mLocal)
+ gAgentAvatarp->stopMotion(anim_id, TRUE);
+ else
+ gAgent.sendAnimationRequest(anim_id, ANIM_REQUEST_STOP);
}
std::vector::iterator it;
diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h
index 9f112261b..419ae77e7 100644
--- a/indra/newview/llgesturemgr.h
+++ b/indra/newview/llgesturemgr.h
@@ -103,8 +103,8 @@ public:
const item_map_t& getActiveGestures() const { return mActive; }
// Force a gesture to be played, for example, if it is being
// previewed.
- void playGesture(LLMultiGesture* gesture);
- void playGesture(const LLUUID& item_id);
+ void playGesture(LLMultiGesture* gesture, bool local = false);
+ void playGesture(const LLUUID& item_id, bool local = false);
// Stop all requested or playing anims for this gesture
// Also remove from playing list
diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp
index c951fe953..4e6846686 100644
--- a/indra/newview/llglsandbox.cpp
+++ b/indra/newview/llglsandbox.cpp
@@ -100,10 +100,10 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask)
S32 top = llmax(y, mDragStartY);
S32 bottom =llmin(y, mDragStartY);
- left = llmath::llround((F32) left * LLUI::getScaleFactor().mV[VX]);
- right = llmath::llround((F32) right * LLUI::getScaleFactor().mV[VX]);
- top = llmath::llround((F32) top * LLUI::getScaleFactor().mV[VY]);
- bottom = llmath::llround((F32) bottom * LLUI::getScaleFactor().mV[VY]);
+ left = ll_round((F32) left * LLUI::getScaleFactor().mV[VX]);
+ right = ll_round((F32) right * LLUI::getScaleFactor().mV[VX]);
+ top = ll_round((F32) top * LLUI::getScaleFactor().mV[VY]);
+ bottom = ll_round((F32) bottom * LLUI::getScaleFactor().mV[VY]);
F32 old_far_plane = LLViewerCamera::getInstance()->getFar();
F32 old_near_plane = LLViewerCamera::getInstance()->getNear();
diff --git a/indra/newview/llgroupmgr.cpp b/indra/newview/llgroupmgr.cpp
index 524763f98..d6a85512a 100644
--- a/indra/newview/llgroupmgr.cpp
+++ b/indra/newview/llgroupmgr.cpp
@@ -964,6 +964,17 @@ static void formatDateString(std::string &date_string)
}
}
+const std::string& localized_online()
+{
+ static const std::string online(LLTrans::getString("group_member_status_online"));
+ return online;
+}
+const std::string& localized_unknown()
+{
+ static const std::string unknown(LLTrans::getString("group_member_status_unknown"));
+ return unknown;
+}
+
// static
void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
{
@@ -1015,13 +1026,11 @@ void LLGroupMgr::processGroupMembersReply(LLMessageSystem* msg, void** data)
{
if (online_status == "Online")
{
- static std::string localized_online(LLTrans::getString("group_member_status_online"));
- online_status = localized_online;
+ online_status = localized_online();
}
else if (online_status == "unknown")
{
- static std::string localized_unknown(LLTrans::getString("group_member_status_unknown"));
- online_status = localized_unknown;
+ online_status = localized_unknown();
}
else
{
@@ -2214,7 +2223,7 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
for ( ; member_iter_start != member_iter_end; ++member_iter_start)
{
// Reset defaults
- online_status = LLTrans::getString("group_member_status_unknown");
+ online_status = localized_unknown();
title = titles[0].asString();
contribution = 0;
member_powers = default_powers;
@@ -2227,9 +2236,9 @@ void LLGroupMgr::processCapGroupMembersRequest(const LLSD& content)
{
online_status = member_info["last_login"].asString();
if (online_status == "Online")
- online_status = LLTrans::getString("group_member_status_online");
+ online_status = localized_online();
else if (online_status == "unknown")
- online_status = LLTrans::getString("group_member_status_unknown");
+ online_status = localized_unknown();
else
formatDateString(online_status);
}
diff --git a/indra/newview/llhudeffectlookat.cpp b/indra/newview/llhudeffectlookat.cpp
index 3efb9299a..f2eac7a91 100644
--- a/indra/newview/llhudeffectlookat.cpp
+++ b/indra/newview/llhudeffectlookat.cpp
@@ -55,6 +55,7 @@
#include "llviewerwindow.h"
#include "llviewercontrol.h"
//
+#include "rlvhandler.h"
// packet layout
@@ -553,6 +554,8 @@ void LLHUDEffectLookAt::render()
if (!LLAvatarNameCache::getNSName(static_cast(mSourceObject.get())->getID(), text, lookAtNames)) return;
if (text.length() > 9 && 0 == text.compare(text.length() - 9, 9, " Resident"))
text.erase(text.length() - 9);
+ if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
+ text = RlvStrings::getAnonym(text);
LLVector3 offset = gAgentCamera.getCameraPositionAgent() - target;
offset.normalize();
LLVector3 shadow_offset = offset * 0.49f;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 31b562e31..9c8c6222e 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -53,6 +53,7 @@
#include "llmutelist.h"
#include "llspeakers.h"
#include "llvoavatar.h" // For mIdleTimer reset
+#include "llviewerobjectlist.h"
#include "llviewerregion.h"
// [RLVa:KB] - Checked: 2013-05-10 (RLVa-1.4.9)
@@ -97,14 +98,22 @@ LLColor4 agent_chat_color(const LLUUID& id, const std::string& name, bool local_
static const LLCachedControl color_eo_chat("ColorEstateOwnerChat");
if (color_eo_chat)
{
- const LLViewerRegion* parent_estate = gAgent.getRegion();
- if (parent_estate && id == parent_estate->getOwner())
- return gSavedSettings.getColor4("AscentEstateOwnerColor");
+ const LLViewerObject* obj = gObjectList.findObject(id); // Nearby?
+ if (const LLViewerRegion* parent_estate = obj ? obj->getRegion() : gAgent.getRegion())
+ if (id == parent_estate->getOwner())
+ return gSavedSettings.getColor4("AscentEstateOwnerColor");
}
return local_chat ? gSavedSettings.getColor4("AgentChatColor") : gSavedSettings.getColor("IMChatColor");
}
+bool block_conference(const LLUUID& id)
+{
+ const U32 block(gSavedSettings.getU32("LiruBlockConferences"));
+ if (block == 2) return !LLAvatarActions::isFriend(id);
+ return block;
+}
+
class LLViewerChatterBoxInvitationAcceptResponder : public LLHTTPClient::ResponderWithResult
{
@@ -449,7 +458,7 @@ void LLIMMgr::addMessage(
if(!floater)
{
// Return now if we're blocking this group's chat or conferences
- if (gAgent.isInGroup(session_id) ? getIgnoreGroup(session_id) : dialog != IM_NOTHING_SPECIAL && dialog != IM_SESSION_P2P_INVITE && gSavedSettings.getBOOL("LiruBlockConferences"))
+ if (gAgent.isInGroup(session_id) ? getIgnoreGroup(session_id) : dialog != IM_NOTHING_SPECIAL && dialog != IM_SESSION_P2P_INVITE && block_conference(other_participant_id))
return;
std::string name = (session_name.size() > 1) ? session_name : from;
@@ -1476,7 +1485,7 @@ public:
time_t timestamp =
(time_t) message_params["timestamp"].asInteger();
- BOOL is_busy = gAgent.getBusy();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = LLMuteList::getInstance()->isMuted(
from_id,
name,
@@ -1499,7 +1508,7 @@ public:
chat.mFromID = from_id;
chat.mFromName = name;
- if (!is_linden && (is_busy || is_muted))
+ if (!is_linden && (is_do_not_disturb || is_muted))
{
return;
}
@@ -1566,7 +1575,7 @@ public:
}
else
{
- if (from_id != session_id && gSavedSettings.getBOOL("LiruBlockConferences")) // from and session are equal for IMs only.
+ if (from_id != session_id && block_conference(from_id)) // from and session are equal for IMs only.
{
leave_group_chat(from_id, session_id);
return;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index a5ababe30..2358bec4c 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1520,46 +1520,42 @@ void LLItemBridge::restoreItem()
}
}
-void LLItemBridge::restoreToWorld()
+void restore_to_world(LLViewerInventoryItem* itemp, bool no_copy, bool response = true)
{
- //Similar functionality to the drag and drop rez logic
- bool remove_from_inventory = false;
+ if (!response) return;
+ LLMessageSystem* msg = gMessageSystem;
+ msg->newMessage("RezRestoreToWorld");
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgentID);
+ msg->addUUIDFast(_PREHASH_SessionID, gAgentSessionID);
- LLViewerInventoryItem* itemp = static_cast(getItem());
- if (itemp)
- {
- LLMessageSystem* msg = gMessageSystem;
- msg->newMessage("RezRestoreToWorld");
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->nextBlockFast(_PREHASH_InventoryData);
+ itemp->packMessage(msg);
+ msg->sendReliable(gAgent.getRegion()->getHost());
- msg->nextBlockFast(_PREHASH_InventoryData);
- itemp->packMessage(msg);
- msg->sendReliable(gAgent.getRegion()->getHost());
-
- //remove local inventory copy, sim will deal with permissions and removing the item
- //from the actual inventory if its a no-copy etc
- if(!itemp->getPermissions().allowCopyBy(gAgent.getID()))
- {
- remove_from_inventory = true;
- }
-
- // Check if it's in the trash. (again similar to the normal rez logic)
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- if(gInventory.isObjectDescendentOf(itemp->getUUID(), trash_id))
- {
- remove_from_inventory = true;
- }
- }
-
- if(remove_from_inventory)
+ //remove local inventory copy, sim will deal with permissions and removing the item
+ //from the actual inventory if it's a no-copy etc
+ // Check if it's in the trash. (again similar to the normal rez logic)
+ if (no_copy || gInventory.isObjectDescendentOf(itemp->getUUID(), gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH)))
{
gInventory.deleteObject(itemp->getUUID());
gInventory.notifyObservers();
}
}
+void LLItemBridge::restoreToWorld()
+{
+ if (LLViewerInventoryItem* itemp = static_cast(getItem()))
+ {
+ //Similar functionality to the drag and drop rez logic
+ bool no_copy = !itemp->getPermissions().allowCopyBy(gAgentID);
+ if (no_copy && gHippoGridManager->getCurrentGrid()->isSecondLife())
+ LLNotificationsUtil::add("RestoreToWorldConfirm", LLSD(), LLSD(), boost::bind(restore_to_world, itemp, true, !boost::bind(LLNotification::getSelectedOption, _1, _2)));
+ else
+ restore_to_world(itemp, no_copy);
+ }
+}
+
void LLItemBridge::gotoItem()
{
LLInventoryObject *obj = getInventoryObject();
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index e6b2a72cb..a511c2c7c 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -193,12 +193,17 @@ void LLInventoryModelBackgroundFetch::backgroundFetchCB(void *)
LLInventoryModelBackgroundFetch::instance().backgroundFetch();
}
+bool use_http_inventory()
+{
+ return gHippoGridManager->getConnectedGrid()->isSecondLife() || gSavedSettings.getBOOL("UseHTTPInventory");
+}
+
void LLInventoryModelBackgroundFetch::backgroundFetch()
{
LLViewerRegion* region = gAgent.getRegion();
if (mBackgroundFetchActive && region && region->capabilitiesReceived())
{
- if (gSavedSettings.getBOOL("UseHTTPInventory"))
+ if (use_http_inventory())
{
// If we'll be using the capability, we'll be sending batches and the background thing isn't as important.
std::string url = region->getCapability("FetchInventory2");
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index c0f606414..d9ad92aab 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -538,8 +538,8 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
std::string val_string;
std::string fraction_string;
- F32 val_to_print = llmath::llround(value, 0.001f);
- S32 fractional_portion = llmath::llround(fmodf(llabs(val_to_print), 1.f) * 100.f);
+ F32 val_to_print = ll_round(value, 0.001f);
+ S32 fractional_portion = ll_round(fmodf(llabs(val_to_print), 1.f) * 100.f);
if (val_to_print < 0.f)
{
if (fractional_portion == 0)
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 5c160e5b6..19b95bcfe 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -373,9 +373,9 @@ void LLManipRotate::render()
LLQuaternion object_rot = first_object->getRotationEdit();
object_rot.getEulerAngles(&(euler_angles.mV[VX]), &(euler_angles.mV[VY]), &(euler_angles.mV[VZ]));
euler_angles *= RAD_TO_DEG;
- euler_angles.mV[VX] = llmath::llround(fmodf(euler_angles.mV[VX] + 360.f, 360.f), 0.05f);
- euler_angles.mV[VY] = llmath::llround(fmodf(euler_angles.mV[VY] + 360.f, 360.f), 0.05f);
- euler_angles.mV[VZ] = llmath::llround(fmodf(euler_angles.mV[VZ] + 360.f, 360.f), 0.05f);
+ euler_angles.mV[VX] = ll_round(fmodf(euler_angles.mV[VX] + 360.f, 360.f), 0.05f);
+ euler_angles.mV[VY] = ll_round(fmodf(euler_angles.mV[VY] + 360.f, 360.f), 0.05f);
+ euler_angles.mV[VZ] = ll_round(fmodf(euler_angles.mV[VZ] + 360.f, 360.f), 0.05f);
renderXYZ(euler_angles);
}
@@ -1500,7 +1500,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
- //fmodf(llmath::llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
+ //fmodf(ll_round(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
LLVector3 object_axis;
getObjectAxisClosestToMouse(object_axis);
@@ -1584,7 +1584,7 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
F32 mouse_angle = fmodf(atan2(projected_mouse * axis1, projected_mouse * axis2) * RAD_TO_DEG + 360.f, 360.f);
F32 relative_mouse_angle = fmodf(mouse_angle + (SNAP_ANGLE_DETENTE / 2), SNAP_ANGLE_INCREMENT);
- //fmodf(llmath::llround(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
+ //fmodf(ll_round(mouse_angle * RAD_TO_DEG, 7.5f) + 360.f, 360.f);
LLVector3 object_axis;
getObjectAxisClosestToMouse(object_axis);
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp
index 1a40a9e12..4b6a3d6cc 100644
--- a/indra/newview/llmanipscale.cpp
+++ b/indra/newview/llmanipscale.cpp
@@ -1559,8 +1559,8 @@ void LLManipScale::updateSnapGuides(const LLBBox& bbox)
mScaleSnapUnit1 = mScaleSnapUnit1 / (mSnapDir1 * mScaleDir);
mScaleSnapUnit2 = mScaleSnapUnit2 / (mSnapDir2 * mScaleDir);
- mTickPixelSpacing1 = llmath::llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
- mTickPixelSpacing2 = llmath::llround((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
+ mTickPixelSpacing1 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir1).length());
+ mTickPixelSpacing2 = ll_round((F32)MIN_DIVISION_PIXEL_WIDTH / (mScaleDir % mSnapGuideDir2).length());
if (uniform)
{
@@ -1632,8 +1632,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2);
// how many smallest grid units are we away from largest grid scale?
- S32 sub_div_offset_1 = llmath::llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1);
- S32 sub_div_offset_2 = llmath::llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2);
+ S32 sub_div_offset_1 = ll_round(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 / sGridMinSubdivisionLevel) / smallest_subdivision1);
+ S32 sub_div_offset_2 = ll_round(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 / sGridMinSubdivisionLevel) / smallest_subdivision2);
S32 num_ticks_per_side1 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision1));
S32 num_ticks_per_side2 = llmax(1, lltrunc(0.5f * mSnapGuideLength / smallest_subdivision2));
@@ -1687,7 +1687,7 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
LLVector2 screen_translate_axis(llabs(mScaleDir * LLViewerCamera::getInstance()->getLeftAxis()), llabs(mScaleDir * LLViewerCamera::getInstance()->getUpAxis()));
screen_translate_axis.normalize();
- S32 tick_label_spacing = llmath::llround(screen_translate_axis * sTickLabelSpacing);
+ S32 tick_label_spacing = ll_round(screen_translate_axis * sTickLabelSpacing);
for (pass = 0; pass < 3; pass++)
{
@@ -1767,8 +1767,8 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox)
stop_tick = llmin(max_ticks1, num_ticks_per_side1);
F32 grid_resolution = mObjectSelection->getSelectType() == SELECT_TYPE_HUD ? 0.25f : llmax(gSavedSettings.getF32("GridResolution"), 0.001f);
- S32 label_sub_div_offset_1 = llmath::llround(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1);
- S32 label_sub_div_offset_2 = llmath::llround(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2);
+ S32 label_sub_div_offset_1 = ll_round(fmod(dist_grid_axis - grid_offset1, mScaleSnapUnit1 * 32.f) / smallest_subdivision1);
+ S32 label_sub_div_offset_2 = ll_round(fmod(dist_grid_axis - grid_offset2, mScaleSnapUnit2 * 32.f) / smallest_subdivision2);
for (S32 i = start_tick; i <= stop_tick; i++)
{
diff --git a/indra/newview/llmaniptranslate.cpp b/indra/newview/llmaniptranslate.cpp
index 3be734b62..cb3ce30c2 100644
--- a/indra/newview/llmaniptranslate.cpp
+++ b/indra/newview/llmaniptranslate.cpp
@@ -1263,7 +1263,7 @@ void LLManipTranslate::renderSnapGuides()
// find distance to nearest smallest grid unit
F32 offset_nearest_grid_unit = fmodf(dist_grid_axis, smallest_grid_unit_scale);
// how many smallest grid units are we away from largest grid scale?
- S32 sub_div_offset = llmath::llround(fmodf(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() / sGridMinSubdivisionLevel) / smallest_grid_unit_scale);
+ S32 sub_div_offset = ll_round(fmodf(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() / sGridMinSubdivisionLevel) / smallest_grid_unit_scale);
S32 num_ticks_per_side = llmax(1, llfloor(0.5f * guide_size_meters / smallest_grid_unit_scale));
LLGLDepthTest gls_depth(GL_FALSE);
@@ -1377,12 +1377,12 @@ void LLManipTranslate::renderSnapGuides()
}
}
- sub_div_offset = llmath::llround(fmod(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() * 32.f) / smallest_grid_unit_scale);
+ sub_div_offset = ll_round(fmod(dist_grid_axis - offset_nearest_grid_unit, getMinGridScale() * 32.f) / smallest_grid_unit_scale);
LLVector2 screen_translate_axis(llabs(translate_axis * LLViewerCamera::getInstance()->getLeftAxis()), llabs(translate_axis * LLViewerCamera::getInstance()->getUpAxis()));
screen_translate_axis.normVec();
- S32 tick_label_spacing = llmath::llround(screen_translate_axis * sTickLabelSpacing);
+ S32 tick_label_spacing = ll_round(screen_translate_axis * sTickLabelSpacing);
// render tickmark values
for (S32 i = -num_ticks_per_side; i <= num_ticks_per_side; i++)
@@ -1420,7 +1420,7 @@ void LLManipTranslate::renderSnapGuides()
F32 offset_val = 0.5f * tick_offset.mV[ARROW_TO_AXIS[mManipPart]] / getMinGridScale();
EGridMode grid_mode = LLSelectMgr::getInstance()->getGridMode();
F32 text_highlight = 0.8f;
- if(i - llmath::llround(offset_nearest_grid_unit / smallest_grid_unit_scale) == 0 && mInSnapRegime)
+ if(i - ll_round(offset_nearest_grid_unit / smallest_grid_unit_scale) == 0 && mInSnapRegime)
{
text_highlight = 1.f;
}
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index b4239080a..aec5eda8f 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -120,8 +120,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
if(!getDecoupleTextureSize())
{
- S32 screen_width = llmath::llround((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
- S32 screen_height = llmath::llround((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
+ S32 screen_width = ll_round((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
+ S32 screen_height = ll_round((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
setTextureSize(screen_width, screen_height);
}
@@ -464,8 +464,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
{
if(!getDecoupleTextureSize())
{
- S32 screen_width = llmath::llround((F32)width * LLUI::getScaleFactor().mV[VX]);
- S32 screen_height = llmath::llround((F32)height * LLUI::getScaleFactor().mV[VY]);
+ S32 screen_width = ll_round((F32)width * LLUI::getScaleFactor().mV[VX]);
+ S32 screen_height = ll_round((F32)height * LLUI::getScaleFactor().mV[VY]);
// when floater is minimized, these sizes are negative
if ( screen_height > 0 && screen_width > 0 )
@@ -797,13 +797,13 @@ void LLMediaCtrl::draw()
{
// max width, adjusted height
width = r.getWidth();
- height = llmin(llmax(llmath::llround(width / media_aspect), 0), r.getHeight());
+ height = llmin(llmax(ll_round(width / media_aspect), 0), r.getHeight());
}
else
{
// max height, adjusted width
height = r.getHeight();
- width = llmin(llmax(llmath::llround(height * media_aspect), 0), r.getWidth());
+ width = llmin(llmax(ll_round(height * media_aspect), 0), r.getWidth());
}
}
else
@@ -823,10 +823,10 @@ void LLMediaCtrl::draw()
/*if (mIgnoreUIScale)
{
- x_offset = llmath::llround((F32)x_offset * LLUI::getScaleFactor().mV[VX]);
- y_offset = llmath::llround((F32)y_offset * LLUI::getScaleFactor().mV[VY]);
- width = llmath::llround((F32)width * LLUI::getScaleFactor().mV[VX]);
- height = llmath::llround((F32)height * LLUI::getScaleFactor().mV[VY]);
+ x_offset = ll_round((F32)x_offset * LLUI::getScaleFactor().mV[VX]);
+ y_offset = ll_round((F32)y_offset * LLUI::getScaleFactor().mV[VY]);
+ width = ll_round((F32)width * LLUI::getScaleFactor().mV[VX]);
+ height = ll_round((F32)height * LLUI::getScaleFactor().mV[VY]);
}*/
// draw the browser
@@ -897,14 +897,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
}
- x = llmath::llround((F32)x * LLUI::getScaleFactor().mV[VX]);
+ x = ll_round((F32)x * LLUI::getScaleFactor().mV[VX]);
if ( ! coords_opengl )
{
- y = llmath::llround((F32)(y) * LLUI::getScaleFactor().mV[VY]);
+ y = ll_round((F32)(y) * LLUI::getScaleFactor().mV[VY]);
}
else
{
- y = llmath::llround((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
+ y = ll_round((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
};
}
diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp
index fdd533257..e7684b034 100644
--- a/indra/newview/llmenucommands.cpp
+++ b/indra/newview/llmenucommands.cpp
@@ -35,6 +35,7 @@
#include "llmenucommands.h"
#include "aihttpview.h"
+#include "alfloaterregiontracker.h"
#include "floaterao.h"
#include "floaterlocalassetbrowse.h"
#include "hbfloatergrouptitles.h"
@@ -239,6 +240,7 @@ struct MenuFloaterDict : public LLSingleton
registerFloater ("pathfinding_linksets");
registerFloater ("perm prefs");
registerFloater ("radar");
+ registerFloater ("region_tracker");
registerFloater ("script info");
registerFloater ("stat bar");
registerFloater ("teleport history");
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index de26a1ba0..71442b009 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -32,7 +32,6 @@
#include "lluuid.h"
#include "llviewertexture.h"
#include "llvolume.h"
-#include "sguuidhash.h"
#define LLCONVEXDECOMPINTER_STATIC 1
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 4fb306317..2551b3216 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -500,7 +500,7 @@ BOOL LLMuteList::autoRemove(const LLUUID& agent_id, const EAutoReason reason)
{
BOOL removed = FALSE;
- if (isMuted(agent_id) && !(reason == AR_INVENTORY && gSavedSettings.getBOOL("AutoresponseMutedItem")))
+ if (isMuted(agent_id) && !(reason == AR_INVENTORY && gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem")))
{
LLMute automute(agent_id, LLStringUtil::null, LLMute::AGENT);
removed = TRUE;
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index adacb2a79..cff819560 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -76,7 +76,6 @@
//
#include "lfsimfeaturehandler.h"
#include "llfloateravatarlist.h"
-#include "llmutelist.h"
#include "llvoavatar.h"
//
@@ -314,7 +313,7 @@ void LLNetMap::draw()
static const LLCachedControl live_region_color(gColors, "NetMapLiveRegion");
static const LLCachedControl dead_region_color(gColors, "NetMapDeadRegion");
// Aurora Sim
- //S32 region_width = llmath::llround(LLWorld::getInstance()->getRegionWidthInMeters());
+ //S32 region_width = ll_round(LLWorld::getInstance()->getRegionWidthInMeters());
S32 region_width = REGION_WIDTH_UNITS;
// Aurora Sim
@@ -558,10 +557,9 @@ void LLNetMap::draw()
// [RLVa:KB] - Version: 1.23.4 | Alternate: Snowglobe-1.2.4 | Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.0b
bool show_friends = !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
// [/RLVa:KB]
- uuid_vec_t avatar_ids;
- std::vector positions;
+ LLWorld::pos_map_t positions;
- LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal());
+ LLWorld::getInstance()->getAvatars(&positions, gAgentCamera.getCameraPositionGlobal());
// Get the selected ids from radar now, as they are loop invariant
uuid_vec_t gmSelected;
@@ -570,57 +568,30 @@ void LLNetMap::draw()
gmSelected = LLFloaterAvatarList::instance().getSelectedIDs();
// Draw avatars
- for(U32 i=0; ifirst;
static const LLCachedControl standard_color("MapAvatar",LLColor4(0.f,1.f,0.f,1.f));
LLColor4 color = standard_color;
// TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
// just be careful to sort the avatar IDs along with the positions. -MG
- pos_map = globalPosToView(positions[i]);
- if (positions[i].mdV[VZ] == 0.f || positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z)
+ const LLVector3d& position = iter->second;
+ pos_map = globalPosToView(position);
+ if (position.mdV[VZ] == 0.f || position.mdV[VZ] == COARSEUPDATE_MAX_Z)
{
pos_map.mV[VZ] = 16000.f;
}
if (dist_vec(LLVector2(pos_map.mV[VX], pos_map.mV[VY]), LLVector2(local_mouse_x, local_mouse_y)) < min_pick_dist)
{
- mClosestAgentsToCursor[uuid] = positions[i];
+ mClosestAgentsToCursor[uuid] = position;
static const LLCachedControl map_avatar_rollover_color(gSavedSettings, "ExodusMapRolloverColor", LLColor4::cyan);
color = map_avatar_rollover_color;
}
else
{
-
- if(LLMuteList::getInstance()->isMuted(uuid))
- {
- static const LLCachedControl muted_color("AscentMutedColor",LLColor4(0.7f,0.7f,0.7f,1.f));
- color = muted_color;
- }
-
- LLViewerRegion* avatar_region = LLWorld::getInstance()->getRegionFromPosGlobal(positions[i]);
- const LLUUID estate_owner = avatar_region ? avatar_region->getOwner() : LLUUID::null;
-
- // MOYMOD Minimap custom av colors.
- if (mm_getMarkerColor(uuid, color)) {}
- //Lindens are always more Linden than your friend, make that take precedence
- else if (LLMuteList::getInstance()->isLinden(uuid))
- {
- static const LLCachedControl linden_color("AscentLindenColor",LLColor4(0.f,0.f,1.f,1.f));
- color = linden_color;
- }
- //check if they are an estate owner at their current position
- else if (estate_owner.notNull() && uuid == estate_owner)
- {
- static const LLCachedControl em_color("AscentEstateOwnerColor",LLColor4(1.f,0.6f,1.f,1.f));
- color = em_color;
- }
- //without these dots, SL would suck.
- else if (show_friends && LLAvatarActions::isFriend(uuid))
- {
- static const LLCachedControl friend_color("AscentFriendColor",LLColor4(1.f,1.f,0.f,1.f));
- color = friend_color;
- }
+ bool getCustomColorRLV(const LLUUID&, LLColor4&, LLViewerRegion*, bool name_restricted);
+ getCustomColorRLV(uuid, color, LLWorld::getInstance()->getRegionFromPosGlobal(position), !show_friends);
}
LLWorldMapView::drawAvatar(
@@ -650,8 +621,8 @@ void LLNetMap::draw()
(pos_map.mV[VX] >= getRect().getWidth()) ||
(pos_map.mV[VY] >= getRect().getHeight()) )
{
- S32 x = llmath::llround( pos_map.mV[VX] );
- S32 y = llmath::llround( pos_map.mV[VY] );
+ S32 x = ll_round( pos_map.mV[VX] );
+ S32 y = ll_round( pos_map.mV[VY] );
LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
}
@@ -687,13 +658,13 @@ void LLNetMap::draw()
}
pos_map = globalPosToView(gAgent.getPositionGlobal());
- S32 dot_width = llmath::llround(mDotRadius * 2.f);
+ S32 dot_width = ll_round(mDotRadius * 2.f);
LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
if (you)
{
- you->draw(llmath::llround(pos_map.mV[VX] - mDotRadius),
- llmath::llround(pos_map.mV[VY] - mDotRadius),
+ you->draw(ll_round(pos_map.mV[VX] - mDotRadius),
+ ll_round(pos_map.mV[VY] - mDotRadius),
dot_width,
dot_width);
@@ -856,8 +827,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
{
if (draw_arrow)
{
- S32 x = llmath::llround( pos_local.mV[VX] );
- S32 y = llmath::llround( pos_local.mV[VY] );
+ S32 x = ll_round( pos_local.mV[VX] );
+ S32 y = ll_round( pos_local.mV[VY] );
LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10 );
LLWorldMapView::drawTrackingArrow( getRect(), x, y, color );
}
@@ -873,8 +844,8 @@ void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color,
LLVector3d LLNetMap::viewPosToGlobal( S32 x, S32 y )
{
- x -= llmath::llround(getRect().getWidth() / 2 + mCurPan.mV[VX]);
- y -= llmath::llround(getRect().getHeight() / 2 + mCurPan.mV[VY]);
+ x -= ll_round(getRect().getWidth() / 2 + mCurPan.mV[VX]);
+ y -= ll_round(getRect().getHeight() / 2 + mCurPan.mV[VY]);
LLVector3 pos_local( (F32)x, (F32)y, 0 );
@@ -1020,8 +991,8 @@ void LLNetMap::setDirectionPos( LLTextBox* text_box, F32 rotation )
// Inset by a little to account for position display.
radius -= 8.f;
- text_box->setOrigin(llmath::llround(half_width + radius * cos( rotation )),
- llmath::llround(half_height + radius * sin( rotation )));
+ text_box->setOrigin(ll_round(half_width + radius * cos( rotation )),
+ ll_round(half_height + radius * sin( rotation )));
}
void LLNetMap::updateMinorDirections()
@@ -1050,7 +1021,7 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U &
const F32 MAX_RADIUS = 256.0f;
F32 radius_clamped = llmin(radius_meters, MAX_RADIUS);
- S32 diameter_pixels = llmath::llround(2 * radius_clamped * mObjectMapTPM);
+ S32 diameter_pixels = ll_round(2 * radius_clamped * mObjectMapTPM);
renderPoint( local_pos, color, diameter_pixels );
}
@@ -1066,8 +1037,8 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color,
const S32 image_width = (S32)mObjectImagep->getWidth();
const S32 image_height = (S32)mObjectImagep->getHeight();
- S32 x_offset = llmath::llround(pos_local.mV[VX] * mObjectMapTPM + image_width / 2);
- S32 y_offset = llmath::llround(pos_local.mV[VY] * mObjectMapTPM + image_height / 2);
+ S32 x_offset = ll_round(pos_local.mV[VX] * mObjectMapTPM + image_width / 2);
+ S32 y_offset = ll_round(pos_local.mV[VY] * mObjectMapTPM + image_height / 2);
if ((x_offset < 0) || (x_offset >= image_width))
{
@@ -1147,8 +1118,8 @@ void LLNetMap::renderPropertyLinesForRegion(const LLViewerRegion* pRegion, const
const S32 imgHeight = (S32)mParcelImagep->getHeight();
const LLVector3 originLocal(pRegion->getOriginGlobal() - mParcelImageCenterGlobal);
- const S32 originX = llmath::llround(originLocal.mV[VX] * mObjectMapTPM + imgWidth / 2);
- const S32 originY = llmath::llround(originLocal.mV[VY] * mObjectMapTPM + imgHeight / 2);
+ const S32 originX = ll_round(originLocal.mV[VX] * mObjectMapTPM + imgWidth / 2);
+ const S32 originY = ll_round(originLocal.mV[VY] * mObjectMapTPM + imgHeight / 2);
U32* pTextureData = (U32*)mParcelRawImagep->getData();
@@ -1156,17 +1127,17 @@ void LLNetMap::renderPropertyLinesForRegion(const LLViewerRegion* pRegion, const
// Draw the north and east region borders
//
const F32 real_width(pRegion->getWidth());
-const S32 borderY = originY + llmath::llround(real_width * mObjectMapTPM);
+const S32 borderY = originY + ll_round(real_width * mObjectMapTPM);
if ( (borderY >= 0) && (borderY < imgHeight) )
{
- S32 curX = llclamp(originX, 0, imgWidth), endX = llclamp(originX + llmath::llround(real_width * mObjectMapTPM), 0, imgWidth - 1);
+ S32 curX = llclamp(originX, 0, imgWidth), endX = llclamp(originX + ll_round(real_width * mObjectMapTPM), 0, imgWidth - 1);
for (; curX <= endX; curX++)
pTextureData[borderY * imgWidth + curX] = clrOverlay.mAll;
}
- const S32 borderX = originX + llmath::llround(real_width * mObjectMapTPM);
+ const S32 borderX = originX + ll_round(real_width * mObjectMapTPM);
if ( (borderX >= 0) && (borderX < imgWidth) )
{
- S32 curY = llclamp(originY, 0, imgHeight), endY = llclamp(originY + llmath::llround(real_width * mObjectMapTPM), 0, imgHeight - 1);
+ S32 curY = llclamp(originY, 0, imgHeight), endY = llclamp(originY + ll_round(real_width * mObjectMapTPM), 0, imgHeight - 1);
for (; curY <= endY; curY++)
pTextureData[curY * imgWidth + borderX] = clrOverlay.mAll;
}
@@ -1190,17 +1161,17 @@ const S32 borderY = originY + llmath::llround(real_width * mObjectMapTPM);
if ( (!fForSale) && (!fCollision) && (0 == (overlay & (PARCEL_SOUTH_LINE | PARCEL_WEST_LINE))) )
continue;
- const S32 posX = originX + llmath::llround(idxCol * GRID_STEP * mObjectMapTPM);
- const S32 posY = originY + llmath::llround(idxRow * GRID_STEP * mObjectMapTPM);
+ const S32 posX = originX + ll_round(idxCol * GRID_STEP * mObjectMapTPM);
+ const S32 posY = originY + ll_round(idxRow * GRID_STEP * mObjectMapTPM);
static LLCachedControl s_fForSaleParcels(gSavedSettings, "MiniMapForSaleParcels");
static LLCachedControl s_fShowCollisionParcels(gSavedSettings, "MiniMapCollisionParcels");
if ( ((s_fForSaleParcels) && (fForSale)) || ((s_fShowCollisionParcels) && (fCollision)) )
{
- S32 curY = llclamp(posY, 0, imgHeight), endY = llclamp(posY + llmath::llround(GRID_STEP * mObjectMapTPM), 0, imgHeight - 1);
+ S32 curY = llclamp(posY, 0, imgHeight), endY = llclamp(posY + ll_round(GRID_STEP * mObjectMapTPM), 0, imgHeight - 1);
for (; curY <= endY; curY++)
{
- S32 curX = llclamp(posX, 0, imgWidth) , endX = llclamp(posX + llmath::llround(GRID_STEP * mObjectMapTPM), 0, imgWidth - 1);
+ S32 curX = llclamp(posX, 0, imgWidth) , endX = llclamp(posX + ll_round(GRID_STEP * mObjectMapTPM), 0, imgWidth - 1);
for (; curX <= endX; curX++)
{
pTextureData[curY * imgWidth + curX] = (fForSale) ? LLColor4U(255, 255, 128, 192).mAll
@@ -1212,7 +1183,7 @@ const S32 borderY = originY + llmath::llround(real_width * mObjectMapTPM);
{
if ( (posY >= 0) && (posY < imgHeight) )
{
- S32 curX = llclamp(posX, 0, imgWidth), endX = llclamp(posX + llmath::llround(GRID_STEP * mObjectMapTPM), 0, imgWidth - 1);
+ S32 curX = llclamp(posX, 0, imgWidth), endX = llclamp(posX + ll_round(GRID_STEP * mObjectMapTPM), 0, imgWidth - 1);
for (; curX <= endX; curX++)
pTextureData[posY * imgWidth + curX] = clrOverlay.mAll;
}
@@ -1221,7 +1192,7 @@ const S32 borderY = originY + llmath::llround(real_width * mObjectMapTPM);
{
if ( (posX >= 0) && (posX < imgWidth) )
{
- S32 curY = llclamp(posY, 0, imgHeight), endY = llclamp(posY + llmath::llround(GRID_STEP * mObjectMapTPM), 0, imgHeight - 1);
+ S32 curY = llclamp(posY, 0, imgHeight), endY = llclamp(posY + ll_round(GRID_STEP * mObjectMapTPM), 0, imgHeight - 1);
for (; curY <= endY; curY++)
pTextureData[curY * imgWidth + posX] = clrOverlay.mAll;
}
@@ -1240,7 +1211,7 @@ bool LLNetMap::createImage(LLPointer& rawimagep) const
// ... which is, the diagonal of the rect.
F32 width = (F32)getRect().getWidth();
F32 height = (F32)getRect().getHeight();
- S32 square_size = llmath::llround( sqrt(width*width + height*height) );
+ S32 square_size = ll_round( sqrt(width*width + height*height) );
// Find the least power of two >= the minimum size.
const S32 MIN_SIZE = 64;
diff --git a/indra/newview/llnotify.cpp b/indra/newview/llnotify.cpp
index 9cbafafd2..81ac127cf 100644
--- a/indra/newview/llnotify.cpp
+++ b/indra/newview/llnotify.cpp
@@ -533,6 +533,7 @@ void LLNotifyBox::close()
die();
if (not_tip)
{
+ --sNotifyBoxCount;
if (LLNotifyBox* front = gNotifyBoxView->getFirstNontipBox())
{
gNotifyBoxView->showOnly(front);
@@ -541,7 +542,6 @@ void LLNotifyBox::close()
view->setFocus(true);
gFocusMgr.triggerFocusFlash(); // TODO it's ugly to call this here
}
- --sNotifyBoxCount;
}
}
diff --git a/indra/newview/lloverlaybar.cpp b/indra/newview/lloverlaybar.cpp
index e20ead18d..fac6a04d6 100644
--- a/indra/newview/lloverlaybar.cpp
+++ b/indra/newview/lloverlaybar.cpp
@@ -322,7 +322,7 @@ void LLOverlayBar::refresh()
}
buttons_changed = true;
}
- buttons_changed |= updateButtonVisiblity(mNotBusy,gAgent.getBusy()) != NULL;
+ buttons_changed |= updateButtonVisiblity(mNotBusy, gAgent.isDoNotDisturb()) != NULL;
buttons_changed |= updateButtonVisiblity(mFlyCam,LLViewerJoystick::getInstance()->getOverrideCamera()) != NULL;
buttons_changed |= updateButtonVisiblity(mMouseLook,gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_DOWN_INDEX)||gAgent.isControlGrabbed(CONTROL_ML_LBUTTON_UP_INDEX)) != NULL;
// [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g)
@@ -374,7 +374,7 @@ void LLOverlayBar::onClickIMReceived(void*)
// static
void LLOverlayBar::onClickSetNotBusy(void*)
{
- gAgent.clearBusy();
+ gAgent.setDoNotDisturb(false);
}
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index b08150b57..de3223942 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -332,9 +332,9 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t
if (!location_text.empty())
location_text.append(", ");
- S32 region_x = llmath::llround((F32)c_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround((F32)c_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llmath::llround((F32)c_info->pos_global.mdV[VZ]);
+ S32 region_x = ll_round((F32)c_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)c_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)c_info->pos_global.mdV[VZ]);
std::string buffer = llformat("%s (%d, %d, %d)", c_info->sim_name.c_str(), region_x, region_y, region_z);
location_text.append(buffer);
@@ -893,9 +893,9 @@ void LLPanelClassifiedInfo::onClickSet()
location_text.assign(regionName);
location_text.append(", ");
- S32 region_x = llmath::llround((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llmath::llround((F32)mPosGlobal.mdV[VZ]);
+ S32 region_x = ll_round((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)mPosGlobal.mdV[VZ]);
location_text.append(mSimName);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
diff --git a/indra/newview/llpaneldisplay.cpp b/indra/newview/llpaneldisplay.cpp
index 9ba12e570..688c03f6c 100644
--- a/indra/newview/llpaneldisplay.cpp
+++ b/indra/newview/llpaneldisplay.cpp
@@ -904,8 +904,8 @@ void LLPanelDisplay::fractionFromDecimal(F32 decimal_val, S32& numerator, S32& d
{
if (fmodf((decimal_val * test_denominator) + 0.01f, 1.f) < 0.02f)
{
- numerator = llmath::llround(decimal_val * test_denominator);
- denominator = llmath::llround(test_denominator);
+ numerator = ll_round(decimal_val * test_denominator);
+ denominator = ll_round(test_denominator);
break;
}
}
diff --git a/indra/newview/llpanelevent.cpp b/indra/newview/llpanelevent.cpp
index 6b57f1cf9..96ab2d426 100644
--- a/indra/newview/llpanelevent.cpp
+++ b/indra/newview/llpanelevent.cpp
@@ -154,9 +154,9 @@ void LLPanelEvent::processEventInfoReply(LLMessageSystem *msg, void **)
F32 global_x = (F32)self->mEventInfo.mPosGlobal.mdV[VX];
F32 global_y = (F32)self->mEventInfo.mPosGlobal.mdV[VY];
- S32 region_x = llmath::llround(global_x) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround(global_y) % REGION_WIDTH_UNITS;
- S32 region_z = llmath::llround((F32)self->mEventInfo.mPosGlobal.mdV[VZ]);
+ S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)self->mEventInfo.mPosGlobal.mdV[VZ]);
std::string desc = self->mEventInfo.mSimName + llformat(" (%d, %d, %d)", region_x, region_y, region_z);
self->mTBLocation->setText(desc);
diff --git a/indra/newview/llpanelgrouplandmoney.cpp b/indra/newview/llpanelgrouplandmoney.cpp
index 18000914c..bae454434 100644
--- a/indra/newview/llpanelgrouplandmoney.cpp
+++ b/indra/newview/llpanelgrouplandmoney.cpp
@@ -462,8 +462,8 @@ void LLPanelGroupLandMoney::impl::processGroupLand(LLMessageSystem* msg)
land_type = LLTrans::getString("land_type_unknown");
}
- S32 region_x = llmath::llround(global_x) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround(global_y) % REGION_WIDTH_UNITS;
+ S32 region_x = ll_round(global_x) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round(global_y) % REGION_WIDTH_UNITS;
std::string location = sim_name + llformat(" (%d, %d)", region_x, region_y);
std::string area;
committed+=billable_area;
diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp
index e6bfd0251..31d9ea516 100644
--- a/indra/newview/llpanelgroupnotices.cpp
+++ b/indra/newview/llpanelgroupnotices.cpp
@@ -124,7 +124,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
{
BOOL handled = FALSE;
- if (!gAgent.hasPowerInGroup(mEntityID,GP_NOTICES_SEND))
+ if (!gAgent.hasPowerInGroup(mID,GP_NOTICES_SEND))
{
*accept = ACCEPT_NO;
return TRUE;
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 2575b53d2..b180c7b70 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -51,7 +51,6 @@
#include "lltabcontainer.h"
#include "lltextbox.h"
#include "lltexteditor.h"
-#include "lltrans.h"
#include "llviewertexturelist.h"
#include "llviewerwindow.h"
#include "llfocusmgr.h"
@@ -1670,10 +1669,9 @@ void LLPanelGroupMembersSubTab::update(LLGroupChange gc)
bool is_online_status_string(const std::string& status)
{
- static const std::string online(LLTrans::getString("group_member_status_online"));
- if (status == online) return true;
- static const std::string unknown(LLTrans::getString("group_member_status_unknown"));
- return status == unknown;
+ const std::string& localized_online();
+ const std::string& localized_unknown();
+ return status == localized_online() || status == localized_unknown();
}
void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 572a35145..614fa7392 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -381,12 +381,6 @@ void LLPanelLogin::draw()
// virtual
BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask)
{
- if (( KEY_RETURN == key ) && (MASK_ALT == mask))
- {
- gViewerWindow->toggleFullscreen(FALSE);
- return TRUE;
- }
-
if (('T' == key) && (MASK_CONTROL == mask))
{
new LLFloaterSimple("floater_test.xml");
@@ -503,14 +497,14 @@ void LLPanelLogin::setFields(const std::string& firstname,
// fill it with MAX_PASSWORD characters so we get a
// nice row of asterixes.
const std::string filler("123456789!123456");
- sInstance->childSetText("password_edit", filler);
+ sInstance->getChild("password_edit")->setValue(filler);
sInstance->mIncomingPassword = filler;
sInstance->mMungedPassword = password;
}
else
{
// this is a normal text password
- sInstance->childSetText("password_edit", password);
+ sInstance->getChild("password_edit")->setValue(password);
sInstance->mIncomingPassword = password;
LLMD5 pass((unsigned char *)password.c_str());
char munged_password[MD5HEX_STR_SIZE];
@@ -533,7 +527,7 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus)
LLComboBox* login_combo = sInstance->getChild("username_combo");
login_combo->setTextEntry(fullname);
login_combo->resetTextDirty();
- //sInstance->childSetText("username_combo", fullname);
+ //sInstance->getChild("username_combo")->setValue(fullname);
std::string grid = entry.getGrid();
//grid comes via LLSavedLoginEntry, which uses full grid names, not nicks
@@ -544,13 +538,13 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus)
if (entry.getPassword().empty())
{
- sInstance->childSetText("password_edit", std::string(""));
+ sInstance->getChild("password_edit")->setValue(LLStringUtil::null);
remember_pass_check->setValue(LLSD(false));
}
else
{
const std::string filler("123456789!123456");
- sInstance->childSetText("password_edit", filler);
+ sInstance->getChild("password_edit")->setValue(filler);
sInstance->mIncomingPassword = filler;
sInstance->mMungedPassword = entry.getPassword();
remember_pass_check->setValue(LLSD(true));
@@ -902,10 +896,8 @@ void LLPanelLogin::refreshLoginPage()
sInstance->updateGridCombo();
- sInstance->childSetVisible("create_new_account_text",
- !gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty());
- sInstance->childSetVisible("forgot_password_text",
- !gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty());
+ sInstance->getChildView("create_new_account_text")->setVisible(!gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty());
+ sInstance->getChildView("forgot_password_text")->setVisible(!gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty());
std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage();
if (!login_page.empty())
@@ -996,7 +988,7 @@ void LLPanelLogin::onLoginComboLostFocus(LLComboBox* combo_box)
{
if (combo_box->isTextDirty())
{
- childSetText("password_edit", mIncomingPassword = mMungedPassword = LLStringUtil::null);
+ getChild("password_edit")->setValue(mIncomingPassword = mMungedPassword = LLStringUtil::null);
combo_box->resetTextDirty();
}
}
diff --git a/indra/newview/llpanelnetwork.cpp b/indra/newview/llpanelnetwork.cpp
index 05821a8a8..414c9275f 100644
--- a/indra/newview/llpanelnetwork.cpp
+++ b/indra/newview/llpanelnetwork.cpp
@@ -67,7 +67,11 @@ BOOL LLPanelNetwork::postBuild()
childSetEnabled("connection_port", gSavedSettings.getBOOL("ConnectionPortEnabled"));
childSetCommitCallback("connection_port_enabled", onCommitPort, this);
- childSetValue("cache_size", (F32)gSavedSettings.getU32("CacheSize"));
+ if (LLUICtrl* ctrl = getChild("cache_size"))
+ {
+ ctrl->setValue((F32)gSavedSettings.getU32("CacheSize"));
+ ctrl->setCommitCallback(boost::bind(LLPanelNetwork::onClickClearCache, (void*)NULL));
+ }
childSetValue("max_bandwidth", gSavedSettings.getF32("ThrottleBandwidthKBPS"));
childSetValue("tex_bandwidth", gSavedSettings.getF32("HTTPThrottleBandwidth"));
childSetValue("http_textures", gSavedSettings.getBOOL("ImagePipelineUseHTTP"));
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index c93f41aa6..e7123d523 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -465,10 +465,10 @@ void LLPanelObject::getState( )
return;
}
- // can move or rotate only linked group with move permissions, or sub-object with move and modify perms
- BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
- BOOL enable_scale = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && objectp->permModify();
- BOOL enable_rotate = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced()) && ( (objectp->permModify() && !objectp->isAttachment()) || !gSavedSettings.getBOOL("EditLinkedParts"));
+ // can move or rotate only linked group with move permissions
+ BOOL enable_move = objectp->permMove() && !objectp->isPermanentEnforced() && ((root_objectp == NULL) || !root_objectp->isPermanentEnforced());
+ BOOL enable_scale = enable_move && objectp->permModify();
+ BOOL enable_rotate = enable_move;
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
BOOL single_volume = (LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ))
@@ -565,9 +565,9 @@ void LLPanelObject::getState( )
LLQuaternion object_rot = objectp->getRotationEdit();
object_rot.getEulerAngles(&(mCurEulerDegrees.mV[VX]), &(mCurEulerDegrees.mV[VY]), &(mCurEulerDegrees.mV[VZ]));
mCurEulerDegrees *= RAD_TO_DEG;
- mCurEulerDegrees.mV[VX] = fmod(llmath::llround(mCurEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
- mCurEulerDegrees.mV[VY] = fmod(llmath::llround(mCurEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
- mCurEulerDegrees.mV[VZ] = fmod(llmath::llround(mCurEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+ mCurEulerDegrees.mV[VX] = fmod(ll_round(mCurEulerDegrees.mV[VX], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+ mCurEulerDegrees.mV[VY] = fmod(ll_round(mCurEulerDegrees.mV[VY], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
+ mCurEulerDegrees.mV[VZ] = fmod(ll_round(mCurEulerDegrees.mV[VZ], OBJECT_ROTATION_PRECISION) + 360.f, 360.f);
if (enable_rotate)
{
@@ -1965,9 +1965,9 @@ void LLPanelObject::sendRotation(BOOL btn_down)
if (mObject.isNull()) return;
LLVector3 new_rot(mCtrlRotX->get(), mCtrlRotY->get(), mCtrlRotZ->get());
- new_rot.mV[VX] = llmath::llround(new_rot.mV[VX], OBJECT_ROTATION_PRECISION);
- new_rot.mV[VY] = llmath::llround(new_rot.mV[VY], OBJECT_ROTATION_PRECISION);
- new_rot.mV[VZ] = llmath::llround(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION);
+ new_rot.mV[VX] = ll_round(new_rot.mV[VX], OBJECT_ROTATION_PRECISION);
+ new_rot.mV[VY] = ll_round(new_rot.mV[VY], OBJECT_ROTATION_PRECISION);
+ new_rot.mV[VZ] = ll_round(new_rot.mV[VZ], OBJECT_ROTATION_PRECISION);
// Note: must compare before conversion to radians
LLVector3 delta = new_rot - mCurEulerDegrees;
diff --git a/indra/newview/llpanelpick.cpp b/indra/newview/llpanelpick.cpp
index f949d482d..55e58a4c9 100644
--- a/indra/newview/llpanelpick.cpp
+++ b/indra/newview/llpanelpick.cpp
@@ -180,9 +180,9 @@ void LLPanelPick::processProperties(void* data, EAvatarProcessorType type)
self->mImporting = false;
}
- S32 region_x = llmath::llround((F32)pick_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround((F32)pick_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llmath::llround((F32)pick_info->pos_global.mdV[VZ]);
+ S32 region_x = ll_round((F32)pick_info->pos_global.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)pick_info->pos_global.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)pick_info->pos_global.mdV[VZ]);
location_text.append(llformat("(%d, %d, %d)", region_x, region_y, region_z));
mDataReceived = true;
@@ -403,9 +403,9 @@ void LLPanelPick::onClickSet()
std::string location_text("(will update after save), " + mSimName);
- S32 region_x = llmath::llround((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
- S32 region_y = llmath::llround((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS;
- S32 region_z = llmath::llround((F32)mPosGlobal.mdV[VZ]);
+ S32 region_x = ll_round((F32)mPosGlobal.mdV[VX]) % REGION_WIDTH_UNITS;
+ S32 region_y = ll_round((F32)mPosGlobal.mdV[VY]) % REGION_WIDTH_UNITS;
+ S32 region_z = ll_round((F32)mPosGlobal.mdV[VZ]);
location_text.append(llformat(" (%d, %d, %d)", region_x, region_y, region_z));
// if sim name in pick is different from current sim name
diff --git a/indra/newview/llpanelplace.cpp b/indra/newview/llpanelplace.cpp
index dfa5d88ef..50901bb58 100644
--- a/indra/newview/llpanelplace.cpp
+++ b/indra/newview/llpanelplace.cpp
@@ -289,16 +289,16 @@ void LLPanelPlace::processParcelInfo(const LLParcelData& parcel_data)
}
// Just use given region position for display
- S32 region_x = llmath::llround(mPosRegion.mV[0]);
- S32 region_y = llmath::llround(mPosRegion.mV[1]);
- S32 region_z = llmath::llround(mPosRegion.mV[2]);
+ S32 region_x = ll_round(mPosRegion.mV[0]);
+ S32 region_y = ll_round(mPosRegion.mV[1]);
+ S32 region_z = ll_round(mPosRegion.mV[2]);
// If the region position is zero, grab position from the global
if(mPosRegion.isExactlyZero())
{
- region_x = llmath::llround(parcel_data.global_x) % REGION_WIDTH_UNITS;
- region_y = llmath::llround(parcel_data.global_y) % REGION_WIDTH_UNITS;
- region_z = llmath::llround(parcel_data.global_z);
+ region_x = ll_round(parcel_data.global_x) % REGION_WIDTH_UNITS;
+ region_y = ll_round(parcel_data.global_y) % REGION_WIDTH_UNITS;
+ region_z = ll_round(parcel_data.global_z);
}
if(mPosGlobal.isExactlyZero())
diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp
index 91372b23c..3a05ba1ef 100644
--- a/indra/newview/llpanelprimmediacontrols.cpp
+++ b/indra/newview/llpanelprimmediacontrols.cpp
@@ -642,12 +642,12 @@ void LLPanelPrimMediaControls::updateShape()
// convert screenspace bbox to pixels (in screen coords)
LLRect window_rect = gViewerWindow->getWorldViewRectScaled();
LLCoordGL screen_min;
- screen_min.mX = llmath::llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.getF32ptr()[VX] + 1.f) * 0.5f);
- screen_min.mY = llmath::llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.getF32ptr()[VY] + 1.f) * 0.5f);
+ screen_min.mX = ll_round((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (min.getF32ptr()[VX] + 1.f) * 0.5f);
+ screen_min.mY = ll_round((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (min.getF32ptr()[VY] + 1.f) * 0.5f);
LLCoordGL screen_max;
- screen_max.mX = llmath::llround((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.getF32ptr()[VX] + 1.f) * 0.5f);
- screen_max.mY = llmath::llround((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.getF32ptr()[VY] + 1.f) * 0.5f);
+ screen_max.mX = ll_round((F32)window_rect.mLeft + (F32)window_rect.getWidth() * (max.getF32ptr()[VX] + 1.f) * 0.5f);
+ screen_max.mY = ll_round((F32)window_rect.mBottom + (F32)window_rect.getHeight() * (max.getF32ptr()[VY] + 1.f) * 0.5f);
// grow panel so that screenspace bounding box fits inside "media_region" element of panel
LLRect media_panel_rect;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index eb5a75972..b6e31b52e 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -44,6 +44,7 @@
#include "lldatapacker.h"
#include "lldelayedgestureerror.h"
#include "llfloatergesture.h" // for some label constants
+#include "llflyoutbutton.h"
#include "llgesturemgr.h"
#include "llinventorydefines.h"
#include "llinventoryfunctions.h"
@@ -493,17 +494,17 @@ BOOL LLPreviewGesture::postBuild()
mWaitTimeEditor = edit;
// Buttons at the bottom
- check = getChild( "active_check");
+ check = getChild("active_check");
check->setCommitCallback(boost::bind(&LLPreviewGesture::onCommitActive,this));
mActiveCheck = check;
- btn = getChild( "save_btn");
+ btn = getChild("save_btn");
btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickSave,this));
mSaveBtn = btn;
- btn = getChild( "preview_btn");
- btn->setClickedCallback(boost::bind(&LLPreviewGesture::onClickPreview,this));
- mPreviewBtn = btn;
+ LLFlyoutButton* flyout = getChild("preview_btn");
+ flyout->setCommitCallback(boost::bind(&LLPreviewGesture::onClickPreview, this, _2));
+ mPreviewBtn = flyout;
// Populate the comboboxes
@@ -1740,7 +1741,7 @@ void LLPreviewGesture::onClickSave()
saveIfNeeded();
}
-void LLPreviewGesture::onClickPreview()
+void LLPreviewGesture::onClickPreview(bool local)
{
if (!mPreviewGesture)
{
@@ -1754,17 +1755,15 @@ void LLPreviewGesture::onClickPreview()
mPreviewBtn->setLabel(getString("stop_txt"));
// play it, and delete when done
- LLGestureMgr::instance().playGesture(mPreviewGesture);
-
- refresh();
+ LLGestureMgr::instance().playGesture(mPreviewGesture, local);
}
else
{
// Will call onDonePreview() below
LLGestureMgr::instance().stopGesture(mPreviewGesture);
-
- refresh();
}
+
+ refresh();
}
diff --git a/indra/newview/llpreviewgesture.h b/indra/newview/llpreviewgesture.h
index d4d7228f4..7bb27063f 100644
--- a/indra/newview/llpreviewgesture.h
+++ b/indra/newview/llpreviewgesture.h
@@ -137,7 +137,7 @@ protected:
void onCommitActive();
void onClickSave();
- void onClickPreview();
+ void onClickPreview(bool local);
void onDonePreview(LLMultiGesture* gesture);
@@ -170,7 +170,7 @@ protected:
LLCheckBoxCtrl* mActiveCheck;
LLButton* mSaveBtn;
- LLButton* mPreviewBtn;
+ class LLFlyoutButton* mPreviewBtn;
LLMultiGesture* mPreviewGesture;
BOOL mDirty;
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 4127cfadc..1427f0d13 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -590,7 +590,7 @@ void LLPreviewTexture::updateDimensions()
client_width = getRect().getWidth() - horiz_pad;
if (mAspectRatio > 0.f)
{
- client_height = llmath::llround(client_width / mAspectRatio);
+ client_height = ll_round(client_width / mAspectRatio);
}
else
{
@@ -608,7 +608,7 @@ void LLPreviewTexture::updateDimensions()
if (client_height > max_height)
{
client_height = max_height;
- client_width = llmath::llround(client_height * mAspectRatio);
+ client_width = ll_round(client_height * mAspectRatio);
}
}
else
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index 5862dd958..d22178377 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -356,9 +356,9 @@ LLSLURL::LLSLURL(const std::string& grid,
{
mGrid = grid;
mRegion = region;
- S32 x = llmath::llround( (F32)position[VX] );
- S32 y = llmath::llround( (F32)position[VY] );
- S32 z = llmath::llround( (F32)position[VZ] );
+ S32 x = ll_round( (F32)position[VX] );
+ S32 y = ll_round( (F32)position[VY] );
+ S32 z = ll_round( (F32)position[VZ] );
mType = LOCATION;
mPosition = LLVector3(x, y, z);
}
@@ -417,9 +417,9 @@ std::string LLSLURL::getSLURLString() const
case LOCATION:
{
// lookup the grid
- S32 x = llmath::llround( (F32)mPosition[VX] );
- S32 y = llmath::llround( (F32)mPosition[VY] );
- S32 z = llmath::llround( (F32)mPosition[VZ] );
+ S32 x = ll_round( (F32)mPosition[VX] );
+ S32 y = ll_round( (F32)mPosition[VY] );
+ S32 z = ll_round( (F32)mPosition[VZ] );
//return LLGridManager::getInstance()->getSLURLBase(mGrid) +
//Singu TODO: Implement LLHippoGridMgr::getSLURLBase some day. For now it's hardcoded.
std::string fixed_slurl;
@@ -471,9 +471,9 @@ std::string LLSLURL::getLoginString() const
case LOCATION:
unescaped_start << "uri:"
<< mRegion << "&"
- << llmath::llround(mPosition[0]) << "&"
- << llmath::llround(mPosition[1]) << "&"
- << llmath::llround(mPosition[2]);
+ << ll_round(mPosition[0]) << "&"
+ << ll_round(mPosition[1]) << "&"
+ << ll_round(mPosition[2]);
break;
case HOME_LOCATION:
unescaped_start << "home";
@@ -517,9 +517,9 @@ std::string LLSLURL::getLocationString() const
{
return llformat("%s/%d/%d/%d",
mRegion.c_str(),
- (int)llmath::llround(mPosition[0]),
- (int)llmath::llround(mPosition[1]),
- (int)llmath::llround(mPosition[2]));
+ (int)ll_round(mPosition[0]),
+ (int)ll_round(mPosition[1]),
+ (int)ll_round(mPosition[2]));
}
// static
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index c1a497e39..c1b794500 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -42,6 +42,8 @@
#include "rlvhandler.h"
+#include
+
extern AIHTTPTimeoutPolicy moderationResponder_timeout;
const LLColor4 INACTIVE_COLOR(0.3f, 0.3f, 0.3f, 0.5f);
@@ -580,7 +582,8 @@ void LLSpeakerMgr::updateSpeakerList()
LLGroupMemberData* member = member_it->second;
LLUUID id = member_it->first;
// Add only members who are online and not already in the list
- if ((member->getOnlineStatus() == "Online") && (mSpeakers.find(id) == mSpeakers.end()))
+ const std::string& localized_online();
+ if ((member->getOnlineStatus() == localized_online()) && (mSpeakers.find(id) == mSpeakers.end()))
{
LLPointer speakerp = setSpeaker(id, "", LLSpeaker::STATUS_VOICE_ACTIVE, LLSpeaker::SPEAKER_AGENT);
speakerp->mIsModerator = ((member->getAgentPowers() & GP_SESSION_MODERATOR) == GP_SESSION_MODERATOR);
@@ -1040,11 +1043,10 @@ void LLLocalSpeakerMgr::updateSpeakerList()
// pick up non-voice speakers in chat range
uuid_vec_t avatar_ids;
- std::vector positions;
- LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS);
- for(U32 i=0; igetAvatars(&avatar_ids, NULL, gAgent.getPositionGlobal(), CHAT_NORMAL_RADIUS);
+ BOOST_FOREACH(const LLUUID& id, avatar_ids)
{
- setSpeaker(avatar_ids[i]);
+ setSpeaker(id);
}
// check if text only speakers have moved out of chat range
diff --git a/indra/newview/llsurface.cpp b/indra/newview/llsurface.cpp
index 00aed4b19..cc587197e 100644
--- a/indra/newview/llsurface.cpp
+++ b/indra/newview/llsurface.cpp
@@ -1424,10 +1424,10 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
- x_begin = llmath::llround(x * scale_inv);
- y_begin = llmath::llround(y * scale_inv);
- x_end = llmath::llround((x + width) * scale_inv);
- y_end = llmath::llround((y + width) * scale_inv);
+ x_begin = ll_round(x * scale_inv);
+ y_begin = ll_round(y * scale_inv);
+ x_end = ll_round((x + width) * scale_inv);
+ y_end = ll_round((y + width) * scale_inv);
if (x_end > tex_width)
{
@@ -1475,9 +1475,9 @@ BOOL LLSurface::generateWaterTexture(const F32 x, const F32 y,
// Want non-linear curve for transparency gradient
coloru = MAX_WATER_COLOR;
const F32 frac = 1.f - 2.f/(2.f - (height - WATER_HEIGHT));
- S32 alpha = 64 + llmath::llround((255-64)*frac);
+ S32 alpha = 64 + ll_round((255-64)*frac);
- alpha = llmin(llmath::llround((F32)MAX_WATER_COLOR.mV[3]), alpha);
+ alpha = llmin(ll_round((F32)MAX_WATER_COLOR.mV[3]), alpha);
alpha = llmax(64, alpha);
coloru.mV[3] = alpha;
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index d0b2bfa13..3513811df 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1167,7 +1167,7 @@ LLTextureCtrl::LLTextureCtrl(
S32 image_top = getRect().getHeight();
S32 image_bottom = BTN_HEIGHT_SMALL;
S32 image_middle = (image_top + image_bottom) / 2;
- S32 line_height = llmath::llround(LLFontGL::getFontSansSerifSmall()->getLineHeight());
+ S32 line_height = ll_round(LLFontGL::getFontSansSerifSmall()->getLineHeight());
mTentativeLabel = new LLTextBox( std::string("Multiple"),
LLRect(
diff --git a/indra/newview/lltoolgun.cpp b/indra/newview/lltoolgun.cpp
index 07629eefc..001fd42af 100644
--- a/indra/newview/lltoolgun.cpp
+++ b/indra/newview/lltoolgun.cpp
@@ -48,14 +48,20 @@
#include "llhudmanager.h"
#include "lltoolmgr.h"
#include "lltoolgrab.h"
-
+#include "lluiimage.h"
// Linden library includes
#include "llwindow.h" // setMouseClipping()
+bool getCustomColorRLV(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate, bool name_restricted);
+#include "llavatarnamecache.h"
+#include "llworld.h"
+#include "rlvhandler.h"
+
LLToolGun::LLToolGun( LLToolComposite* composite )
: LLTool( std::string("gun"), composite ),
mIsSelected(FALSE)
{
+ mCrosshairp = LLUI::getUIImage("UIImgCrosshairsUUID"); // - UI Caching
}
void LLToolGun::handleSelect()
@@ -95,8 +101,8 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
{
const F32 NOMINAL_MOUSE_SENSITIVITY = 0.0025f;
- F32 mouse_sensitivity = gSavedSettings.getF32("MouseSensitivity");
- mouse_sensitivity = clamp_rescale(mouse_sensitivity, 0.f, 15.f, 0.5f, 2.75f) * NOMINAL_MOUSE_SENSITIVITY;
+ static LLCachedControl mouse_sensitivity_setting(gSavedSettings, "MouseSensitivity");
+ F32 mouse_sensitivity = clamp_rescale(mouse_sensitivity_setting, 0.f, 15.f, 0.5f, 2.75f) * NOMINAL_MOUSE_SENSITIVITY;
// ...move the view with the mouse
@@ -107,18 +113,21 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
if (dx != 0 || dy != 0)
{
// ...actually moved off center
- if (gSavedSettings.getBOOL("InvertMouse"))
+ const F32 fov = LLViewerCamera::getInstance()->getView() / DEFAULT_FIELD_OF_VIEW;
+ static LLCachedControl invert_mouse(gSavedSettings, "InvertMouse");
+ if (invert_mouse)
{
- gAgent.pitch(mouse_sensitivity * -dy);
+ gAgent.pitch(mouse_sensitivity * fov * -dy);
}
else
{
- gAgent.pitch(mouse_sensitivity * dy);
+ gAgent.pitch(mouse_sensitivity * fov * dy);
}
LLVector3 skyward = gAgent.getReferenceUpVector();
- gAgent.rotate(mouse_sensitivity * dx, skyward.mV[VX], skyward.mV[VY], skyward.mV[VZ]);
+ gAgent.rotate(mouse_sensitivity * fov * dx, skyward.mV[VX], skyward.mV[VY], skyward.mV[VZ]);
- if (gSavedSettings.getBOOL("MouseSun"))
+ static LLCachedControl mouse_sun(gSavedSettings, "MouseSun");
+ if (mouse_sun)
{
gSky.setSunDirection(LLViewerCamera::getInstance()->getAtAxis(), LLVector3(0.f, 0.f, 0.f));
gSky.setOverrideSun(TRUE);
@@ -129,11 +138,11 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
gViewerWindow->hideCursor();
}
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (mouselook)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGun (mouselook)" << LL_ENDL;
}
else
{
- lldebugst(LLERR_USER_INPUT) << "hover handled by LLToolGun (not mouselook)" << llendl;
+ LL_DEBUGS("UserInput") << "hover handled by LLToolGun (not mouselook)" << LL_ENDL;
}
// HACK to avoid assert: error checking system makes sure that the cursor is set during every handleHover. This is actually a no-op since the cursor is hidden.
@@ -144,14 +153,57 @@ BOOL LLToolGun::handleHover(S32 x, S32 y, MASK mask)
void LLToolGun::draw()
{
- static const LLCachedControl show("ShowCrosshairs");
- if (show)
+ static LLCachedControl show_crosshairs(gSavedSettings, "ShowCrosshairs");
+ static LLCachedControl show_iff(gSavedSettings, "AlchemyMouselookIFF", true);
+ static LLCachedControl iff_range(gSavedSettings, "AlchemyMouselookIFFRange", 380.f);
+ if (show_crosshairs)
{
- LLUIImagePtr crosshair = LLUI::getUIImage("UIImgCrosshairsUUID");
+ const S32 windowWidth = gViewerWindow->getWorldViewRectScaled().getWidth();
+ const S32 windowHeight = gViewerWindow->getWorldViewRectScaled().getHeight();
static const LLCachedControl color("LiruCrosshairColor");
- crosshair->draw(
- ( gViewerWindow->getWorldViewRectScaled().getWidth() - crosshair->getWidth() ) / 2,
- ( gViewerWindow->getWorldViewRectScaled().getHeight() - crosshair->getHeight() ) / 2,
- color);
+ LLColor4 targetColor = color;
+ targetColor.mV[VALPHA] = 0.5f;
+ if (show_iff)
+ {
+ LLVector3d myPosition = gAgentCamera.getCameraPositionGlobal();
+ LLQuaternion myRotation = LLViewerCamera::getInstance()->getQuaternion();
+ myRotation.set(-myRotation.mQ[VX], -myRotation.mQ[VY], -myRotation.mQ[VZ], myRotation.mQ[VW]);
+
+ LLWorld::pos_map_t positions;
+ LLWorld& world(LLWorld::instance());
+ world.getAvatars(&positions, gAgent.getPositionGlobal(), iff_range);
+ for (LLWorld::pos_map_t::const_iterator iter = positions.cbegin(), iter_end = positions.cend(); iter != iter_end; ++iter)
+ {
+ const LLUUID& id = iter->first;
+ const LLVector3d& targetPosition = iter->second;
+ if (id == gAgentID || targetPosition.isNull())
+ {
+ continue;
+ }
+
+ LLVector3d magicVector = (targetPosition - myPosition) * myRotation;
+ magicVector.setVec(-magicVector.mdV[VY], magicVector.mdV[VZ], magicVector.mdV[VX]);
+ if (magicVector.mdV[VX] > -0.75 && magicVector.mdV[VX] < 0.75 && magicVector.mdV[VZ] > 0.0 && magicVector.mdV[VY] > -1.5 && magicVector.mdV[VY] < 1.5) // Do not fuck with these, cheater. :(
+ {
+ LLAvatarName avatarName;
+ LLAvatarNameCache::get(id, &avatarName);
+ bool name_restricted = gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES);
+ getCustomColorRLV(id, targetColor, world.getRegionFromPosGlobal(targetPosition), name_restricted);
+ const std::string name(name_restricted ? RlvStrings::getAnonym(avatarName.getNSName()) : avatarName.getNSName());
+ targetColor.mV[VALPHA] = 0.5f;
+ LLFontGL::getFontSansSerifBold()->renderUTF8(
+ gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC) ? name : llformat("%s : %.2fm", name.c_str(), (targetPosition - myPosition).magVec()),
+ 0, (windowWidth / 2.f), (windowHeight / 2.f) - 25.f, targetColor,
+ LLFontGL::HCENTER, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::NO_SHADOW
+ );
+
+ break;
+ }
+ }
+ }
+
+ mCrosshairp->draw(
+ (windowWidth - mCrosshairp->getWidth() ) / 2,
+ (windowHeight - mCrosshairp->getHeight() ) / 2, targetColor);
}
}
diff --git a/indra/newview/lltoolgun.h b/indra/newview/lltoolgun.h
index 4644e686b..e15a88f47 100644
--- a/indra/newview/lltoolgun.h
+++ b/indra/newview/lltoolgun.h
@@ -54,6 +54,9 @@ public:
virtual BOOL clipMouseWhenDown() { return FALSE; }
private:
BOOL mIsSelected;
+
+ // - UI Caching
+ LLUIImagePtr mCrosshairp;
};
#endif
diff --git a/indra/newview/lltoolselectland.cpp b/indra/newview/lltoolselectland.cpp
index 9a09c3ed3..f0de5e785 100644
--- a/indra/newview/lltoolselectland.cpp
+++ b/indra/newview/lltoolselectland.cpp
@@ -226,8 +226,8 @@ void LLToolSelectLand::handleDeselect()
void LLToolSelectLand::roundXY(LLVector3d &vec)
{
- vec.mdV[VX] = llmath::llround( vec.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
- vec.mdV[VY] = llmath::llround( vec.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
+ vec.mdV[VX] = ll_round( vec.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
+ vec.mdV[VY] = ll_round( vec.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
}
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index 681838d21..c1f92a378 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -1254,8 +1254,8 @@ LLRect get_whole_screen_region()
if (zoom_factor > 1.f)
{
S32 num_horizontal_tiles = llceil(zoom_factor);
- S32 tile_width = llmath::llround((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor);
- S32 tile_height = llmath::llround((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor);
+ S32 tile_width = ll_round((F32)gViewerWindow->getWorldViewWidthScaled() / zoom_factor);
+ S32 tile_height = ll_round((F32)gViewerWindow->getWorldViewHeightScaled() / zoom_factor);
int tile_y = sub_region / num_horizontal_tiles;
int tile_x = sub_region - (tile_y * num_horizontal_tiles);
@@ -1539,8 +1539,8 @@ void render_ui_2d()
int pos_y = sub_region / llceil(zoom_factor);
int pos_x = sub_region - (pos_y*llceil(zoom_factor));
// offset for this tile
- LLFontGL::sCurOrigin.mX -= llmath::llround((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor);
- LLFontGL::sCurOrigin.mY -= llmath::llround((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor);
+ LLFontGL::sCurOrigin.mX -= ll_round((F32)gViewerWindow->getWindowWidthScaled() * (F32)pos_x / zoom_factor);
+ LLFontGL::sCurOrigin.mY -= ll_round((F32)gViewerWindow->getWindowHeightScaled() * (F32)pos_y / zoom_factor);
}
stop_glerror();
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 4455b4d11..2ee341638 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -64,6 +64,7 @@
#include "llfloatercustomize.h"
//
#include "llappviewer.h" // System Folders
+bool use_http_inventory(); // UseHTTPInventory replacement
//
// Two do-nothing ops for use in callbacks.
@@ -354,7 +355,7 @@ void LLViewerInventoryItem::fetchFromServer(void) const
{
std::string url;
- if (gSavedSettings.getBOOL("UseHTTPInventory"))
+ if (use_http_inventory())
{
LLViewerRegion* region = gAgent.getRegion();
// we have to check region. It can be null after region was destroyed. See EXT-245
@@ -656,13 +657,13 @@ bool LLViewerInventoryCategory::fetch()
{
llwarns << "agent region is null" << llendl;
}
- if (!url.empty() && gSavedSettings.getBOOL("UseHTTPInventory")) //Capability found and HTTP inventory enabled. Build up LLSD and use it.
+ if (!url.empty() && use_http_inventory()) //Capability found and HTTP inventory enabled. Build up LLSD and use it.
{
LLInventoryModelBackgroundFetch::instance().start(mUUID, false);
}
else
{ //We don't have a capability or the use of HTTP inventory is disabled, use the old system.
- if (gSavedSettings.getBOOL("UseHTTPInventory"))
+ if (use_http_inventory())
{
llinfos << "FetchInventoryDescendents2 capability not found. Using UDP message." << llendl;
}
diff --git a/indra/newview/llviewerkeyboard.cpp b/indra/newview/llviewerkeyboard.cpp
index 535b66001..ef23a05cd 100644
--- a/indra/newview/llviewerkeyboard.cpp
+++ b/indra/newview/llviewerkeyboard.cpp
@@ -71,7 +71,7 @@ void agent_jump( EKeystate s )
{
if( KEYSTATE_UP == s ) return;
F32 time = gKeyboard->getCurKeyElapsedTime();
- S32 frame_count = llmath::llround(gKeyboard->getCurKeyElapsedFrameCount());
+ S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount());
if( time < FLY_TIME
|| frame_count <= FLY_FRAMES
@@ -148,7 +148,7 @@ static void agent_push_forwardbackward( EKeystate s, S32 direction, LLAgent::EDo
if (KEYSTATE_UP == s) return;
F32 time = gKeyboard->getCurKeyElapsedTime();
- S32 frame_count = llmath::llround(gKeyboard->getCurKeyElapsedFrameCount());
+ S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount());
if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES)
{
@@ -176,7 +176,7 @@ static void agent_slide_leftright( EKeystate s, S32 direction, LLAgent::EDoubleT
agent_handle_doubletap_run(s, mode);
if( KEYSTATE_UP == s ) return;
F32 time = gKeyboard->getCurKeyElapsedTime();
- S32 frame_count = llmath::llround(gKeyboard->getCurKeyElapsedFrameCount());
+ S32 frame_count = ll_round(gKeyboard->getCurKeyElapsedFrameCount());
if( time < NUDGE_TIME || frame_count <= NUDGE_FRAMES)
{
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 52ccb9c7c..daeedf75c 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -941,7 +941,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
{
F32 approximate_interest_dimension = (F32) sqrt(pimpl->getInterest());
- pimpl->setLowPrioritySizeLimit(llmath::llround(approximate_interest_dimension));
+ pimpl->setLowPrioritySizeLimit(ll_round(approximate_interest_dimension));
}
}
else
@@ -2367,8 +2367,8 @@ void LLViewerMediaImpl::scaleTextureCoords(const LLVector2& texture_coords, S32
texture_y = 1.0 + texture_y;
// scale x and y to texel units.
- *x = llmath::llround(texture_x * plugin->getTextureWidth());
- *y = llmath::llround((1.0f - texture_y) * plugin->getTextureHeight());
+ *x = ll_round(texture_x * plugin->getTextureWidth());
+ *y = ll_round((1.0f - texture_y) * plugin->getTextureHeight());
// Adjust for the difference between the actual texture height and the amount of the texture in use.
*y -= (plugin->getTextureHeight() - plugin->getHeight());
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index bb581801b..100e03441 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -5891,15 +5891,10 @@ class LLWorldSetBusy : public view_listener_t
{
bool handleEvent(LLPointer event, const LLSD& userdata)
{
- if (gAgent.getBusy())
- {
- gAgent.clearBusy();
- }
- else
- {
- gAgent.setBusy();
+ bool busy = !gAgent.isDoNotDisturb();
+ gAgent.setDoNotDisturb(busy);
+ if (busy)
LLNotificationsUtil::add("BusyModeSet");
- }
return true;
}
};
@@ -6032,7 +6027,7 @@ bool complete_give_money(const LLSD& notification, const LLSD& response, LLObjec
S32 option = LLNotification::getSelectedOption(notification, response);
if (option == 0)
{
- gAgent.clearBusy();
+ gAgent.setDoNotDisturb(false);
}
LLViewerObject* objectp = selection->getPrimaryObject();
@@ -6068,7 +6063,7 @@ void handle_give_money_dialog()
LLNotification::Params params("BusyModePay");
params.functor(boost::bind(complete_give_money, _1, _2, LLSelectMgr::getInstance()->getSelection()));
- if (gAgent.getBusy())
+ if (gAgent.isDoNotDisturb())
{
// warn users of being in busy mode during a transaction
LLNotifications::instance().add(params);
@@ -7329,6 +7324,16 @@ class LLToggleControl : public view_listener_t
}
};
+class LLTogglePerAccountControl : public view_listener_t
+{
+ bool handleEvent(LLPointer event, const LLSD& userdata)
+ {
+ LLControlVariable* control(gSavedPerAccountSettings.getControl(userdata.asString()));
+ control->set(!control->get());
+ return true;
+ }
+};
+
BOOL menu_check_control( void* user_data)
{
return gSavedSettings.getBOOL((char*)user_data);
@@ -9452,6 +9457,7 @@ void initialize_menus()
addMenu(new LLPromptShowURL(), "PromptShowURL");
addMenu(new LLShowAgentProfile(), "ShowAgentProfile");
addMenu(new LLToggleControl(), "ToggleControl");
+ addMenu(new LLTogglePerAccountControl(), "TogglePerAccountControl");
addMenu(new LLGoToObject(), "GoToObject");
addMenu(new LLPayObject(), "PayObject");
@@ -9558,13 +9564,13 @@ void region_change()
LLViewerRegion* regionp = gAgent.getRegion();
if (!regionp) return;
- if (regionp->getFeaturesReceived())
+ if (regionp->simulatorFeaturesReceived())
{
parse_simulator_features();
}
else
{
- regionp->setFeaturesReceivedCallback(boost::bind(&parse_simulator_features));
+ regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&parse_simulator_features));
}
}
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 2779f1404..a506437e4 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1176,7 +1176,7 @@ bool check_asset_previewable(const LLAssetType::EType asset_type)
void open_inventory_offer(const uuid_vec_t& objects, const std::string& from_name)
{
- if (gAgent.getBusy()) return;
+ if (gAgent.isDoNotDisturb()) return;
for (uuid_vec_t::const_iterator obj_iter = objects.begin();
obj_iter != objects.end();
++obj_iter)
@@ -1496,7 +1496,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
from_string = chatHistory_string = mFromName;
}
- bool busy = gAgent.getBusy();
+ bool busy = gAgent.isDoNotDisturb();
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1)
bool fRlvNotifyAccepted = false;
@@ -1651,26 +1651,29 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// send the message
msg->sendReliable(mHost);
-// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
- if ( (rlv_handler_t::isEnabled()) &&
- (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
+ if (gSavedSettings.getBOOL("LogInventoryDecline"))
{
- std::string::size_type idxToken = mDesc.find("' ( http://");
- if (std::string::npos != idxToken)
- RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1));
- }
+// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
+ if ( (rlv_handler_t::isEnabled()) &&
+ (IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
+ {
+ std::string::size_type idxToken = mDesc.find("' ( http://");
+ if (std::string::npos != idxToken)
+ RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1));
+ }
// [/RLVa:KB]
- LLStringUtil::format_map_t log_message_args;
- log_message_args["[DESC]"] = mDesc;
- log_message_args["[NAME]"] = mFromName;
- log_message = LLTrans::getString("InvOfferDecline", log_message_args);
- chat.mText = log_message;
- if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269
- {
- chat.mMuted = TRUE;
+ LLStringUtil::format_map_t log_message_args;
+ log_message_args["[DESC]"] = mDesc;
+ log_message_args["[NAME]"] = mFromName;
+ log_message = LLTrans::getString("InvOfferDecline", log_message_args);
+ chat.mText = log_message;
+ if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269
+ {
+ chat.mMuted = TRUE;
+ }
+ LLFloaterChat::addChatHistory(chat);
}
- LLFloaterChat::addChatHistory(chat);
// If it's from an agent, we have to fetch the item to throw
// it away. If it's from a task or group, just denying the
@@ -1800,7 +1803,7 @@ void inventory_offer_handler(LLOfferInfo* info)
return;
}
- if (gAgent.getBusy() && info->mIM != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565)
+ if (gAgent.isDoNotDisturb() && info->mIM != IM_TASK_INVENTORY_OFFERED) // busy mode must not affect interaction with objects (STORM-565)
{
// Until throttling is implemented, busy mode should reject inventory instead of silently
// accepting it. SEE SL-39554
@@ -2164,6 +2167,27 @@ std::string replace_wildcards(std::string autoresponse, const LLUUID& id, const
return autoresponse;
}
+void autoresponder_finish(bool show_autoresponded, const LLUUID& computed_session_id, const LLUUID& from_id, const std::string& name, const LLUUID& itemid, bool is_muted)
+{
+ LLAvatarName av_name;
+ const std::string ns_name(LLAvatarNameCache::get(from_id, &av_name) ? av_name.getNSName() : name);
+ void cmdline_printchat(const std::string& message);
+ if (show_autoresponded)
+ {
+ const std::string notice(LLTrans::getString("IM_autoresponded_to") + ' ' + ns_name);
+ is_muted ? cmdline_printchat(notice) : gIMMgr->addMessage(computed_session_id, from_id, name, notice);
+ }
+ if (LLViewerInventoryItem* item = gInventory.getItem(itemid))
+ {
+ LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
+ if (show_autoresponded)
+ {
+ const std::string notice(llformat("%s %s \"%s\"", ns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
+ is_muted ? cmdline_printchat(notice) : gIMMgr->addMessage(computed_session_id, from_id, name, notice);
+ }
+ }
+}
+
void process_improved_im(LLMessageSystem *msg, void **user_data)
{
if (gNoRender)
@@ -2250,7 +2274,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
llinfos << "RegionID: " << region_id.asString() << llendl;
//
- BOOL is_do_not_disturb = gAgent.getBusy();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = LLMuteList::getInstance()->isMuted(from_id, name, LLMute::flagTextChat)
// object IMs contain sender object id in session_id (STORM-1209)
|| dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id);
@@ -2422,7 +2446,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
response = gSavedPerAccountSettings.getString("AutoresponseMutedMessage");
if (gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"))
itemid = static_cast(gSavedPerAccountSettings.getString("AutoresponseMutedItemID"));
- // We don't show that we've responded to mutes
+ show_autoresponded = gSavedPerAccountSettings.getBOOL("AutoresponseMutedShow");
}
else if (is_autorespond_nonfriends)
{
@@ -2442,7 +2466,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
gMessageSystem,
gAgentID,
FALSE,
- gAgent.getSessionID(),
+ gAgentSessionID,
from_id,
my_name,
replace_wildcards(response, from_id, name),
@@ -2451,21 +2475,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
session_id);
gAgent.sendReliableMessage();
- LLAvatarName av_name;
- std::string ns_name = LLAvatarNameCache::get(from_id, &av_name) ? av_name.getNSName() : name;
- if (show_autoresponded)
- {
- gIMMgr->addMessage(session_id, from_id, name, LLTrans::getString("IM_autoresponded_to") + " " + ns_name);
- }
- if (LLViewerInventoryItem* item = gInventory.getItem(itemid))
- {
- LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
- if (show_autoresponded)
- {
- gIMMgr->addMessage(computed_session_id, from_id, name,
- llformat("%s %s \"%s\"", ns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
- }
- }
+ autoresponder_finish(show_autoresponded, computed_session_id, from_id, name, itemid, is_muted);
}
// We stored the incoming IM in history before autoresponding, logically.
}
@@ -2561,7 +2571,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
gMessageSystem,
gAgentID,
FALSE,
- gAgent.getSessionID(),
+ gAgentSessionID,
from_id,
my_name,
replace_wildcards(gSavedPerAccountSettings.getString("AutoresponseMutedMessage"), from_id, name),
@@ -2569,9 +2579,8 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
IM_BUSY_AUTO_RESPONSE,
session_id);
gAgent.sendReliableMessage();
- if (gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"))
- if (LLViewerInventoryItem* item = gInventory.getItem(static_cast(gSavedPerAccountSettings.getString("AutoresponseMutedItemID"))))
- LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
+ LLAvatarName av_name;
+ autoresponder_finish(gSavedPerAccountSettings.getBOOL("AutoresponseMutedShow"), computed_session_id, from_id, LLAvatarNameCache::get(from_id, &av_name) ? av_name.getNSName() : name, gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem") ? static_cast(gSavedPerAccountSettings.getString("AutoresponseMutedItemID")) : LLUUID::null, true);
}
}
}
@@ -2624,19 +2633,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
pack_instant_message(gMessageSystem, gAgentID, false, gAgentSessionID, from_id, my_name, replace_wildcards(response, from_id, name), IM_ONLINE, IM_BUSY_AUTO_RESPONSE, session_id);
gAgent.sendReliableMessage();
- if (show_autoresponded)
- {
- gIMMgr->addMessage(session_id, from_id, name, LLTrans::getString("IM_autoresponded_to") + " " + ns_name);
- }
- if (LLViewerInventoryItem* item = gInventory.getItem(itemid))
- {
- LLGiveInventory::doGiveInventoryItem(from_id, item, computed_session_id);
- if (show_autoresponded)
- {
- gIMMgr->addMessage(computed_session_id, from_id, name,
- llformat("%s %s \"%s\"", ns_name.c_str(), LLTrans::getString("IM_autoresponse_sent_item").c_str(), item->getName().c_str()));
- }
- }
+ autoresponder_finish(show_autoresponded, computed_session_id, from_id, name, itemid, is_muted);
}
}
LLPointer im_info = new LLIMInfo(gMessageSystem);
@@ -3465,7 +3462,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, const LLUUID& session_id)
{
- if (gAgent.getBusy())
+ if (gAgent.isDoNotDisturb())
{
std::string my_name;
LLAgentUI::buildFullname(my_name);
@@ -3488,7 +3485,7 @@ void send_do_not_disturb_message (LLMessageSystem* msg, const LLUUID& from_id, c
std::string ns_name = LLAvatarNameCache::get(from_id, &av_name) ? av_name.getNSName() : from_name;
LLUUID session_id;
msg->getUUIDFast(_PREHASH_MessageBlock, _PREHASH_ID, session_id);
- if (gSavedPerAccountSettings.getBOOL("BusyModeResponseShow")) gIMMgr->addMessage(session_id, from_id, from_name, LLTrans::getString("IM_autoresponded_to") + " " + ns_name);
+ if (gSavedPerAccountSettings.getBOOL("BusyModeResponseShow")) gIMMgr->addMessage(session_id, from_id, from_name, LLTrans::getString("IM_autoresponded_to") + ' ' + ns_name);
if (!gSavedPerAccountSettings.getBOOL("BusyModeResponseItem")) return; // Not sending an item, finished
if (LLViewerInventoryItem* item = gInventory.getItem(static_cast(gSavedPerAccountSettings.getString("BusyModeResponseItemID"))))
{
@@ -3584,7 +3581,7 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
if(!source_name.empty())
{
- if (gAgent.getBusy()
+ if (gAgent.isDoNotDisturb()
|| LLMuteList::getInstance()->isMuted(source_id, source_name, LLMute::flagTextChat))
{
// automatically decline offer
@@ -3810,7 +3807,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
chat.mFromName = from_name;
}
- BOOL is_do_not_disturb = gAgent.getBusy();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
BOOL is_muted = FALSE;
BOOL is_linden = FALSE;
@@ -3961,9 +3958,9 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
const LLViewerObject* obj(chatter ? chatter : gObjectList.findObject(owner_id));
// Compute the object SLURL.
LLVector3 pos = obj ? obj->getPositionRegion() : LLVector3::zero;
- S32 x = llmath::llround((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS));
- S32 y = llmath::llround((F32)fmod((F64)pos.mV[VY], (F64)REGION_WIDTH_METERS));
- S32 z = llmath::llround((F32)pos.mV[VZ]);
+ S32 x = ll_round((F32)fmod((F64)pos.mV[VX], (F64)REGION_WIDTH_METERS));
+ S32 y = ll_round((F32)fmod((F64)pos.mV[VY], (F64)REGION_WIDTH_METERS));
+ S32 z = ll_round((F32)pos.mV[VZ]);
std::ostringstream location;
location << (obj ? obj->getRegion() : gAgent.getRegion())->getName() << "/" << x << "/" << y << "/" << z;
if (chatter != obj) location << "?owner_not_object";
@@ -4789,14 +4786,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
}
// force simulator to recognize busy state
- if (gAgent.getBusy())
- {
- gAgent.setBusy();
- }
- else
- {
- gAgent.clearBusy();
- }
+ gAgent.setDoNotDisturb(gAgent.isDoNotDisturb());
if (isAgentAvatarValid())
{
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index 516c3d1e1..052cdacf9 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -39,7 +39,6 @@
// common includes
#include "llstat.h"
#include "llstring.h"
-#include "sguuidhash.h"
// project includes
#include "llviewerobject.h"
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 63ba67994..f6ad4ca32 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -315,7 +315,7 @@ S32 LLViewerParcelMgr::getSelectedArea() const
F64 width = mEastNorth.mdV[VX] - mWestSouth.mdV[VX];
F64 height = mEastNorth.mdV[VY] - mWestSouth.mdV[VY];
F32 area = (F32)(width * height);
- rv = llmath::llround(area);
+ rv = ll_round(area);
}
return rv;
}
@@ -335,10 +335,10 @@ void LLViewerParcelMgr::writeHighlightSegments(F32 west, F32 south, F32 east,
F32 north)
{
S32 x, y;
- S32 min_x = llmath::llround( west / PARCEL_GRID_STEP_METERS );
- S32 max_x = llmath::llround( east / PARCEL_GRID_STEP_METERS );
- S32 min_y = llmath::llround( south / PARCEL_GRID_STEP_METERS );
- S32 max_y = llmath::llround( north / PARCEL_GRID_STEP_METERS );
+ S32 min_x = ll_round( west / PARCEL_GRID_STEP_METERS );
+ S32 max_x = ll_round( east / PARCEL_GRID_STEP_METERS );
+ S32 min_y = ll_round( south / PARCEL_GRID_STEP_METERS );
+ S32 max_y = ll_round( north / PARCEL_GRID_STEP_METERS );
const S32 STRIDE = mParcelsPerEdge+1;
@@ -450,12 +450,12 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelAt(const LLVector3d& pos_
LLVector3d northeast = pos_global;
southwest -= LLVector3d( PARCEL_GRID_STEP_METERS/2, PARCEL_GRID_STEP_METERS/2, 0 );
- southwest.mdV[VX] = llmath::llround( southwest.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
- southwest.mdV[VY] = llmath::llround( southwest.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
+ southwest.mdV[VX] = ll_round( southwest.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
+ southwest.mdV[VY] = ll_round( southwest.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
northeast += LLVector3d( PARCEL_GRID_STEP_METERS/2, PARCEL_GRID_STEP_METERS/2, 0 );
- northeast.mdV[VX] = llmath::llround( northeast.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
- northeast.mdV[VY] = llmath::llround( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
+ northeast.mdV[VX] = ll_round( northeast.mdV[VX], (F64)PARCEL_GRID_STEP_METERS );
+ northeast.mdV[VY] = ll_round( northeast.mdV[VY], (F64)PARCEL_GRID_STEP_METERS );
// Snap to parcel
return selectLand( southwest, northeast, TRUE );
diff --git a/indra/newview/llviewerpartsim.cpp b/indra/newview/llviewerpartsim.cpp
index 5e334e634..c9ed0b4dc 100644
--- a/indra/newview/llviewerpartsim.cpp
+++ b/indra/newview/llviewerpartsim.cpp
@@ -397,7 +397,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
}
// Do glow interpolation
- part->mGlow.mV[3] = (U8) llmath::llround(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f);
+ part->mGlow.mV[3] = (U8) ll_round(lerp(part->mStartGlow, part->mEndGlow, frac)*255.f);
// Set the last update time to now.
part->mLastUpdateTime = cur_time;
diff --git a/indra/newview/llviewerpartsource.cpp b/indra/newview/llviewerpartsource.cpp
index 10b70f398..8569f2663 100644
--- a/indra/newview/llviewerpartsource.cpp
+++ b/indra/newview/llviewerpartsource.cpp
@@ -322,7 +322,7 @@ void LLViewerPartSourceScript::update(const F32 dt)
part->mStartGlow = mPartSysData.mPartData.mStartGlow;
part->mEndGlow = mPartSysData.mPartData.mEndGlow;
- part->mGlow = LLColor4U(0, 0, 0, (U8) llmath::llround(part->mStartGlow*255.f));
+ part->mGlow = LLColor4U(0, 0, 0, (U8) ll_round(part->mStartGlow*255.f));
if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_DROP)
{
diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h
index cce678081..3e41172b1 100644
--- a/indra/newview/llviewerprecompiledheaders.h
+++ b/indra/newview/llviewerprecompiledheaders.h
@@ -73,9 +73,6 @@
#include "imageids.h"
#include "indra_constants.h"
#include "llinitparam.h"
-
-//#include "linden_common.h"
-//#include "llpreprocessor.h"
#include "llapp.h"
#include "llapr.h"
#include "llcriticaldamp.h"
@@ -88,14 +85,12 @@
#include "llerror.h"
#include "llfasttimer.h"
#include "llframetimer.h"
-#include "llhash.h"
#include "lllocalidhashmap.h"
#include "llmap.h"
#include "llmemory.h"
#include "llnametable.h"
#include "llpriqueuemap.h"
#include "llprocessor.h"
-//#include "llsecondlifeurls.h"
#include "llstack.h"
#include "llstat.h"
#include "llstl.h"
@@ -104,11 +99,8 @@
#include "llsys.h"
#include "llthread.h"
#include "lltimer.h"
-//#include "processor.h"
#include "stdenums.h"
#include "stdtypes.h"
-//#include "string_table.h"
-//#include "timer.h"
#include "timing.h"
#include "u64.h"
@@ -150,7 +142,6 @@
#include "llnamevalue.h"
#include "llpacketack.h"
#include "llpacketbuffer.h"
-//#include "llpacketring.h"
#include "llpartdata.h"
#include "llregionhandle.h"
#include "lltaskname.h"
@@ -173,7 +164,6 @@
#include "message.h"
#include "message_prehash.h"
#include "net.h"
-//#include "network.h"
#include "patch_code.h"
#include "patch_dct.h"
#include "sound_ids.h"
@@ -182,12 +172,8 @@
#include "imageids.h"
#include "legacy_object_types.h"
#include "llmaterialtable.h"
-//#include "llprimitive.h"
#include "lltextureanim.h"
-//#include "lltextureentry.h"
#include "lltreeparams.h"
-//#include "llvolume.h"
-//#include "llvolumemgr.h"
#include "material_codes.h"
// Library includes from llxml
@@ -196,9 +182,6 @@
// Library includes from llvfs
#include "llassettype.h"
#include "lldir.h"
-//#include "lldir_linux.h"
-//#include "lldir_mac.h"
-//#include "lldir_win32.h"
#include "llvfile.h"
#include "llvfs.h"
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 4a75bc8fc..c502eab4f 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -314,7 +314,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
mCapabilitiesReceived(false),
- mFeaturesReceived(false),
+ mSimulatorFeaturesReceived(false),
mGamingFlags(0),
// Aurora Sim
mWidth(region_width_meters)
@@ -1318,6 +1318,26 @@ void LLViewerRegion::getInfo(LLSD& info)
info["Region"]["Handle"]["y"] = (LLSD::Integer)y;
}
+boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb)
+{
+ return mSimulatorFeaturesReceivedSignal.connect(cb);
+}
+
+void LLViewerRegion::setSimulatorFeaturesReceived(bool received)
+{
+ mSimulatorFeaturesReceived = received;
+ if (received)
+ {
+ mSimulatorFeaturesReceivedSignal(getRegionID());
+ mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
+ }
+}
+
+bool LLViewerRegion::simulatorFeaturesReceived() const
+{
+ return mSimulatorFeaturesReceived;
+}
+
void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features)
{
sim_features = mSimulatorFeatures;
@@ -1331,9 +1351,7 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features)
LL_DEBUGS("SimFeatures") << "\n" << str.str() << LL_ENDL;
mSimulatorFeatures = sim_features;
- mFeaturesReceived = true;
- mFeaturesReceivedSignal(getRegionID());
- mFeaturesReceivedSignal.disconnect_all_slots();
+ setSimulatorFeaturesReceived(true);
}
void LLViewerRegion::setGamingData(const LLSD& gaming_data)
@@ -2026,9 +2044,9 @@ void LLViewerRegion::setCapabilitiesReceived(bool received)
// in consumers by allowing them to expect this signal, regardless.
if (getCapability("SimulatorFeatures").empty())
{
- mFeaturesReceived = true;
- mFeaturesReceivedSignal(getRegionID());
- mFeaturesReceivedSignal.disconnect_all_slots();
+ mSimulatorFeaturesReceived = true;
+ mSimulatorFeaturesReceivedSignal(getRegionID());
+ mSimulatorFeaturesReceivedSignal.disconnect_all_slots();
}
}
}
@@ -2148,9 +2166,10 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const
mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean());
}
-boost::signals2::connection LLViewerRegion::setFeaturesReceivedCallback(const features_received_signal_t::slot_type& cb)
+bool LLViewerRegion::avatarHoverHeightEnabled() const
{
- return mFeaturesReceivedSignal.connect(cb);
+ return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") &&
+ mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean());
}
void LLViewerRegion::resetMaterialsCapThrottle()
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index cfaef5ebc..07d4fcca4 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -105,7 +105,6 @@ public:
} eObjectPartitions;
typedef boost::signals2::signal caps_received_signal_t;
- typedef boost::signals2::signal features_received_signal_t;
LLViewerRegion(const U64 &handle,
const LLHost &host,
@@ -284,9 +283,6 @@ public:
static bool isSpecialCapabilityName(const std::string &name);
void logActiveCapabilities() const;
- boost::signals2::connection setFeaturesReceivedCallback(const features_received_signal_t::slot_type& cb);
- bool getFeaturesReceived() const { return mFeaturesReceived; }
-
/// Get LLEventPump on which we listen for capability requests
/// (https://wiki.lindenlab.com/wiki/Viewer:Messaging/Messaging_Notes#Capabilities)
LLEventPump& getCapAPI() const;
@@ -327,12 +323,19 @@ public:
bool meshRezEnabled() const;
bool meshUploadEnabled() const;
+ // has region received its simulator features list? Requires an additional query after caps received.
+ void setSimulatorFeaturesReceived(bool);
+ bool simulatorFeaturesReceived() const;
+ boost::signals2::connection setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb);
+
void getSimulatorFeatures(LLSD& info);
void setSimulatorFeatures(const LLSD& info);
bool dynamicPathfindingEnabled() const;
+ bool avatarHoverHeightEnabled() const;
+
typedef enum
{
CACHE_MISS_TYPE_FULL = 0,
@@ -480,9 +483,9 @@ private:
bool mAlive; // can become false if circuit disconnects
bool mCapabilitiesReceived;
- bool mFeaturesReceived;
+ bool mSimulatorFeaturesReceived;
caps_received_signal_t mCapabilitiesReceivedSignal;
- features_received_signal_t mFeaturesReceivedSignal;
+ caps_received_signal_t mSimulatorFeaturesReceivedSignal;
BOOL mReleaseNotesRequested;
diff --git a/indra/newview/llviewertextureanim.cpp b/indra/newview/llviewertextureanim.cpp
index fc5d30890..c91e997e0 100644
--- a/indra/newview/llviewertextureanim.cpp
+++ b/indra/newview/llviewertextureanim.cpp
@@ -174,7 +174,7 @@ S32 LLViewerTextureAnim::animateTextures(F32 &off_s, F32 &off_t,
if (!(mMode & SMOOTH))
{
- frame_counter = (F32)llmath::llround(frame_counter);
+ frame_counter = (F32)ll_round(frame_counter);
}
//
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 4a0e79b97..77530b9f8 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -846,8 +846,8 @@ BOOL LLViewerWindow::handleAnyMouseClick(LLWindow *window, LLCoordGL pos, MASK
BOOL handled = FALSE;
S32 x = pos.mX;
S32 y = pos.mY;
- x = llmath::llround((F32)x / mDisplayScale.mV[VX]);
- y = llmath::llround((F32)y / mDisplayScale.mV[VY]);
+ x = ll_round((F32)x / mDisplayScale.mV[VX]);
+ y = ll_round((F32)y / mDisplayScale.mV[VY]);
if (down)
{
@@ -1021,8 +1021,8 @@ BOOL LLViewerWindow::handleRightMouseDown(LLWindow *window, LLCoordGL pos, MASK
{
S32 x = pos.mX;
S32 y = pos.mY;
- x = llmath::llround((F32)x / mDisplayScale.mV[VX]);
- y = llmath::llround((F32)y / mDisplayScale.mV[VY]);
+ x = ll_round((F32)x / mDisplayScale.mV[VX]);
+ y = ll_round((F32)y / mDisplayScale.mV[VY]);
LLView::sMouseHandlerMessage.clear();
@@ -1220,8 +1220,8 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
S32 x = pos.mX;
S32 y = pos.mY;
- x = llmath::llround((F32)x / mDisplayScale.mV[VX]);
- y = llmath::llround((F32)y / mDisplayScale.mV[VY]);
+ x = ll_round((F32)x / mDisplayScale.mV[VX]);
+ y = ll_round((F32)y / mDisplayScale.mV[VY]);
mMouseInWindow = TRUE;
@@ -1716,7 +1716,7 @@ LLViewerWindow::LLViewerWindow(
LLCoordWindow size;
mWindow->getSize(&size);
mWindowRectRaw.set(0, size.mY, size.mX, 0);
- mWindowRectScaled.set(0, llmath::llround((F32)size.mY / mDisplayScale.mV[VY]), llmath::llround((F32)size.mX / mDisplayScale.mV[VX]), 0);
+ mWindowRectScaled.set(0, ll_round((F32)size.mY / mDisplayScale.mV[VY]), ll_round((F32)size.mX / mDisplayScale.mV[VX]), 0);
}
LLFontManager::initClass();
@@ -2398,8 +2398,8 @@ void LLViewerWindow::reshape(S32 width, S32 height)
LLUI::setScaleFactor(mDisplayScale);
// update our window rectangle
- mWindowRectScaled.mRight = mWindowRectScaled.mLeft + llmath::llround((F32)width / mDisplayScale.mV[VX]);
- mWindowRectScaled.mTop = mWindowRectScaled.mBottom + llmath::llround((F32)height / mDisplayScale.mV[VY]);
+ mWindowRectScaled.mRight = mWindowRectScaled.mLeft + ll_round((F32)width / mDisplayScale.mV[VX]);
+ mWindowRectScaled.mTop = mWindowRectScaled.mBottom + ll_round((F32)height / mDisplayScale.mV[VY]);
setup2DViewport();
@@ -2560,8 +2560,8 @@ void LLViewerWindow::draw()
microsecondsToTimecodeString(gFrameTime,text);
const LLFontGL* font = LLFontGL::getFontSansSerif();
font->renderUTF8(text, 0,
- llmath::llround((getWindowWidthScaled()/2)-100.f),
- llmath::llround((getWindowHeightScaled()-60.f)),
+ ll_round((getWindowWidthScaled()/2)-100.f),
+ ll_round((getWindowHeightScaled()-60.f)),
LLColor4( 1.f, 1.f, 1.f, 1.f ),
LLFontGL::LEFT, LLFontGL::TOP);
}
@@ -2601,7 +2601,8 @@ void LLViewerWindow::draw()
// Draw tool specific overlay on world
LLToolMgr::getInstance()->getCurrentTool()->draw();
- if( gAgentCamera.cameraMouselook() )
+ static LLCachedControl drawMouselookInst(gSavedSettings, "AlchemyMouselookInstructions", true);
+ if (drawMouselookInst && (gAgentCamera.cameraMouselook()))
{
drawMouselookInstructions();
stop_glerror();
@@ -2661,7 +2662,7 @@ void LLViewerWindow::draw()
const S32 DIST_FROM_TOP = 20;
LLFontGL::getFontSansSerifBig()->renderUTF8(
mOverlayTitle, 0,
- llmath::llround( getWindowWidthScaled() * 0.5f),
+ ll_round( getWindowWidthScaled() * 0.5f),
getWindowHeightScaled() - DIST_FROM_TOP,
LLColor4(1, 1, 1, 0.4f),
LLFontGL::HCENTER, LLFontGL::TOP);
@@ -2852,6 +2853,19 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
return TRUE;
}
+ // If "Pressing letter keys starts local chat" option is selected, we are not in mouselook,
+ // no view has keyboard focus, this is a printable character key (and no modifier key is
+ // pressed except shift), then give focus to nearby chat (STORM-560)
+ if (gSavedSettings.getBOOL("LetterKeysFocusChatBar") && !gAgentCamera.cameraMouselook() &&
+ !keyboard_focus && key < 0x80 && (mask == MASK_NONE || mask == MASK_SHIFT))
+ {
+ {
+ // passing NULL here, character will be added later when it is handled by character handler.
+ gChatBar->startChat(NULL);
+ return TRUE;
+ }
+ }
+
// give menus a chance to handle unmodified accelerator keys
if ((gMenuBarView && gMenuBarView->handleAcceleratorKey(key, mask))
||(gLoginMenuBarView && gLoginMenuBarView->handleAcceleratorKey(key, mask)))
@@ -3514,7 +3528,7 @@ void LLViewerWindow::updateMouseDelta()
fdx = fdx + ((F32) dx - fdx) * llmin(gFrameIntervalSeconds*amount,1.f);
fdy = fdy + ((F32) dy - fdy) * llmin(gFrameIntervalSeconds*amount,1.f);
- mCurrentMouseDelta.set(llmath::llround(fdx), llmath::llround(fdy));
+ mCurrentMouseDelta.set(ll_round(fdx), ll_round(fdy));
mouse_vel.setVec(fdx,fdy);
}
else
@@ -4804,10 +4818,10 @@ bool LLViewerWindow::rawRawSnapshot(LLImageRaw *raw,
// However, if the buffer turns out to be too large, then clamp it to max_size.
scale_factor = llmin(max_size / snapshot_width, max_size / snapshot_height)) // Clamp
{
- image_buffer_x = llmath::llround(unscaled_image_buffer_x * scale_factor);
- image_buffer_y = llmath::llround(unscaled_image_buffer_y * scale_factor);
- S32 image_size_x = llmath::llround(snapshot_width * scale_factor);
- S32 image_size_y = llmath::llround(snapshot_width * scale_factor);
+ image_buffer_x = ll_round(unscaled_image_buffer_x * scale_factor);
+ image_buffer_y = ll_round(unscaled_image_buffer_y * scale_factor);
+ S32 image_size_x = ll_round(snapshot_width * scale_factor);
+ S32 image_size_y = ll_round(snapshot_width * scale_factor);
if (llmax(image_size_x, image_size_y) > max_size && // Boundary check to avoid memory overflow.
internal_scale <= 1.f && !reset_deferred) // SHY_MOD: If supersampling... Don't care about max_size.
{
@@ -5051,44 +5065,52 @@ void LLViewerWindow::destroyWindow()
void LLViewerWindow::drawMouselookInstructions()
{
- static const F32 INSTRUCTIONS_OPAQUE_TIME = 10.f;
- static const F32 INSTRUCTIONS_FADE_TIME = 5.f;
-
- F32 mouselook_duration = gAgentCamera.getMouseLookDuration();
- if( mouselook_duration >= (INSTRUCTIONS_OPAQUE_TIME+INSTRUCTIONS_OPAQUE_TIME) )
- return;
-
- F32 alpha = 1.f;
-
- if( mouselook_duration > INSTRUCTIONS_OPAQUE_TIME) //instructions are fading
- {
- alpha = (F32) sqrt(1.f-pow(((mouselook_duration-INSTRUCTIONS_OPAQUE_TIME)/INSTRUCTIONS_FADE_TIME),2.f));
- }
-
+ //
// Draw instructions for mouselook ("Press ESC to leave Mouselook" in a box at the top of the screen.)
- const std::string instructions = LLTrans::getString("LeaveMouselook");
- const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF );
-
- const S32 INSTRUCTIONS_PAD = 5;
- LLRect instructions_rect;
- instructions_rect.setLeftTopAndSize(
- INSTRUCTIONS_PAD,
- getWindowHeight() - INSTRUCTIONS_PAD,
- font->getWidth( instructions ) + 2 * INSTRUCTIONS_PAD,
- llmath::llround(font->getLineHeight() + 2 * INSTRUCTIONS_PAD));
+ const LLFontGL* font = LLFontGL::getFontSansSerifBig();
+ //to be on top of Bottom bar when it is opened
+ const S32 INSTRUCTIONS_PAD = getWorldViewRectScaled().mTop - 15;
+ const S32 text_pos_start = getWorldViewRectScaled().getCenterX() - 150;
+ if (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- gGL.color4f( 0.9f, 0.9f, 0.9f, alpha );
- gl_rect_2d( instructions_rect );
+ const LLVector3& vec = gAgent.getPositionAgent();
+ font->renderUTF8(
+ llformat("X: %.2f", vec.mV[VX]), 0,
+ text_pos_start,
+ INSTRUCTIONS_PAD,
+ LLColor4(1.0f, 0.5f, 0.5f, 0.5),
+ LLFontGL::HCENTER, LLFontGL::TOP,
+ LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
+ font->renderUTF8(
+ llformat("Y: %.2f", vec.mV[VX]), 0,
+ text_pos_start + 100,
+ INSTRUCTIONS_PAD,
+ LLColor4(0.5f, 1.0f, 0.5f, 0.5),
+ LLFontGL::HCENTER, LLFontGL::TOP,
+ LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
+ font->renderUTF8(
+ llformat("Z: %.2f", vec.mV[VX]), 0,
+ text_pos_start + 200,
+ INSTRUCTIONS_PAD,
+ LLColor4(0.5f, 0.5f, 1.0f, 0.5),
+ LLFontGL::HCENTER, LLFontGL::TOP,
+ LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
}
-
- font->renderUTF8(
- instructions, 0,
- instructions_rect.mLeft + INSTRUCTIONS_PAD,
- instructions_rect.mTop - INSTRUCTIONS_PAD,
- LLColor4( 0.0f, 0.0f, 0.0f, alpha ),
- LLFontGL::LEFT, LLFontGL::TOP);
+ const LLViewerParcelMgr& vpm = LLViewerParcelMgr::instance();
+ const bool allow_damage = vpm.allowAgentDamage(gAgent.getRegion(), vpm.getAgentParcel());
+ if (allow_damage)
+ {
+ const S32 health = gStatusBar ? gStatusBar->getHealth() : -1;
+ font->renderUTF8(
+ llformat("HP: %d%%", health), 0,
+ text_pos_start + 300,
+ INSTRUCTIONS_PAD,
+ LLColor4(1.0f, 1.0f, 1.0f, 0.5),
+ LLFontGL::HCENTER, LLFontGL::TOP,
+ LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT);
+ }
+ //
}
void* LLViewerWindow::getPlatformWindow() const
@@ -5685,8 +5707,8 @@ void LLViewerWindow::calcDisplayScale()
if (mWindow->getFullscreen())
{
- display_scale.mV[0] = llmath::llround(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth());
- display_scale.mV[1] = llmath::llround(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight());
+ display_scale.mV[0] = ll_round(display_scale.mV[0], 2.0f/(F32) mWindowRectRaw.getWidth());
+ display_scale.mV[1] = ll_round(display_scale.mV[1], 2.0f/(F32) mWindowRectRaw.getHeight());
}
if (display_scale != mDisplayScale)
@@ -5970,8 +5992,8 @@ void LLPickInfo::updateXYCoords()
LLPointer imagep = LLViewerTextureManager::getFetchedTexture(tep->getID());
if(mUVCoords.mV[VX] >= 0.f && mUVCoords.mV[VY] >= 0.f && imagep.notNull())
{
- mXYCoords.mX = llmath::llround(mUVCoords.mV[VX] * (F32)imagep->getWidth());
- mXYCoords.mY = llmath::llround((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight());
+ mXYCoords.mX = ll_round(mUVCoords.mV[VX] * (F32)imagep->getWidth());
+ mXYCoords.mY = ll_round((1.f - mUVCoords.mV[VY]) * (F32)imagep->getHeight());
}
}
}
@@ -6000,7 +6022,7 @@ void LLPickInfo::getSurfaceInfo()
if (objectp)
{
- if (gViewerWindow->cursorIntersect(llmath::llround((F32)mMousePt.mX), llmath::llround((F32)mMousePt.mY), 1024.f,
+ if (gViewerWindow->cursorIntersect(ll_round((F32)mMousePt.mX), ll_round((F32)mMousePt.mY), 1024.f,
objectp, -1, mPickTransparent,
&mObjectFace,
&intersection,
@@ -6058,8 +6080,8 @@ LLVector2 LLPickInfo::pickUV()
objectp->mDrawable.notNull() && objectp->getPCode() == LL_PCODE_VOLUME &&
mObjectFace < objectp->mDrawable->getNumFaces())
{
- S32 scaled_x = llmath::llround((F32)mPickPt.mX * gViewerWindow->getDisplayScale().mV[VX]);
- S32 scaled_y = llmath::llround((F32)mPickPt.mY * gViewerWindow->getDisplayScale().mV[VY]);
+ S32 scaled_x = ll_round((F32)mPickPt.mX * gViewerWindow->getDisplayScale().mV[VX]);
+ S32 scaled_y = ll_round((F32)mPickPt.mY * gViewerWindow->getDisplayScale().mV[VY]);
const S32 UV_PICK_WIDTH = 5;
const S32 UV_PICK_HALF_WIDTH = (UV_PICK_WIDTH - 1) / 2;
U8 uv_pick_buffer[UV_PICK_WIDTH * UV_PICK_WIDTH * 4];
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp
index cf26bd695..1d6ef8de3 100644
--- a/indra/newview/llvlcomposition.cpp
+++ b/indra/newview/llvlcomposition.cpp
@@ -133,10 +133,10 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
- x_begin = llmath::llround( x * mScaleInv );
- y_begin = llmath::llround( y * mScaleInv );
- x_end = llmath::llround( (x + width) * mScaleInv );
- y_end = llmath::llround( (y + width) * mScaleInv );
+ x_begin = ll_round( x * mScaleInv );
+ y_begin = ll_round( y * mScaleInv );
+ x_end = ll_round( (x + width) * mScaleInv );
+ y_end = ll_round( (y + width) * mScaleInv );
if (x_end > mWidth)
{
@@ -328,8 +328,8 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y,
S32 x_begin, y_begin, x_end, y_end;
x_begin = (S32)(x * mScaleInv);
y_begin = (S32)(y * mScaleInv);
- x_end = llmath::llround( (x + width) * mScaleInv );
- y_end = llmath::llround( (y + width) * mScaleInv );
+ x_end = ll_round( (x + width) * mScaleInv );
+ y_end = ll_round( (y + width) * mScaleInv );
if (x_end > mWidth)
{
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a96d64d80..909956610 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -139,6 +139,11 @@ size_t strnlen(const char *s, size_t n)
}
#endif
+const F32 MAX_HOVER_Z = 2.0;
+const F32 MIN_HOVER_Z = -2.0;
+
+// #define OUTPUT_BREAST_DATA
+
using namespace LLAvatarAppearanceDefines;
//-----------------------------------------------------------------------------
@@ -903,48 +908,55 @@ const LLUUID SHClientTagMgr::getClientID(const LLVOAvatar* pAvatar) const
}
return tag.asUUID();
}
+bool getColorFor(const LLUUID& id, LLViewerRegion* parent_estate, LLColor4& color, bool name_restricted = false)
+{
+ static const LLCachedControl ascent_linden_color("AscentLindenColor");
+ static const LLCachedControl ascent_estate_owner_color("AscentEstateOwnerColor" );
+ static const LLCachedControl ascent_friend_color("AscentFriendColor");
+ static const LLCachedControl ascent_muted_color("AscentMutedColor");
+ //Lindens are always more Linden than your friend, make that take precedence
+ if (LLMuteList::getInstance()->isLinden(id))
+ color = ascent_linden_color;
+ //check if they are an estate owner at their current position
+ else if (parent_estate && parent_estate->isAlive() && id.notNull() && id == parent_estate->getOwner())
+ color = ascent_estate_owner_color;
+ //without these dots, SL would suck.
+ else if (!name_restricted && LLAvatarTracker::instance().isBuddy(id))
+ color = ascent_friend_color;
+ //big fat jerkface who is probably a jerk, display them as such.
+ else if (LLMuteList::getInstance()->isMuted(id))
+ color = ascent_muted_color;
+ else
+ return false;
+ return true;
+}
bool mm_getMarkerColor(const LLUUID&, LLColor4&);
+bool getCustomColor(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate)
+{
+ return mm_getMarkerColor(id, color) || getColorFor(id, parent_estate, color);
+}
+bool getCustomColorRLV(const LLUUID& id, LLColor4& color, LLViewerRegion* parent_estate, bool name_restricted)
+{
+ return mm_getMarkerColor(id, color) || getColorFor(id, parent_estate, color, name_restricted);
+}
bool SHClientTagMgr::getClientColor(const LLVOAvatar* pAvatar, bool check_status, LLColor4& color) const
{
- if (mm_getMarkerColor(pAvatar->getID(), color)) return true;
+ const LLUUID& id(pAvatar->getID());
+ if (mm_getMarkerColor(id, color)) return true;
static const LLCachedControl ascent_use_status_colors("AscentUseStatusColors",true);
static const LLCachedControl ascent_show_self_tag_color("AscentShowSelfTagColor");
static const LLCachedControl ascent_show_others_tag_color("AscentShowOthersTagColor");
- if(check_status && ascent_use_status_colors && !pAvatar->isSelf())
+ if (check_status && ascent_use_status_colors && !pAvatar->isSelf())
{
- LLViewerRegion* parent_estate = LLWorld::getInstance()->getRegionFromPosGlobal(pAvatar->getPositionGlobal());
- if(LLMuteList::getInstance()->isLinden(pAvatar->getFullname()))
- {
- static const LLCachedControl ascent_linden_color( "AscentLindenColor" );
- color = ascent_linden_color.get();
+ if (getColorFor(id, pAvatar->getRegion(), color, false))
return true;
- }
- else if(pAvatar->getID().notNull() && parent_estate && parent_estate->isAlive() && pAvatar->getID() == parent_estate->getOwner())
- {
- static const LLCachedControl ascent_estate_owner_color( "AscentEstateOwnerColor" );
- color = ascent_estate_owner_color.get();
- return true;
- }
- else if(LLAvatarTracker::instance().isBuddy(pAvatar->getID()))
- {
- static const LLCachedControl ascent_friend_color( "AscentFriendColor" );
- color = ascent_friend_color.get();
- return true;
- }
- else if(LLMuteList::getInstance()->isMuted(pAvatar->getID()))
- {
- static const LLCachedControl ascent_muted_color( "AscentMutedColor" );
- color = ascent_muted_color.get();
- return true;
- }
}
std::map::const_iterator it;
LLSD tag;
if(
- ((pAvatar->isSelf() && ascent_show_self_tag_color) ||
- (!pAvatar->isSelf() && ascent_show_others_tag_color)) &&
- (it = mAvatarTags.find(pAvatar->getID()))!=mAvatarTags.end() &&
+ (pAvatar->isSelf() ? ascent_show_self_tag_color : ascent_show_others_tag_color) &&
+ (it = mAvatarTags.find(id))!=mAvatarTags.end() &&
(tag = it->second.get("color")).isDefined())
{
color.setValue(tag);
@@ -1078,6 +1090,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mFreezeTimeLangolier = freeze_time;
//VTResume(); // VTune
+ setHoverOffset(LLVector3(0.0, 0.0, 0.0));
// mVoiceVisualizer is created by the hud effects manager and uses the HUD Effects pipeline
const bool needsSendToSim = false; // currently, this HUD effect doesn't need to pack and unpack data to do its job
@@ -3804,7 +3817,8 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
S32 central_bake_version = -1;
- if (getRegion())
+ LLViewerRegion* region = getRegion();
+ if (region)
{
central_bake_version = getRegion()->getCentralBakeVersion();
}
@@ -3817,9 +3831,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
mUseServerBakes, central_bake_version);
std::string origin_string = bakedTextureOriginInfo();
debug_line += " [" + origin_string + "]";
- S32 curr_cof_version = LLAppearanceMgr::instance().getCOFVersion();
- S32 last_request_cof_version = LLAppearanceMgr::instance().getLastUpdateRequestCOFVersion();
- S32 last_received_cof_version = LLAppearanceMgr::instance().getLastAppearanceUpdateCOFVersion();
+ const LLAppearanceMgr& appmgr(LLAppearanceMgr::instance());
+ S32 curr_cof_version = appmgr.getCOFVersion();
+ S32 last_request_cof_version = appmgr.getLastUpdateRequestCOFVersion();
+ S32 last_received_cof_version = appmgr.getLastAppearanceUpdateCOFVersion();
if (isSelf())
{
debug_line += llformat(" - cof: %d req: %d rcv:%d",
@@ -3829,6 +3844,16 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
{
debug_line += llformat(" - cof rcv:%d", last_received_cof_version);
}
+ debug_line += llformat(" bsz-z: %f avofs-z: %f", mBodySize[2], mAvatarOffset[2]);
+ bool hover_enabled = region && region->avatarHoverHeightEnabled();
+ debug_line += hover_enabled ? " H" : " h";
+ const LLVector3& hover_offset = getHoverOffset();
+ if (hover_offset[2] != 0.0)
+ {
+ debug_line += llformat(" hov_z: %f", hover_offset[2]);
+ debug_line += llformat(" %s", (mIsSitting ? "S" : "T"));
+ debug_line += llformat("%s", (isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED) ? "G" : "-"));
+ }
addDebugText(debug_line);
}
if (gSavedSettings.getBOOL("DebugAvatarCompositeBaked"))
@@ -4010,6 +4035,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
LLVector3 xyVel = getVelocity();
xyVel.mV[VZ] = 0.0f;
speed = xyVel.length();
+ // remembering the value here prevents a display glitch if the
+ // animation gets toggled during this update.
+ bool was_sit_ground_constrained = isMotionActive(ANIM_AGENT_SIT_GROUND_CONSTRAINED);
if (!(mIsSitting && getParent()))
{
@@ -4066,6 +4094,10 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
// correct for the fact that the pelvis is not necessarily the center
// of the agent's physical representation
root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
+ if (!mIsSitting && !was_sit_ground_constrained)
+ {
+ root_pos += LLVector3d(getHoverOffset());
+ }
LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos);
@@ -4243,8 +4275,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
}
else if (mDrawable.notNull())
{
- mRoot->setPosition(mDrawable->getPosition());
- mRoot->setRotation(mDrawable->getRotation());
+ LLVector3 pos = mDrawable->getPosition();
+ const LLQuaternion& rot = mDrawable->getRotation();
+ pos += getHoverOffset() * rot;
+ mRoot->setPosition(pos);
+ mRoot->setRotation(rot);
}
//-------------------------------------------------------------------------
@@ -4259,6 +4294,19 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
else
updateMotions(LLCharacter::NORMAL_UPDATE);
+ // Special handling for sitting on ground.
+ if (!getParent() && (mIsSitting || was_sit_ground_constrained))
+ {
+ F32 off_z = LLVector3d(getHoverOffset()).mdV[VZ];
+ if (off_z != 0.0)
+ {
+ LLVector3 pos = mRoot->getWorldPosition();
+ pos.mV[VZ] += off_z;
+ mRoot->touch();
+ mRoot->setWorldPosition(pos);
+ }
+ }
+
// update head position
updateHeadOffset();
@@ -7921,6 +7969,8 @@ struct LLAppearanceMessageContents
//U32 appearance_flags = 0;
std::vector mParamWeights;
std::vector mParams;
+ LLVector3 mHoverOffset;
+ bool mHoverOffsetWasSet;
};
void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMessageContents& contents)
@@ -7939,6 +7989,17 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
//mesgsys->getU32Fast(_PREHASH_AppearanceData, _PREHASH_Flags, appearance_flags, 0);
}
+ // Parse the AppearanceHover field, if any.
+ contents.mHoverOffsetWasSet = false;
+ if (mesgsys->has(_PREHASH_AppearanceHover))
+ {
+ LLVector3 hover;
+ mesgsys->getVector3Fast(_PREHASH_AppearanceHover, _PREHASH_HoverHeight, hover);
+ LL_DEBUGS("Avatar") << avString() << " hover received " << hover.mV[ VX ] << "," << hover.mV[ VY ] << "," << hover.mV[ VZ ] << LL_ENDL;
+ contents.mHoverOffset = hover;
+ contents.mHoverOffsetWasSet = true;
+ }
+
// Parse visual params, if any.
S32 num_blocks = mesgsys->getNumberOfBlocksFast(_PREHASH_VisualParam);
bool drop_visual_params_debug = gSavedSettings.getBOOL("BlockSomeAvatarAppearanceVisualParams") && (ll_rand(2) == 0); // pretend that ~12% of AvatarAppearance messages arrived without a VisualParam block, for testing
@@ -8002,7 +8063,7 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
if (it != contents.mParams.end())
{
S32 index = it - contents.mParams.begin();
- contents.mParamAppearanceVersion = llmath::llround(contents.mParamWeights[index]);
+ contents.mParamAppearanceVersion = ll_round(contents.mParamWeights[index]);
LL_DEBUGS("Avatar") << "appversion req by appearance_version param: " << contents.mParamAppearanceVersion << LL_ENDL;
}
}
@@ -8251,6 +8312,22 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
}
}
+ if (contents.mHoverOffsetWasSet && !isSelf())
+ {
+ // Got an update for some other avatar
+ // Ignore updates for self, because we have a more authoritative value in the preferences.
+ setHoverOffset(contents.mHoverOffset);
+ LL_INFOS("Avatar") << avString() << "setting hover from message" << contents.mHoverOffset[2] << LL_ENDL;
+ }
+
+ if (!contents.mHoverOffsetWasSet && !isSelf())
+ {
+ // If we don't get a value at all, we are presumably in a
+ // region that does not support hover height.
+ llwarns << avString() << "zeroing hover because not defined in appearance message" << LL_ENDL;
+ setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+ }
+
setCompositeUpdatesEnabled( TRUE );
// If all of the avatars are completely baked, release the global image caches to conserve memory.
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 6dd1f0b71..ba38d5be1 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -1076,6 +1076,9 @@ private:
extern const F32 SELF_ADDITIONAL_PRI;
extern const S32 MAX_TEXTURE_VIRTUAL_SIZE_RESET_INTERVAL;
+extern const F32 MAX_HOVER_Z;
+extern const F32 MIN_HOVER_Z;
+
void dump_sequential_xml(const std::string outprefix, const LLSD& content);
#endif // LL_VOAVATAR_H
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index c77914e36..9a17ba3e6 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -136,6 +136,11 @@ struct LocalTextureData
LLTextureEntry *mTexEntry;
};
+// TODO - this class doesn't really do anything, could just use a base
+// class responder if nothing else gets added.
+// Singu Note: Okay, sure, it's a responder ignore then!
+typedef LLHTTPClient::ResponderIgnore LLHoverHeightResponder;
+
//-----------------------------------------------------------------------------
// Callback data
//-----------------------------------------------------------------------------
@@ -172,7 +177,10 @@ LLVOAvatarSelf::LLVOAvatarSelf(const LLUUID& id,
mScreenp(NULL),
mLastRegionHandle(0),
mRegionCrossingCount(0),
- mInitialBakesLoaded(false)
+ mInitialBakesLoaded(false),
+ // Value outside legal range, so will always be a mismatch the
+ // first time through.
+ mLastHoverOffsetSent(LLVector3(0.0f, 0.0f, -999.0f))
{
gAgentWearables.setAvatarObject(this);
gAgentCamera.setAvatarObject(this);
@@ -259,11 +267,40 @@ void LLVOAvatarSelf::initInstance()
return;
}
+ setHoverIfRegionEnabled();
+
//doPeriodically(output_self_av_texture_diagnostics, 30.0);
doPeriodically(update_avatar_rez_metrics, 5.0);
doPeriodically(check_for_unsupported_baked_appearance, 120.0);
}
+void LLVOAvatarSelf::setHoverIfRegionEnabled()
+{
+ LLViewerRegion* region = getRegion();
+ if (region && region->simulatorFeaturesReceived())
+ {
+ if (region->avatarHoverHeightEnabled())
+ {
+ F32 hover_z = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
+ setHoverOffset(LLVector3(0.0, 0.0, llclamp(hover_z,MIN_HOVER_Z,MAX_HOVER_Z)));
+ LL_INFOS("Avatar") << avString() << " set hover height from debug setting " << hover_z << LL_ENDL;
+ }
+ else
+ {
+ setHoverOffset(LLVector3(0.0, 0.0, 0.0));
+ LL_INFOS("Avatar") << avString() << " zeroing hover height, region does not support" << LL_ENDL;
+ }
+ }
+ else
+ {
+ LL_INFOS("Avatar") << avString() << " region or simulator features not known, no change on hover" << LL_ENDL;
+ if (region)
+ {
+ region->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
+ }
+ }
+}
+
// virtual
void LLVOAvatarSelf::markDead()
{
@@ -808,6 +845,12 @@ void LLVOAvatarSelf::removeMissingBakedTextures()
}
}
+void LLVOAvatarSelf::onSimulatorFeaturesReceived(const LLUUID& region_id)
+{
+ LL_INFOS("Avatar") << "simulator features received, setting hover based on region props" << LL_ENDL;
+ setHoverIfRegionEnabled();
+}
+
//virtual
void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
{
@@ -826,6 +869,17 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
//LL_INFOS() << "pos_from_old_region is " << global_pos_from_old_region
// << " while pos_from_new_region is " << pos_from_new_region
// << LL_ENDL;
+
+ // Update hover height, or schedule callback, based on whether
+ // it's supported in this region.
+ if (regionp->simulatorFeaturesReceived())
+ {
+ setHoverIfRegionEnabled();
+ }
+ else
+ {
+ regionp->setSimulatorFeaturesReceivedCallback(boost::bind(&LLVOAvatarSelf::onSimulatorFeaturesReceived,this,_1));
+ }
}
if (!regionp || (regionp->getHandle() != mLastRegionHandle))
@@ -3051,6 +3105,39 @@ bool LLVOAvatarSelf::sendAppearanceMessage(LLMessageSystem *mesgsys) const
return success;
}
+//------------------------------------------------------------------------
+// sendHoverHeight()
+//------------------------------------------------------------------------
+void LLVOAvatarSelf::sendHoverHeight() const
+{
+ std::string url = gAgent.getRegion()->getCapability("AgentPreferences");
+
+ if (!url.empty())
+ {
+ LLSD update = LLSD::emptyMap();
+ const LLVector3& hover_offset = getHoverOffset();
+ update["hover_height"] = hover_offset[2];
+
+ LL_DEBUGS("Avatar") << avString() << "sending hover height value " << hover_offset[2] << LL_ENDL;
+ LLHTTPClient::post(url, update, new LLHoverHeightResponder);
+
+ mLastHoverOffsetSent = hover_offset;
+ }
+}
+
+void LLVOAvatarSelf::setHoverOffset(const LLVector3& hover_offset, bool send_update)
+{
+ if (getHoverOffset() != hover_offset)
+ {
+ LL_INFOS("Avatar") << avString() << " setting hover due to change " << hover_offset[2] << LL_ENDL;
+ LLVOAvatar::setHoverOffset(hover_offset, send_update);
+ }
+ if (send_update && (hover_offset != mLastHoverOffsetSent))
+ {
+ LL_INFOS("Avatar") << avString() << " sending hover due to change " << hover_offset[2] << LL_ENDL;
+ sendHoverHeight();
+ }
+}
//------------------------------------------------------------------------
// needsRenderBeam()
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index fea466775..4de2ac8f6 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -84,6 +84,9 @@ protected:
// LLViewerObject interface and related
//--------------------------------------------------------------------
public:
+ boost::signals2::connection mRegionChangedSlot;
+
+ void onSimulatorFeaturesReceived(const LLUUID& region_id);
/*virtual*/ void updateRegion(LLViewerRegion *regionp);
/*virtual*/ void idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
@@ -356,6 +359,14 @@ public:
public:
bool sendAppearanceMessage(LLMessageSystem *mesgsys) const;
+ // -- care and feeding of hover height.
+ void setHoverIfRegionEnabled();
+ void sendHoverHeight() const;
+ /*virtual*/ void setHoverOffset(const LLVector3& hover_offset, bool send_update=true);
+
+private:
+ mutable LLVector3 mLastHoverOffsetSent;
+
public:
LLVector3 getLegacyAvatarOffset() const;
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index ebffc93ec..ce1d09041 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -2647,7 +2647,7 @@ void LLVivoxVoiceClient::sendPositionalUpdate(void)
if(!p->mIsSelf)
{
// scale from the range 0.0-1.0 to vivox volume in the range 0-100
- S32 volume = llmath::llround(p->mVolume / VOLUME_SCALE_VIVOX);
+ S32 volume = ll_round(p->mVolume / VOLUME_SCALE_VIVOX);
bool mute = p->mOnMuteList;
if(mute)
@@ -3713,7 +3713,7 @@ void LLVivoxVoiceClient::messageEvent(
sessionState *session = findSession(sessionHandle);
if(session)
{
- bool is_do_not_disturb = gAgent.getBusy();
+ bool is_do_not_disturb = gAgent.isDoNotDisturb();
bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat);
bool is_linden = LLMuteList::getInstance()->isLinden(session->mName);
LLChat chat;
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 045713b03..d6973f848 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -700,7 +700,7 @@ void LLVOPartGroup::getGeometry(S32 idx,
}
else
{
- pglow = LLColor4U(0, 0, 0, (U8) llmath::llround(255.f*part.mStartGlow));
+ pglow = LLColor4U(0, 0, 0, (U8) ll_round(255.f*part.mStartGlow));
pcolor = part.mStartColor;
}
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index a8a9ec104..e25bc88b1 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1210,7 +1210,7 @@ S32 LLVOVolume::computeLODDetail(F32 distance, F32 radius)
{
// We've got LOD in the profile, and in the twist. Use radius.
F32 tan_angle = (LLVOVolume::sLODFactor*radius)/distance;
- cur_detail = LLVolumeLODGroup::getDetailFromTan(llmath::llround(tan_angle, 0.01f));
+ cur_detail = LLVolumeLODGroup::getDetailFromTan(ll_round(tan_angle, 0.01f));
}
else
{
@@ -1257,8 +1257,8 @@ BOOL LLVOVolume::calcLOD()
// DON'T Compensate for field of view changing on FOV zoom.
distance *= F_PI/3.f;
- cur_detail = computeLODDetail(llmath::llround(distance, 0.01f),
- llmath::llround(radius, 0.01f));
+ cur_detail = computeLODDetail(ll_round(distance, 0.01f),
+ ll_round(radius, 0.01f));
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_LOD_INFO) &&
@@ -1271,7 +1271,7 @@ BOOL LLVOVolume::calcLOD()
if (cur_detail != mLOD)
{
- mAppAngle = llmath::llround((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
+ mAppAngle = ll_round((F32) atan2( mDrawable->getRadius(), mDrawable->mDistanceWRTCamera) * RAD_TO_DEG, 0.01f);
mLOD = cur_detail;
return TRUE;
}
@@ -4903,7 +4903,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
}
}
/*LLColor4 clr = facep->getFaceColor();
- LLColor4U clru = LLColor4U(llmath::llround(clr.mV[0] * 255.f), llmath::llround(clr.mV[0] * 255.f), llmath::llround(clr.mV[0] * 255.f), llmath::llround(clr.mV[0] * 255.f));
+ LLColor4U clru = LLColor4U(ll_round(clr.mV[0] * 255.f), ll_round(clr.mV[0] * 255.f), ll_round(clr.mV[0] * 255.f), ll_round(clr.mV[0] * 255.f));
if(clru.mV[0] == 164 && clru.mV[1] == 106 && clr.mV[2] == 65)
{
llinfos << "Facepool = " << type << " alpha = " << clr.mV[3] << llendl;
diff --git a/indra/newview/llwlanimator.cpp b/indra/newview/llwlanimator.cpp
index 3bdc1ae5e..2d4983416 100644
--- a/indra/newview/llwlanimator.cpp
+++ b/indra/newview/llwlanimator.cpp
@@ -267,7 +267,7 @@ std::string LLWLAnimator::timeToString(F32 curTime)
// get hours and minutes
hours = (S32) (24.0 * curTime);
curTime -= ((F32) hours / 24.0f);
- min = llmath::llround(24.0f * 60.0f * curTime);
+ min = ll_round(24.0f * 60.0f * curTime);
// handle case where it's 60
if(min == 60)
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index d83f6013c..8af33dee9 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -142,6 +142,7 @@ void LLWorld::destroyClass()
LLViewerRegion* region_to_delete = *region_it++;
removeRegion(region_to_delete->getHost());
}
+
if(LLVOCache::hasInstance())
{
LLVOCache::getInstance()->destroyClass() ;
@@ -181,7 +182,8 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
if (host != old_host)
{
llwarns << "LLWorld::addRegion exists, but old host " << old_host
- << " does not match new host " << host << llendl;
+ << " does not match new host " << host
+ << ", removing old region and creating new" << LL_ENDL;
}
if (!regionp->isAlive())
{
@@ -207,7 +209,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host)
S32 y = (S32)(jindex/256); //MegaRegion
// Aurora Sim
llinfos << "Adding new region (" << x << ":" << y << ")"
- << " on host: " << host << llendl;
+ << " on host: " << host << LL_ENDL;
LLVector3d origin_global;
@@ -321,12 +323,12 @@ void LLWorld::removeRegion(const LLHost &host)
llwarns << "RegionDump: " << reg->getName()
<< " " << reg->getHost()
<< " " << reg->getOriginGlobal()
- << llendl;
+ << LL_ENDL;
}
llwarns << "Agent position global " << gAgent.getPositionGlobal()
<< " agent " << gAgent.getPositionAgent()
- << llendl;
+ << LL_ENDL;
llwarns << "Regions visited " << gAgent.getRegionsVisited() << llendl;
@@ -349,13 +351,13 @@ void LLWorld::removeRegion(const LLHost &host)
mRegionRemovedSignal(regionp);
+ updateWaterObjects();
+
//double check all objects of this region are removed.
gObjectList.clearAllMapObjectsInRegion(regionp) ;
//llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;
- updateWaterObjects();
-
- delete regionp;
+ delete regionp; // - Use after free fix?
}
@@ -698,7 +700,8 @@ void LLWorld::updateVisibilities()
if (part)
{
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
- if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->mBounds;
+ if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1]))
{
mCulledRegionList.erase(curiter);
mVisibleRegionList.push_back(regionp);
@@ -721,13 +724,11 @@ void LLWorld::updateVisibilities()
if (part)
{
LLSpatialGroup* group = (LLSpatialGroup*) part->mOctree->getListener(0);
- if (LLViewerCamera::getInstance()->AABBInFrustum(group->mBounds[0], group->mBounds[1]))
+ const LLVector4a* bounds = group->mBounds;
+ if (LLViewerCamera::getInstance()->AABBInFrustum(bounds[0], bounds[1]))
{
regionp->calculateCameraDistance();
- if (!gNoRender)
- {
- regionp->getLand().updatePatchVisibilities(gAgent);
- }
+ regionp->getLand().updatePatchVisibilities(gAgent);
}
else
{
@@ -910,7 +911,7 @@ void LLWorld::printPacketsLost()
LLVector3d range = regionp->getCenterGlobal() - gAgent.getPositionGlobal();
llinfos << regionp->getHost() << ", range: " << range.length()
- << " packets lost: " << cdp->getPacketsLost() << llendl;
+ << " packets lost: " << cdp->getPacketsLost() << LL_ENDL;
}
}
}
@@ -1124,7 +1125,7 @@ void LLWorld::updateWaterObjects()
// Count the found coastline.
F32 new_water_height = water_heights[index];
LL_DEBUGS("WaterHeight") << " This is void; counting coastline with water height of " << new_water_height << LL_ENDL;
- S32 new_water_height_cm = llmath::llround(new_water_height * 100);
+ S32 new_water_height_cm = ll_round(new_water_height * 100);
int count = (water_height_counts[new_water_height_cm] += 1);
// Just use the lowest water height: this is mainly about the horizon water,
// and whatever we do, we don't want it to be possible to look under the water
@@ -1358,8 +1359,9 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data)
if (!gAgent.getRegion())
return;
- static const LLCachedControl connectToNeighbors(gSavedSettings, "AlchemyConnectToNeighbors");
- if (!connectToNeighbors && ((gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL) || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)))
+ static LLCachedControl connectToNeighbors(gSavedSettings, "AlchemyConnectToNeighbors");
+ if ((!connectToNeighbors) && ((gAgent.getTeleportState() == LLAgent::TELEPORT_LOCAL)
+ || (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE)))
return;
// enable the appropriate circuit for this simulator and
@@ -1428,7 +1430,7 @@ public:
if (!regionp)
{
llwarns << "Got EstablishAgentCommunication for unknown region "
- << sim << llendl;
+ << sim << LL_ENDL;
return;
}
regionp->setSeedCapability(input["body"]["seed-capability"]);
@@ -1441,7 +1443,7 @@ void process_disable_simulator(LLMessageSystem *mesgsys, void **user_data)
{
LLHost host = mesgsys->getSender();
- //llinfos << "Disabling simulator with message from " << host << llendl;
+ //LL_INFOS() << "Disabling simulator with message from " << host << LL_ENDL;
LLWorld::getInstance()->removeRegion(host);
mesgsys->disableCircuit(host);
@@ -1455,7 +1457,7 @@ void process_region_handshake(LLMessageSystem* msg, void** user_data)
if (!regionp)
{
llwarns << "Got region handshake for unknown region "
- << host << llendl;
+ << host << LL_ENDL;
return;
}
@@ -1539,7 +1541,7 @@ static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3
return region_origin + pos_local;
}
-void LLWorld::getAvatars(std::vector* avatar_ids, std::vector* positions, const LLVector3d& relative_to, F32 radius) const
+void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector* positions, const LLVector3d& relative_to, F32 radius) const
{
F32 radius_squared = radius * radius;
@@ -1578,8 +1580,8 @@ void LLWorld::getAvatars(std::vector* avatar_ids, std::vectorgetRegionList().begin();
- iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+ for (LLWorld::region_list_t::const_iterator iter = getRegionList().begin();
+ iter != getRegionList().end(); ++iter)
{
LLViewerRegion* regionp = *iter;
const LLVector3d& origin_global = regionp->getOriginGlobal();
@@ -1604,6 +1606,56 @@ void LLWorld::getAvatars(std::vector* avatar_ids, std::vectorempty())
+ {
+ umap->clear();
+ }
+ // get the list of avatars from the character list first, so distances are correct
+ // when agent is above 1020m and other avatars are nearby
+ for (std::vector::iterator iter = LLCharacter::sInstances.begin();
+ iter != LLCharacter::sInstances.end(); ++iter)
+ {
+ LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
+
+ if (!pVOAvatar->isDead() && !pVOAvatar->isSelf() && !pVOAvatar->mIsDummy)
+ {
+ LLVector3d pos_global = pVOAvatar->getPositionGlobal();
+ LLUUID uuid = pVOAvatar->getID();
+
+ if (!uuid.isNull()
+ && dist_vec_squared(pos_global, relative_to) <= radius_squared)
+ {
+ umap->emplace(uuid, pos_global);
+ }
+ }
+ }
+ // region avatars added for situations where radius is greater than RenderFarClip
+ for (LLWorld::region_list_t::const_iterator iter = getRegionList().begin();
+ iter != getRegionList().end(); ++iter)
+ {
+ LLViewerRegion* regionp = *iter;
+ const LLVector3d& origin_global = regionp->getOriginGlobal();
+ S32 count = regionp->mMapAvatars.count();
+ for (S32 i = 0; i < count; i++)
+ {
+ LLVector3d pos_global = unpackLocalToGlobalPosition(regionp->mMapAvatars.get(i), origin_global);
+ if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
+ {
+ LLUUID uuid = regionp->mMapAvatarIDs.get(i);
+ // if this avatar doesn't already exist in the list, add it
+ if(uuid.notNull())
+ {
+ umap->emplace(uuid, pos_global);
+ }
+ }
+ }
+ }
+}
+
bool LLWorld::isRegionListed(const LLViewerRegion* region) const
{
region_list_t::const_iterator it = find(mRegionList.begin(), mRegionList.end(), region);
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index b363d0d67..fa65c364a 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -167,10 +167,15 @@ public:
// All arguments are optional. Given containers will be emptied and then filled.
// Not supplying origin or radius input returns data on all avatars in the known regions.
void getAvatars(
- std::vector* avatar_ids = NULL,
+ uuid_vec_t* avatar_ids = NULL,
std::vector* positions = NULL,
const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const;
+ typedef boost::unordered_map pos_map_t;
+ void getAvatars(pos_map_t* map,
+ const LLVector3d& relative_to = LLVector3d(),
+ F32 radius = FLT_MAX) const;
+
// Returns 'true' if the region is in mRegionList,
// 'false' if the region has been removed due to region change
// or if the circuit to this simulator had been lost.
diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp
index 37db6e081..1770aeacd 100644
--- a/indra/newview/llworldmap.cpp
+++ b/indra/newview/llworldmap.cpp
@@ -54,7 +54,7 @@
bool LLWorldMap::sGotMapURL = false;
// Timers to temporise database requests
-const F32 AGENTS_UPDATE_TIMER = 60.0; // Seconds between 2 agent requests for a region
+const F32 AGENTS_UPDATE_TIMER = 30.0; // Seconds between 2 agent requests for a region
const F32 REQUEST_ITEMS_TIMER = 10.f * 60.f; // Seconds before we consider re-requesting item data for the grid
//---------------------------------------------------------------------------
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index 7037d9f05..17e312b1f 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -157,6 +157,8 @@ public:
const std::string getFlagsString() const { return LLViewerRegion::regionFlagsToString(mRegionFlags); }
const U64 getRegionFlags() const { return mRegionFlags; }
const std::string getAccessString() const { return LLViewerRegion::accessToString((U8)mAccess); }
+ const std::string getShortAccessString() const { return LLViewerRegion::accessToShortString(static_cast(mAccess)); } //
+ const std::string getAccessIcon() const { return LLViewerRegion::getAccessIcon(static_cast(mAccess)); }
const U8 getAccess() const { return mAccess; }
const S32 getAgentCount() const; // Compute the total agents count
LLPointer getLandForSaleImage(); // Get the overlay image, fetch it if necessary
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index 3742ba4df..0baca364d 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -467,9 +467,9 @@ void LLWorldMapView::draw()
if (overlayimage)
{
// Inform the fetch mechanism of the size we need
- S32 draw_size = llmath::llround(sMapScale);
- overlayimage->setKnownDrawSize( llmath::llround(draw_size * LLUI::getScaleFactor().mV[VX] * ((F32)info->getSizeX() / REGION_WIDTH_METERS)),
- llmath::llround(draw_size * LLUI::getScaleFactor().mV[VY] * ((F32)info->getSizeY() / REGION_WIDTH_METERS)));
+ S32 draw_size = ll_round(sMapScale);
+ overlayimage->setKnownDrawSize( ll_round(draw_size * LLUI::getScaleFactor().mV[VX] * ((F32)info->getSizeX() / REGION_WIDTH_METERS)),
+ ll_round(draw_size * LLUI::getScaleFactor().mV[VY] * ((F32)info->getSizeY() / REGION_WIDTH_METERS)));
// Draw something whenever we have enough info
if (overlayimage->hasGLTexture() && !overlayimage->isMissingAsset() && overlayimage->getID() != IMG_DEFAULT)
{
@@ -674,14 +674,14 @@ void LLWorldMapView::draw()
drawImage(pos_global, sAvatarYouImage);
LLVector3 pos_map = globalPosToView(pos_global);
- if (!pointInView(llmath::llround(pos_map.mV[VX]), llmath::llround(pos_map.mV[VY])))
+ if (!pointInView(ll_round(pos_map.mV[VX]), ll_round(pos_map.mV[VY])))
{
drawTracking(pos_global,
lerp(LLColor4::yellow, LLColor4::orange, 0.4f),
TRUE,
"You are here",
"",
- llmath::llround(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking
+ ll_round(LLFontGL::getFontSansSerifSmall()->getLineHeight())); // offset vertically by one line, to avoid overlap with target tracking
}
// Show your viewing angle
@@ -823,8 +823,8 @@ void LLWorldMapView::drawLegacyBackgroundLayers(S32 width, S32 height) {
}
current_image->setBoostLevel(LLGLTexture::BOOST_MAP);
- current_image->setKnownDrawSize(llmath::llround(pix_width * LLUI::getScaleFactor().mV[VX]),
- llmath::llround(pix_height * LLUI::getScaleFactor().mV[VY]));
+ current_image->setKnownDrawSize(ll_round(pix_width * LLUI::getScaleFactor().mV[VX]),
+ ll_round(pix_height * LLUI::getScaleFactor().mV[VY]));
if (!current_image->hasGLTexture()) //Still loading.
{
@@ -911,9 +911,9 @@ F32 LLWorldMapView::drawLegacySimTile(LLSimInfo& sim_info, S32 left, S32 top, S3
//call setKnownDrawSize if image is still loading, or its actually being drawn.
if(sim_fetching || alpha >= ALPHA_CUTOFF)
{
- S32 draw_size = llmath::llround(sMapScale);
- simimage->setKnownDrawSize( llmath::llround(draw_size * LLUI::getScaleFactor().mV[VX] * ((F32)sim_info.getSizeX() / REGION_WIDTH_METERS)),
- llmath::llround(draw_size * LLUI::getScaleFactor().mV[VY] * ((F32)sim_info.getSizeY() / REGION_WIDTH_METERS)));
+ S32 draw_size = ll_round(sMapScale);
+ simimage->setKnownDrawSize( ll_round(draw_size * LLUI::getScaleFactor().mV[VX] * ((F32)sim_info.getSizeX() / REGION_WIDTH_METERS)),
+ ll_round(draw_size * LLUI::getScaleFactor().mV[VY] * ((F32)sim_info.getSizeY() / REGION_WIDTH_METERS)));
simimage->setBoostLevel(LLGLTexture::BOOST_MAP);
if(alpha >= ALPHA_CUTOFF)
{
@@ -1128,8 +1128,8 @@ void LLWorldMapView::drawGenericItem(const LLItemInfo& item, LLUIImagePtr image)
void LLWorldMapView::drawImage(const LLVector3d& global_pos, LLUIImagePtr image, const LLColor4& color)
{
LLVector3 pos_map = globalPosToView( global_pos );
- image->draw(llmath::llround(pos_map.mV[VX] - image->getWidth() /2.f),
- llmath::llround(pos_map.mV[VY] - image->getHeight()/2.f),
+ image->draw(ll_round(pos_map.mV[VX] - image->getWidth() /2.f),
+ ll_round(pos_map.mV[VY] - image->getHeight()/2.f),
color);
}
@@ -1138,8 +1138,8 @@ void LLWorldMapView::drawImageStack(const LLVector3d& global_pos, LLUIImagePtr i
LLVector3 pos_map = globalPosToView( global_pos );
for(U32 i=0; idraw(llmath::llround(pos_map.mV[VX] - image->getWidth() /2.f),
- llmath::llround(pos_map.mV[VY] - image->getHeight()/2.f + i*offset),
+ image->draw(ll_round(pos_map.mV[VX] - image->getWidth() /2.f),
+ ll_round(pos_map.mV[VY] - image->getHeight()/2.f + i*offset),
color);
}
}
@@ -1323,8 +1323,8 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
const std::string& label, const std::string& tooltip, S32 vert_offset )
{
LLVector3 pos_local = globalPosToView( pos_global );
- S32 x = llmath::llround( pos_local.mV[VX] );
- S32 y = llmath::llround( pos_local.mV[VY] );
+ S32 x = ll_round( pos_local.mV[VX] );
+ S32 y = ll_round( pos_local.mV[VY] );
LLFontGL* font = LLFontGL::getFontSansSerifSmall();
S32 text_x = x;
S32 text_y = (S32)(y - sTrackCircleImage->getHeight()/2 - font->getLineHeight());
@@ -1356,7 +1356,7 @@ void LLWorldMapView::drawTracking(const LLVector3d& pos_global, const LLColor4&
const S32 TEXT_PADDING = DEFAULT_TRACKING_ARROW_SIZE + 2;
S32 half_text_width = llfloor(font->getWidthF32(label) * 0.5f);
text_x = llclamp(text_x, half_text_width + TEXT_PADDING, getRect().getWidth() - half_text_width - TEXT_PADDING);
- text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - llmath::llround(font->getLineHeight()) - TEXT_PADDING - vert_offset);
+ text_y = llclamp(text_y + vert_offset, TEXT_PADDING + vert_offset, getRect().getHeight() - ll_round(font->getLineHeight()) - TEXT_PADDING - vert_offset);
//if (label != "")
// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.4.5) | Added: RLVa-1.0.0
@@ -1484,8 +1484,8 @@ static void drawDot(F32 x_pixels, F32 y_pixels,
if(-HEIGHT_THRESHOLD <= relative_z && relative_z <= HEIGHT_THRESHOLD)
{
- dot_image->draw(llmath::llround(x_pixels) - dot_image->getWidth()/2,
- llmath::llround(y_pixels) - dot_image->getHeight()/2,
+ dot_image->draw(ll_round(x_pixels) - dot_image->getWidth()/2,
+ ll_round(y_pixels) - dot_image->getHeight()/2,
color);
}
else
@@ -1540,9 +1540,9 @@ void LLWorldMapView::drawAvatar(F32 x_pixels,
dot_image = sAvatarAboveImage;
}
- S32 dot_width = llmath::llround(dot_radius * 2.f);
- dot_image->draw(llmath::llround(x_pixels - dot_radius),
- llmath::llround(y_pixels - dot_radius),
+ S32 dot_width = ll_round(dot_radius * 2.f);
+ dot_image->draw(ll_round(x_pixels - dot_radius),
+ ll_round(y_pixels - dot_radius),
dot_width,
dot_width,
color);
@@ -1569,8 +1569,8 @@ void LLWorldMapView::drawIconName(F32 x_pixels,
const std::string& second_line)
{
const S32 VERT_PAD = 8;
- S32 text_x = llmath::llround(x_pixels);
- S32 text_y = llmath::llround(y_pixels
+ S32 text_x = ll_round(x_pixels);
+ S32 text_y = ll_round(y_pixels
- BIG_DOT_RADIUS
- VERT_PAD);
@@ -1584,7 +1584,7 @@ void LLWorldMapView::drawIconName(F32 x_pixels,
LLFontGL::NORMAL,
LLFontGL::DROP_SHADOW);
- text_y -= llmath::llround(LLFontGL::getFontSansSerif()->getLineHeight());
+ text_y -= ll_round(LLFontGL::getFontSansSerif()->getLineHeight());
// render text
LLFontGL::getFontSansSerif()->renderUTF8(second_line, 0,
@@ -1758,8 +1758,8 @@ void LLWorldMapView::setDirectionPos( LLTextBox* text_box, F32 rotation )
F32 radius = llmin( map_half_height - text_half_height, map_half_width - text_half_width );
text_box->setOrigin(
- llmath::llround(map_half_width - text_half_width + radius * cos( rotation )),
- llmath::llround(map_half_height - text_half_height + radius * sin( rotation )) );
+ ll_round(map_half_width - text_half_width + radius * cos( rotation )),
+ ll_round(map_half_height - text_half_height + radius * sin( rotation )) );
}
@@ -1807,8 +1807,8 @@ void LLWorldMapView::reshape( S32 width, S32 height, BOOL called_from_parent )
bool LLWorldMapView::checkItemHit(S32 x, S32 y, LLItemInfo& item, LLUUID* id, bool track)
{
LLVector3 pos_view = globalPosToView(item.getGlobalPosition());
- S32 item_x = llmath::llround(pos_view.mV[VX]);
- S32 item_y = llmath::llround(pos_view.mV[VY]);
+ S32 item_x = ll_round(pos_view.mV[VX]);
+ S32 item_y = ll_round(pos_view.mV[VY]);
if (x < item_x - BIG_DOT_RADIUS) return false;
if (x > item_x + BIG_DOT_RADIUS) return false;
@@ -1983,8 +1983,8 @@ BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
{
gFocusMgr.setMouseCapture( this );
- mMouseDownPanX = llmath::llround(sPanX);
- mMouseDownPanY = llmath::llround(sPanY);
+ mMouseDownPanX = ll_round(sPanX);
+ mMouseDownPanY = ll_round(sPanY);
mMouseDownX = x;
mMouseDownY = y;
sHandledLastClick = TRUE;
diff --git a/indra/newview/rlvhandler.h b/indra/newview/rlvhandler.h
index c672608e9..3fd7c733e 100644
--- a/indra/newview/rlvhandler.h
+++ b/indra/newview/rlvhandler.h
@@ -20,7 +20,7 @@
#include
#include "rlvcommon.h"
-#if LL_GNUC || LL_ICC || LL_CLANG
+#if LL_GNUC || LL_INTELC || LL_CLANG
#include "rlvhelper.h" // Needed to make GCC happy
#endif // LL_GNUC
diff --git a/indra/newview/scriptcounter.cpp b/indra/newview/scriptcounter.cpp
index 61219980b..f6f53c067 100644
--- a/indra/newview/scriptcounter.cpp
+++ b/indra/newview/scriptcounter.cpp
@@ -40,7 +40,7 @@
#include "llvoavatar.h"
#include "stringize.h"
-void cmdline_printchat(std::string chat);
+void cmdline_printchat(const std::string& message);
LLVOAvatar* find_avatar_from_object( LLViewerObject* object );
diff --git a/indra/newview/shcommandhandler.cpp b/indra/newview/shcommandhandler.cpp
index c6229ad0e..fc0856bf8 100644
--- a/indra/newview/shcommandhandler.cpp
+++ b/indra/newview/shcommandhandler.cpp
@@ -170,7 +170,7 @@ CMD_SCRIPT(gettext)
#include "llphysicsmotion.h"
-void cmdline_printchat(std::string message);
+void cmdline_printchat(const std::string& message);
CMD_CHAT(physparams)
{
//args[1] = avatar name
diff --git a/indra/newview/skins/dark/textures/icn_toolbar_region_tracker.png b/indra/newview/skins/dark/textures/icn_toolbar_region_tracker.png
new file mode 100644
index 000000000..aef16414f
Binary files /dev/null and b/indra/newview/skins/dark/textures/icn_toolbar_region_tracker.png differ
diff --git a/indra/newview/skins/default/textures/icn_toolbar_region_tracker.png b/indra/newview/skins/default/textures/icn_toolbar_region_tracker.png
new file mode 100644
index 000000000..49e5d11a2
Binary files /dev/null and b/indra/newview/skins/default/textures/icn_toolbar_region_tracker.png differ
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index 574f2b3a7..b6420d4e0 100644
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -162,8 +162,6 @@
-
-
@@ -416,4 +414,7 @@
+
+
+
diff --git a/indra/newview/skins/default/xui/de/floater_area_search.xml b/indra/newview/skins/default/xui/de/floater_area_search.xml
index ba97c6956..328dc0de6 100644
--- a/indra/newview/skins/default/xui/de/floater_area_search.xml
+++ b/indra/newview/skins/default/xui/de/floater_area_search.xml
@@ -14,7 +14,5 @@
-
-
Gelistet/Offen/Total
diff --git a/indra/newview/skins/default/xui/de/floater_pay.xml b/indra/newview/skins/default/xui/de/floater_pay.xml
index fc7144a60..6d4634371 100644
--- a/indra/newview/skins/default/xui/de/floater_pay.xml
+++ b/indra/newview/skins/default/xui/de/floater_pay.xml
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
Einwohner bezahlen:
diff --git a/indra/newview/skins/default/xui/de/floater_pay_object.xml b/indra/newview/skins/default/xui/de/floater_pay_object.xml
index 3e0e313b1..045c0d08e 100644
--- a/indra/newview/skins/default/xui/de/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/de/floater_pay_object.xml
@@ -7,10 +7,10 @@
...
Schnellzahlung:
Betrag:
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/de/floater_world_map.xml b/indra/newview/skins/default/xui/de/floater_world_map.xml
index 6f35e8680..241c9b4db 100644
--- a/indra/newview/skins/default/xui/de/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/de/floater_world_map.xml
@@ -22,9 +22,9 @@
-
+
-
+
Online-Freunde
diff --git a/indra/newview/skins/default/xui/en-us/floater_about.xml b/indra/newview/skins/default/xui/en-us/floater_about.xml
index a94a96aa9..266555ca1 100644
--- a/indra/newview/skins/default/xui/en-us/floater_about.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_about.xml
@@ -12,7 +12,7 @@
-Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Aleric Inglewood, Narv Czervik, Tigh MacFanatic, Inusaito Kanya, Sovereign Engineer and Latif Khalifa, with contributions by Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, McCabe Maxsted, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Thickbrick Sleaford, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is based upon Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code.
+Singularity Viewer is developed and maintained by Siana Gearz, Shyotl Kuhr, Inusaito Kanya, Aleric Inglewood, Tigh MacFanatic, Sovereign Engineer and Cinder Roxley, with contributions by Damian Zhaoying, Fractured Crystal, Franxisco Romano, Fritigern Gothly, Henri Beauchamp, Kadah Coba, Kitty Barnett, Knolan Falconer, Latif Khalifa, McCabe Maxsted, Narv Czervik, nhede Core, Nomade Zhao, Revolution Smythe, Selvone Franizzi, Sim Federal, Thickbrick Sleaford, Wolfspirit Magic, Zauber Parecelsus and others. Singularity is based upon Ascent source code. Credits for Ascent include Hg Beeks, Charley Levenque, Hazim Gazov, Zwagoth Klaar, Qarl Fizz, and others. Ascent is based upon the Inertia source code.
Singularity Viewer includes source code contributions of the following residents: Able Whitman, Adam Marker, Agathos Frascati, Aimee Trescothick, Alejandro Rosenthal, Aleric Inglewood, Alissa Sabre, Angus Boyd, Ann Congrejo, Argent Stonecutter, Asuka Neely, Balp Allen, Benja Kepler, Biancaluce Robbiani, Blakar Ogre, blino Nakamura, Boroondas Gupte, Bulli Schumann, bushing Spatula, Carjay McGinnis, Catherine Pfeffer, Celierra Darling, Cron Stardust, Dale Glass, Drewan Keats, Dylan Haskell, Dzonatas Sol, Eddy Stryker, EponymousDylan Ra, Eva Nowicka, Farallon Greyskin, Feep Larsson, Flemming Congrejo, Fluf Fredriksson, Fractured Crystal, Fremont Cunningham, Geneko Nemeth, Gigs Taggart, Ginko Bayliss, Grazer Kline, Gudmund Shepherd, Hamncheese Omlet, HappySmurf Papp, Henri Beauchamp, Hikkoshi Sakai, Hiro Sommambulist, Hoze Menges, Ian Kas, Irene Muni, Iskar Ariantho, Jacek Antonelli, JB Kraft, Joghert LeSabre, Kage Pixel, Ken March, Kerutsen Sellery, Khyota Wulluf, Kunnis Basiat, Lisa Lowe, Lockhart Cordoso, maciek marksman, Magnus Balczo, Malwina Dollinger, march Korda, Matthew Dowd, McCabe Maxsted, Michelle2 Zenovka, Mm Alder, Mr Greggan, Nicholaz Beresford, Nounouch Hapmouche, Patric Mills, Paul Churchill, Paula Innis, Peekay Semyorka, Peter Lameth, Pf Shan, princess niven, Renault Clio, Ringo Tuxing, Robin Cornelius, Ryozu Kojima, Salahzar Stenvaag, Sammy Frederix, Scrippy Scofield, Seg Baphomet, Sergen Davies, SignpostMarv Martin, Simon Nolan, SpacedOut Frye, Sporked Friis, Stevex Janus, Still Defiant, Strife Onizuka, Tayra Dagostino, TBBle Kurosawa, Teardrops Fall, tenebrous pau, Tharax Ferraris, Thickbrick Sleaford, Thraxis Epsilon, tiamat bingyi, TraductoresAnonimos Alter, Tue Torok, Vadim Bigbear, Vixen Heron, Whoops Babii, Wilton Lundquist, Zarkonnen Decosta, Zi Ree, and Zipherius Turas.
diff --git a/indra/newview/skins/default/xui/en-us/floater_area_search.xml b/indra/newview/skins/default/xui/en-us/floater_area_search.xml
index 16b2bc1c6..ebdcb7026 100644
--- a/indra/newview/skins/default/xui/en-us/floater_area_search.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_area_search.xml
@@ -39,12 +39,12 @@
-
-
+
+
+
+
+ height="15" width="220" left_delta="25" bottom="9" follows="left|bottom">
Listed/Pending/Total
diff --git a/indra/newview/skins/default/xui/en-us/floater_chat_history.xml b/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
index f7b05c724..51e42e9a2 100644
--- a/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_chat_history.xml
@@ -1,5 +1,5 @@
-
Connecting to in-world Voice Chat...
Connected
diff --git a/indra/newview/skins/default/xui/en-us/floater_directory.xml b/indra/newview/skins/default/xui/en-us/floater_directory.xml
index 9227b34b9..e9a58fd7f 100644
--- a/indra/newview/skins/default/xui/en-us/floater_directory.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_directory.xml
@@ -1,7 +1,7 @@
@@ -83,7 +83,7 @@
font="SansSerif" handle_edit_keys_directly="false" height="18"
label="Search" left_delta="56" max_length="254" mouse_opaque="true"
name="search_editor" select_all_on_focus_received="false"
- select_on_focus="false" tab_group="1" tool_tip="Search Second Life"
+ select_on_focus="false" tab_group="1" tool_tip="Search"
width="160" spell_check="true" />
diff --git a/indra/newview/skins/default/xui/en-us/floater_pay.xml b/indra/newview/skins/default/xui/en-us/floater_pay.xml
index 2f63aae8e..9e5e14e20 100644
--- a/indra/newview/skins/default/xui/en-us/floater_pay.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_pay.xml
@@ -4,16 +4,16 @@
min_width="100" mouse_opaque="true" name="Give Money"
rect_control="FloaterPayRectB" title="" width="300">
diff --git a/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml b/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml
new file mode 100644
index 000000000..ab2e628b6
--- /dev/null
+++ b/indra/newview/skins/default/xui/en-us/floater_region_tracker.xml
@@ -0,0 +1,95 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/en-us/floater_toolbar_prefs.xml b/indra/newview/skins/default/xui/en-us/floater_toolbar_prefs.xml
index f6e5da685..dbbfe6dbe 100644
--- a/indra/newview/skins/default/xui/en-us/floater_toolbar_prefs.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_toolbar_prefs.xml
@@ -14,9 +14,10 @@
+
-
-
+
+
@@ -31,8 +32,8 @@
-
-
+
+
@@ -47,8 +48,8 @@
-
-
+
+
@@ -65,8 +66,8 @@
-
-
+
+
@@ -81,8 +82,8 @@
-
-
+
+
diff --git a/indra/newview/skins/default/xui/en-us/floater_world_map.xml b/indra/newview/skins/default/xui/en-us/floater_world_map.xml
index 580286dda..cf8f76555 100644
--- a/indra/newview/skins/default/xui/en-us/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en-us/floater_world_map.xml
@@ -88,13 +88,13 @@
name="events_mature_icon" width="16" />
+ left_delta="20" mouse_opaque="true" name="events_mature_chk" width="55" />
+ left_delta="20" mouse_opaque="true" name="events_adult_chk" width="55" />
@@ -204,11 +204,15 @@
function="WMap.ShowAgent" />
+ width="90">
+
+
+
+
@@ -1030,11 +1063,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -1056,10 +1101,6 @@
-
-
-
-
diff --git a/indra/newview/skins/default/xui/en-us/notifications.xml b/indra/newview/skins/default/xui/en-us/notifications.xml
index 1af8cfc62..ff05f179f 100644
--- a/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -8460,6 +8460,138 @@ Only textures will upload as temporary on Agni and Aditi.
canceltext="Cancel"/>
+
+ The SOCKS 5 proxy "[HOST]:[PORT]" refused the connection, not allowed by rule set.
+ fail
+
+
+
+
+ The SOCKS 5 proxy "[HOST]:[PORT]" refused the connection, could not open TCP channel.
+ fail
+
+
+
+
+ The SOCKS 5 proxy "[HOST]:[PORT]" refused the selected authentication system.
+ fail
+
+
+
+
+ The SOCKS 5 proxy "[HOST]:[PORT]" reported your credentials are invalid.
+ fail
+
+
+
+
+ The SOCKS 5 proxy "[HOST]:[PORT]" refused the UDP associate request.
+ fail
+
+
+
+
+ Could not connect to SOCKS 5 proxy server "[HOST]:[PORT]".
+ fail
+
+
+
+
+ Unknown proxy error with server "[HOST]:[PORT]".
+ fail
+
+
+
+
+ Invalid SOCKS proxy address or port "[HOST]:[PORT]".
+ fail
+
+
+
+
+ Invalid SOCKS 5 username or password.
+ fail
+
+
+
+
+ Invalid HTTP proxy address or port "[HOST]:[PORT]".
+ fail
+
+
+
+
+ Invalid SOCKS proxy address or port "[HOST]:[PORT]".
+ fail
+
+
+
+
+ Proxy settings take effect after you restart [APP_NAME].
+ fail
+
+
+
@@ -10361,6 +10493,27 @@ Changes won't take effect until after you restart [APP_NAME].
+
+What label would you like to use for
+the region "[REGION]"?
+ confirm
+
+
+
+
+The object you're attempting to restore in world is no copy, if you do not have rez rights at <0, 0, 0>, you will lose this object!!
+
+
+
-
+
Busy Mode Response:
diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml
index 188f6569e..b3449200d 100644
--- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml
+++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml
@@ -62,10 +62,11 @@
Open url/slurl (usage: cmd slurl)
+ Resync Animations (usage: cmd)
+
-
- Change Draw Distance (usage: cmd meters)
+
+ Change Draw Distance (usage: cmd meters)
Teleport to cam position (usage: cmd)
@@ -81,7 +82,9 @@
Toggle Fake Away Status (usage: cmd)
Send region message (usage: cmd msg)
-
+
+ Hover Height (usage: cmd height)
+
@@ -98,6 +101,7 @@
+
diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
index 5dca51194..c2b6a3918 100644
--- a/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
+++ b/indra/newview/skins/default/xui/en-us/panel_preferences_chat.xml
@@ -25,20 +25,21 @@
- Chat Options:
+ Chat Options:
+
- Bubble Chat:
-
-
+ Bubble Chat:
+
+
@@ -43,7 +43,7 @@
Buscar:
-
+
diff --git a/indra/newview/skins/default/xui/es/floater_instant_message.xml b/indra/newview/skins/default/xui/es/floater_instant_message.xml
index 32386b1e2..906a7ba7d 100644
--- a/indra/newview/skins/default/xui/es/floater_instant_message.xml
+++ b/indra/newview/skins/default/xui/es/floater_instant_message.xml
@@ -44,6 +44,8 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_instant_message_concisebuttons.xml b/indra/newview/skins/default/xui/es/floater_instant_message_concisebuttons.xml
index b38822a59..09324761a 100644
--- a/indra/newview/skins/default/xui/es/floater_instant_message_concisebuttons.xml
+++ b/indra/newview/skins/default/xui/es/floater_instant_message_concisebuttons.xml
@@ -45,6 +45,8 @@
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_object_im_info.xml b/indra/newview/skins/default/xui/es/floater_object_im_info.xml
index d443b3f64..4079d5d91 100644
--- a/indra/newview/skins/default/xui/es/floater_object_im_info.xml
+++ b/indra/newview/skins/default/xui/es/floater_object_im_info.xml
@@ -3,14 +3,22 @@
Objeto:
+
Ubicación:
+
(Información de la ubicación no disponible)
Propietario:
+
+
+ Clave Id.:
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_pay.xml b/indra/newview/skins/default/xui/es/floater_pay.xml
index 9dbb0a093..87e243360 100644
--- a/indra/newview/skins/default/xui/es/floater_pay.xml
+++ b/indra/newview/skins/default/xui/es/floater_pay.xml
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_pay_object.xml b/indra/newview/skins/default/xui/es/floater_pay_object.xml
index ecaabe1d7..717fa28ae 100644
--- a/indra/newview/skins/default/xui/es/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/es/floater_pay_object.xml
@@ -21,10 +21,10 @@
Importe:
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_region_tracker.xml b/indra/newview/skins/default/xui/es/floater_region_tracker.xml
new file mode 100644
index 000000000..500adb3b3
--- /dev/null
+++ b/indra/newview/skins/default/xui/es/floater_region_tracker.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_test.xml b/indra/newview/skins/default/xui/es/floater_test.xml
index 8e40bd877..2c38f8a4e 100644
--- a/indra/newview/skins/default/xui/es/floater_test.xml
+++ b/indra/newview/skins/default/xui/es/floater_test.xml
@@ -1,2 +1,2 @@
-
+
diff --git a/indra/newview/skins/default/xui/es/floater_toolbar_prefs.xml b/indra/newview/skins/default/xui/es/floater_toolbar_prefs.xml
index 785d6ee16..b36fda60c 100644
--- a/indra/newview/skins/default/xui/es/floater_toolbar_prefs.xml
+++ b/indra/newview/skins/default/xui/es/floater_toolbar_prefs.xml
@@ -14,6 +14,7 @@
+
@@ -72,14 +73,16 @@
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/floater_tools.xml b/indra/newview/skins/default/xui/es/floater_tools.xml
index 2c22e4a0c..6a7d1a948 100644
--- a/indra/newview/skins/default/xui/es/floater_tools.xml
+++ b/indra/newview/skins/default/xui/es/floater_tools.xml
@@ -129,6 +129,7 @@
Descripción:
+
Creador:
diff --git a/indra/newview/skins/default/xui/es/floater_world_map.xml b/indra/newview/skins/default/xui/es/floater_world_map.xml
index 08d2b8cb3..0e83b7e7a 100644
--- a/indra/newview/skins/default/xui/es/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/es/floater_world_map.xml
@@ -1,53 +1,39 @@
-
Tu
-
Base
-
Subasta
-
Terreno en Venta
-
-
-
-
Eventos:
-
-
-
-
-
-
+
+
Amigos Conectados
-
Hitos
-
@@ -66,7 +52,8 @@
-
-
+
+
+
diff --git a/indra/newview/skins/default/xui/es/fonts.xml b/indra/newview/skins/default/xui/es/fonts.xml
index 0c360a04e..445e8cc27 100644
--- a/indra/newview/skins/default/xui/es/fonts.xml
+++ b/indra/newview/skins/default/xui/es/fonts.xml
@@ -1,77 +1,36 @@
-
- DejaVuSansCondensed.ttf
-
- MSGOTHIC.TTC
- gulim.ttc
- simhei.ttf
- ArialUni.ttf
-
-
- ヒラギノ角ゴ ProN W3.otf
- ヒラギノ角ゴ Pro W3.otf
- AppleGothic.ttf
- AppleGothic.dfont
- 华文细黑.ttf
- 儷黑 Pro.ttf
- Apple Symbols.ttf
-
-
+
+
+
-
- DroidSans.ttf
-
+
-
- DroidSans-Bold.ttf
-
+
-
- DejaVuSansMono.ttf
-
+
-
- DejaVuSans.ttf
-
+
-
- DejaVuSansBold.ttf
-
+
-
- DejaVuSansOblique.ttf
-
+
-
- DejaVuSansBoldOblique.ttf
-
+
-
- arial.ttf
-
+
-
- arialbd.ttf
-
+
-
- ariali.ttf
-
+
-
- arialbi.ttf
-
+
-
- times.ttf
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/menu_login.xml b/indra/newview/skins/default/xui/es/menu_login.xml
index 248cae09e..70254cc49 100644
--- a/indra/newview/skins/default/xui/es/menu_login.xml
+++ b/indra/newview/skins/default/xui/es/menu_login.xml
@@ -4,10 +4,17 @@
-
+
+
+
+
+
+
+
+
diff --git a/indra/newview/skins/default/xui/es/menu_viewer.xml b/indra/newview/skins/default/xui/es/menu_viewer.xml
index ae190c5b7..52202b9a5 100644
--- a/indra/newview/skins/default/xui/es/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/es/menu_viewer.xml
@@ -197,6 +197,7 @@
+
@@ -215,18 +216,20 @@
-
+
+
+
-
+
diff --git a/indra/newview/skins/default/xui/es/notifications.xml b/indra/newview/skins/default/xui/es/notifications.xml
index 134b21d92..6d5557832 100644
--- a/indra/newview/skins/default/xui/es/notifications.xml
+++ b/indra/newview/skins/default/xui/es/notifications.xml
@@ -303,7 +303,7 @@ Hubo un problema al subir la foto por la siguiente razón: [REASON]
Estos miembros no pueden ser removidos de este rol.
Los miembros deberán abandonar el rol por si mismos.
¿Estás seguro que quieres continuar?
-
+
@@ -835,7 +835,11 @@ La calidad gráfica puede configurarse en Preferencias > Gráficos.
En la región [REGION] no se permite modificar el terreno.
-
+
+
+ No tienes permitido terraformar en la parcela [PARCEL].
+
+
No tiene permiso para copiar los siguientes ítems.
[ITEMS]
@@ -1225,7 +1229,6 @@ No ha seleccionado un grupo.
No se ha podido transferir el terreno:
Ha sido imposible encontrar en qué región está.
-Por favor, para informar de esto usa Herramientas -> Informar de un fallo.
@@ -1279,8 +1282,6 @@ Las parcelas de tu propiedad se muestran en verde.
No se ha podido abandonar el terreno:
Ha sido imposible encontrar en qué región está.
-
-Por favor, para informar de esto usa Herramientas > Informar de un fallo.
@@ -1326,15 +1327,11 @@ Inténtalo seleccionando una parte de la parcela.
No se ha podido dividir el terreno:
Ha sido imposible encontrar en qué región está.
-
-Por favor, para informar de esto usa Herramientas -> Informar de un fallo.
No se ha podido unir el terreno:
Ha sido imposible encontrar en qué región está.
-
-Por favor, para informar de esto usa Herramientas -> Informar de un fallo.
@@ -1405,14 +1402,11 @@ Gris = Público
No se ha podido guardar [NAME] en la base central de almacenamiento.
Esto es, generalmente, un fallo temporal. Por favor, reinténtalo en unos pocos minutos.
-
-Si persiste el problema, por favor, pulsa en en el menú 'Herramientas > Informar de un fallo' y aporta detalles sobre la configuración de tu conexión.
- Se ha cerrado tu sesión en [SECOND_LIFE]:
+ Maldición. Se ha cerrado tu sesión en [SECOND_LIFE]:
[MESSAGE]
-Aún puedes ver el chat y los MI existentes pulsando 'Ver MI y Chat'. Si no, pulsa 'Salir' para cerrar [APP_NAME] inmediatemente.
@@ -1621,6 +1615,7 @@ Si se vende una parcela transferida, el precio de venta se dividirá a partes ig
[ERROR_MESSAGE]
+
@@ -1655,7 +1650,7 @@ Puedes usar normalmente [SECOND_LIFE], los demás residentes te verán correctam
Si esta es la primera vez que usas [SECOND_LIFE], deberás crear una cuenta antes de poder iniciar una sesión.
¿Volver a www.secondlife.com para crear una cuenta nueva?
-
+
@@ -1689,7 +1684,7 @@ Por favor, elige el avatar masculino o femenino. Puedes cambiar más adelante tu
- Se te ha concedido el privilegio de modificar los objetos de [NAME].
+ [NAME] te ha concedido permisos para modificar sus objetos .
@@ -1811,7 +1806,28 @@ Esta actualización no es obligatoria, pero te sugerimos instalarla para mejorar
Esta actualización no es obligatoria, pero te sugerimos instalarla para mejorar el rendimiento y la estabilidad.
-
+
+
+ Está disponible una nueva versión de [APP_NAME].
+[MESSAGE]
+Debes descargar esta actualización para usar [APP_NAME].
+
+
+
+
+ Está disponible una versión actualizada de [APP_NAME].
+[MESSAGE]
+Esta actualización no es obligatoria, pero te sugerimos instalarla para mejorar el rendimiento y la estabilidad.
+
+
+
+
+ Está disponible una versión actualizada de [APP_NAME].
+[MESSAGE]
+Esta actualización no es obligatoria, pero te sugerimos instalarla para mejorar el rendimiento y la estabilidad.
+
+
+
Está disponible una versión nueva de [APP_NAME].
[MESSAGE]
@@ -1849,6 +1865,11 @@ Esta actualización no es obligatoria, pero te sugerimos instalarla para mejorar
¿Abrir el navegador de tu sistema para ver este contenido?
+
+
+ ¿Ir a la página oficial de Estado del Grid de [SECOND_LIFE]?
+
+
¿Ir a www.secondlife.com para administrar tu cuenta?
@@ -2243,7 +2264,7 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
@@ -2264,7 +2285,7 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview
-
+
@@ -2280,7 +2301,7 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
@@ -2289,7 +2310,7 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
@@ -2297,6 +2318,11 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
Estamos experimentando dificultades técnicas con el teleporte porque tus preferencias no están sincronizadas con el servidor.
+
+
+ No se puede entrar a la región. '[REGION_NAME]' es una región Skill Gaming y debes reunir ciertos requisitos para poder ingresar en ella. Para más detalles, por favor ve a [http://wiki.secondlife.com/wiki/Linden_Lab_Official:Skill_Gaming_in_Second_Life Skill Gaming FAQ].
+
+
No recibirás más notificaciones cuando vayas a visitar una región con un contenido [RATING]. En el futuro, puedes cambiar tus preferencias de contenido en Editar > Preferencias > General en la barra de menús.
@@ -2320,7 +2346,7 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
http://wiki.secondlife.com/wiki/Linden_Lab_Official:Maturity_ratings:_an_overview
-
+
@@ -2332,11 +2358,13 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
- El terreno que intentas reclamar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Podemos cambiar tus preferencias y después puedes volver a intentar reclamar el terreno.
+ El terreno que intentas reclamar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos.
+
+Puedes pulsar ahora 'Cambiar preferencias' para elevar tus preferencias de calificación de contenido para permitirte entrar. Serás capaz de buscar y acceder al contenido [REGIONMATURITY] desde ahora. Si luego quieres volver al contenido actual, ve a Editar > Preferencias... > General.
@@ -2364,11 +2392,13 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
- El terreno que intentas comprar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos. Podemos cambiar tus preferencias y después puedes volver a intentar comprar el terreno.
+ El terreno que intentas comprar tiene un contenido [REGIONMATURITY], pero tus preferencias actuales no te autorizan a ver este tipo de contenidos.
+
+Puedes pulsar ahora 'Cambiar preferencias' para elevar tus preferencias de calificación de contenido para permitirte entrar. Serás capaz de buscar y acceder al contenido [REGIONMATURITY] desde ahora. Si luego quieres volver al contenido actual, ve a Editar > Preferencias... > General.
@@ -2385,6 +2415,11 @@ Puedes pulsar 'Cambiar preferencia' para aumentar tu nivel de califica
Hay problemas al añadir un administrador nuevo del estado. Uno o más estados deben de tener llena la lista de administradores.
+
+
+ Incapaz de añadir a un Propietario o Administrador de Estado a la lista de Prohibición.
+ fail
+
Hay problemas en añadir a la lista del estado. Uno o más estados deben de tener llena la lista.
@@ -3383,16 +3418,12 @@ Ya existe un grid con el mismo nombre.
Asunto: [SUBJECT], Mensaje: [MESSAGE]
-
- [NAME] está conectado
-
-
-
- [NAME] no está conectado
+
+ [NAME] está [STATUS]
- No puedes añadirte a ti mismo como amigo.
+ Aunque seas muy simpático, no puedes añadirte a ti mismo como amigo.
@@ -3434,8 +3465,9 @@ Por favor, vuelve a intentarlo.
- Tienes pulsada la tecla de bloqueo de mayúsculas, lo que influirá en cómo escribas la contraseña.
-Quizá quieras soltar esa tecla.
+ La tecla de bloqueo de mayúsculas está activada.
+Esto puede influir en tu contraseña.
+
@@ -3443,12 +3475,20 @@ Quizá quieras soltar esa tecla.
- No tienes permisos suficientes para ver la nota.
+ No tienes permisos para ver la nota.
No tienes permisos suficientes para rezear el objeto.
+
+
+ Incapaz de enviar MI a través de estados matrices.
+
+
+
+ Incapaz de transferir inventario a través de estados matrices.
+
No se puede cargar la nota.
@@ -3503,7 +3543,7 @@ Por favor, elige sólo uno.
- El objeto no aparece como puesto a la venta.
+ Este objeto no está a la venta.
@@ -3511,15 +3551,15 @@ Por favor, elige sólo uno.
- Saliendo del modo administrativo, nivel [LEVEL]
+ Saliendo ahora del modo administrativo, nivel [LEVEL]
- No se ha hecho la copia porque no tienes permiso para hacerla
+ No tienes permisos para copiar esto.
- [NAME] ha aceptado tu oferta del inventario.
+ [NAME] ha recibido tu oferta del inventario.
@@ -5685,6 +5725,15 @@ porque la parcela está llena.
Los cambios no surtirán efecto hasta reiniciar [APP_NAME].
+
+
+ Tus privilegios para encontrar a [NAME] en el mapa han sido revocados.
+
+
+
+ [NAME] te ha concedido permisos para ubicarlo/a en el mapa.
+
+
AntiSpam: [SOURCE] ha sido bloqueado por espamear [TYPE]s [AMOUNT] veces en [TIME] segundos.
@@ -5704,6 +5753,11 @@ porque la parcela está llena.
¿Deseas habilitar anunciar claves a los objetos en el sim?
+
+
+ El objeto que intentas restaurar en el mundo es no copiable, si no tienes derechos de construcción en las coordenadas <0, 0, 0> ¡perderás dicho objeto!
+
+
Incapaz de incluir [FAILED] de un total de [TOTAL] objetos debido a no tener permisos suficientes.
diff --git a/indra/newview/skins/default/xui/es/panel_avatar.xml b/indra/newview/skins/default/xui/es/panel_avatar.xml
index 145c4179e..5ac987f50 100644
--- a/indra/newview/skins/default/xui/es/panel_avatar.xml
+++ b/indra/newview/skins/default/xui/es/panel_avatar.xml
@@ -7,7 +7,9 @@
[PAYMENTINFO]
[AGEVERIFICATION]
-
+
+
+
diff --git a/indra/newview/skins/default/xui/es/panel_group_bulk_ban.xml b/indra/newview/skins/default/xui/es/panel_group_bulk_ban.xml
index a035837d1..e8e67bd87 100644
--- a/indra/newview/skins/default/xui/es/panel_group_bulk_ban.xml
+++ b/indra/newview/skins/default/xui/es/panel_group_bulk_ban.xml
@@ -4,10 +4,30 @@
(cargando...)
- Prohibiciones de Grupo no enviadas: Demasiados residentes seleccionados. La Prohibición de Grupo está limitada a 100 residentes por requerimiento.
+ Prohibición de Grupo no enviada: Demasiados residentes seleccionados. La Prohibición de Grupo está limitada a 100 residentes por requerimiento.
-
- Invitación al Grupo no enviada: el residente '[RESIDENT]' se encuentra prohibido.
+
+ Prohibición de Grupo no enviada: No tienes la capacidad "Administrar lista de prohibición".
+
+
+ Prohibición de Grupo no enviada: Tu grupo ha alcanzado el límite de registros de prohibiciones.
+
+
+ Algunas prohibiciones en el grupo no han sido enviadas:
+[REASONS]
+
+
+ Prohibiciones de Grupo no enviadas:
+[REASONS]
+
+
+ - Los siguientes residentes ya se encuentran prohibidos: [RESIDENTS].
+
+
+ - Límite de prohibiciones alcanzado, los siguientes agentes no fueron prohibidos: [RESIDENTS].
+
+
+ No puedes prohibirte a ti mismo del grupo.
Puedes seleccionar múltiples residentesYou can select multiple Residents to
diff --git a/indra/newview/skins/default/xui/es/panel_groups.xml b/indra/newview/skins/default/xui/es/panel_groups.xml
index 219970d59..34c07a626 100644
--- a/indra/newview/skins/default/xui/es/panel_groups.xml
+++ b/indra/newview/skins/default/xui/es/panel_groups.xml
@@ -11,8 +11,8 @@
Tu grupo activo se muestra en Itálica.
-
- Perteneces a [COUNT] grupos (de un máximo de [MAX]).
+
+ Perteneces a [COUNT] grupos (de un máximo de [MAX], cupo restante [LEFT]).
diff --git a/indra/newview/skins/default/xui/es/panel_groups_horiz.xml b/indra/newview/skins/default/xui/es/panel_groups_horiz.xml
index 5a1e1c9e6..d9a427927 100644
--- a/indra/newview/skins/default/xui/es/panel_groups_horiz.xml
+++ b/indra/newview/skins/default/xui/es/panel_groups_horiz.xml
@@ -12,7 +12,7 @@
Tus grupos activos se muestran en Itálica.
- Perteneces a [COUNT] grupos (de un máximo de [MAX]).
+ Perteneces a [COUNT] grupos (de un máximo de [MAX], cupo restante [LEFT]).
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml
index f555aa4d7..ac2c75570 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_ascent_chat.xml
@@ -68,6 +68,13 @@
Formato de nombres en las listas de:
+ Pestañas de Chat:
+
+ Nombres Antiguos
+ Nombre a Mostrar (c/Nombre de Usuario)
+ Solamente Nombre a Mostrar
+ Nombres Antiguos (c/Nombre a Mostrar)
+
Amigos:
Nombres Antiguos
@@ -132,6 +139,7 @@ Puedes usar los siguientes comodines para personalizar tus respuestas: #n para n
+
Respuesta en Modo Ocupado:
diff --git a/indra/newview/skins/default/xui/es/panel_preferences_input.xml b/indra/newview/skins/default/xui/es/panel_preferences_input.xml
index a62a2105f..e3e50351a 100644
--- a/indra/newview/skins/default/xui/es/panel_preferences_input.xml
+++ b/indra/newview/skins/default/xui/es/panel_preferences_input.xml
@@ -8,6 +8,8 @@
+
+
Esconder Interface en Vista Subjetiva:
diff --git a/indra/newview/skins/default/xui/es/panel_sound_devices.xml b/indra/newview/skins/default/xui/es/panel_sound_devices.xml
index cb70f1989..c5612fa41 100644
--- a/indra/newview/skins/default/xui/es/panel_sound_devices.xml
+++ b/indra/newview/skins/default/xui/es/panel_sound_devices.xml
@@ -21,7 +21,7 @@
Nivel de Entrada:
+ tool_tip="Cambia el Nivel del Micrófno usando este deslizable"/>
Por favor, espera
diff --git a/indra/newview/skins/default/xui/es/panel_status_bar.xml b/indra/newview/skins/default/xui/es/panel_status_bar.xml
index e00053d5d..381e30f4e 100644
--- a/indra/newview/skins/default/xui/es/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/es/panel_status_bar.xml
@@ -33,8 +33,8 @@
-
-
+
+
Paquetes Perdidos
diff --git a/indra/newview/skins/default/xui/es/panel_toolbar.xml b/indra/newview/skins/default/xui/es/panel_toolbar.xml
index 6ee54d5e4..cc1be508a 100644
--- a/indra/newview/skins/default/xui/es/panel_toolbar.xml
+++ b/indra/newview/skins/default/xui/es/panel_toolbar.xml
@@ -52,6 +52,9 @@
+
+
+
@@ -231,6 +234,9 @@
+
+
+
@@ -246,8 +252,13 @@
+
+
+
+
-
+
+
diff --git a/indra/newview/skins/default/xui/es/strings.xml b/indra/newview/skins/default/xui/es/strings.xml
index c316f001b..ad8d42096 100644
--- a/indra/newview/skins/default/xui/es/strings.xml
+++ b/indra/newview/skins/default/xui/es/strings.xml
@@ -1392,7 +1392,7 @@ integer llScriptDanger(vector pos)
Returns TRUE if pos is over public land, sandbox land, land that doesn't allow everyone to edit and build, or land that doesn't allow outside scripts
-llDialog(key avatar, string message, list buttons, integer chat_channel
+llDialog(key avatar, string message, list buttons, integer chat_channel)
Shows a dialog box on the avatar's screen with a message and up to 12 buttons.
If a button is pressed, the avatar says the text of the button label on chat_channel.
@@ -1761,7 +1761,7 @@ integer llGetRegionAgentCount()
Returns the number of avatars in the region
-llTextBox(key avatar, string message, integer chat_channel
+llTextBox(key avatar, string message, integer chat_channel)
Shows a dialog box on the avatar's screen with the message.
It contains a text box for input, and if entered that text is chatted on chat_channel.
@@ -3390,6 +3390,13 @@ Where tag = tag string to match. Removes bot's matching the tag.
Nuevo Script
+
+ (Por nombre)
+ (Residente)
+ (Objeto)
+ (Grupo)
+ (Externo)
+
No hay un Convenio provisto para este Estado.
No hay un Convenio provisto para este Estado. El terreno de este Estado está siendo vendido por el propietario del Estado, no por Linden Lab. Por favor, contacta al propietario del Estado para más detalles.
@@ -3503,10 +3510,6 @@ Si este mensaje persiste, reinicia el equipo y vuelve a intentarlo.
Si persiste, puede que tengas que desinstalar completamente [APP_NAME] y volver a instalarlo.
-
- [APP_NAME] requiere un procesador con AltiVec (G4 o posterior).
-
-
[APP_NAME] ya está siendo ejecutado.
Revisa tu barra de tareas y busca copia minimizada del programa.
@@ -4134,6 +4137,9 @@ Si continuas recibiendo este mensaje, contacta con [SUPPORT_SITE].
Click Derecho
Destruir Objetos - Borra en forma inmediata y permanente un objeto, cuando no tienes paciencia para esperar la respuesta del servidor.
Explotar Objetos - Convierte un objeto Físico en temporal y desenlaza sus partes.
+ Conectado
+ Desconectado
+
diff --git a/indra/newview/skins/default/xui/fr/floater_area_search.xml b/indra/newview/skins/default/xui/fr/floater_area_search.xml
index b5c97ff3f..348624ef4 100644
--- a/indra/newview/skins/default/xui/fr/floater_area_search.xml
+++ b/indra/newview/skins/default/xui/fr/floater_area_search.xml
@@ -18,8 +18,6 @@
-
-
Liste/Attente/Total
diff --git a/indra/newview/skins/default/xui/fr/floater_pay.xml b/indra/newview/skins/default/xui/fr/floater_pay.xml
index c73dd43af..3505a0e03 100644
--- a/indra/newview/skins/default/xui/fr/floater_pay.xml
+++ b/indra/newview/skins/default/xui/fr/floater_pay.xml
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/fr/floater_pay_object.xml b/indra/newview/skins/default/xui/fr/floater_pay_object.xml
index 993d65cf5..5758b4609 100644
--- a/indra/newview/skins/default/xui/fr/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/fr/floater_pay_object.xml
@@ -21,10 +21,10 @@
Montant :
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/fr/floater_world_map.xml b/indra/newview/skins/default/xui/fr/floater_world_map.xml
index 995b35388..796dfbad0 100644
--- a/indra/newview/skins/default/xui/fr/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/fr/floater_world_map.xml
@@ -32,9 +32,9 @@
-
+
-
+
@@ -67,6 +67,6 @@
-
+
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml
index 4a28134f4..992b2b4b5 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_chat.xml
@@ -12,7 +12,7 @@
-
+
Active un lien qui montre le nom du propriétaire dans l'historique du chat pour :
Aucun objet
@@ -89,18 +89,19 @@ Et aussi : #n Pour le nom classique, #d Pour le Display, #r Pour la SLURL de vô
-
+
-
+
+
Mode Busy:
-
+
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml
index 11d25e01a..b8ec0dc57 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_ascent_system.xml
@@ -78,6 +78,7 @@
+
diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_im.xml b/indra/newview/skins/default/xui/fr/panel_preferences_im.xml
index d4923b855..b4d2c6670 100644
--- a/indra/newview/skins/default/xui/fr/panel_preferences_im.xml
+++ b/indra/newview/skins/default/xui/fr/panel_preferences_im.xml
@@ -8,6 +8,7 @@
+
Enregistrements:
diff --git a/indra/newview/skins/default/xui/it/floater_pay.xml b/indra/newview/skins/default/xui/it/floater_pay.xml
index a0bacb5f1..05b4a4ed3 100644
--- a/indra/newview/skins/default/xui/it/floater_pay.xml
+++ b/indra/newview/skins/default/xui/it/floater_pay.xml
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/it/floater_pay_object.xml b/indra/newview/skins/default/xui/it/floater_pay_object.xml
index 3d340b605..3375126c7 100644
--- a/indra/newview/skins/default/xui/it/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/it/floater_pay_object.xml
@@ -21,10 +21,10 @@
Ammontare:
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/it/floater_world_map.xml b/indra/newview/skins/default/xui/it/floater_world_map.xml
index 1b9585e55..e66d644ba 100644
--- a/indra/newview/skins/default/xui/it/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/it/floater_world_map.xml
@@ -22,8 +22,8 @@
Eventi:
-
-
+
+
diff --git a/indra/newview/skins/default/xui/pt/floater_pay.xml b/indra/newview/skins/default/xui/pt/floater_pay.xml
index affa095bc..08f972bd8 100644
--- a/indra/newview/skins/default/xui/pt/floater_pay.xml
+++ b/indra/newview/skins/default/xui/pt/floater_pay.xml
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/pt/floater_pay_object.xml b/indra/newview/skins/default/xui/pt/floater_pay_object.xml
index 5018c2b0b..86dac0af9 100644
--- a/indra/newview/skins/default/xui/pt/floater_pay_object.xml
+++ b/indra/newview/skins/default/xui/pt/floater_pay_object.xml
@@ -21,10 +21,10 @@
Quantia:
-
-
-
-
+
+
+
+
diff --git a/indra/newview/skins/default/xui/pt/floater_world_map.xml b/indra/newview/skins/default/xui/pt/floater_world_map.xml
index abdaebdc1..30f7d7ca6 100644
--- a/indra/newview/skins/default/xui/pt/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/pt/floater_world_map.xml
@@ -21,8 +21,8 @@
Eventos:
-
-
+
+
Amigos Conectados
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 24ba7707f..1230617e3 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -412,6 +412,21 @@ class WindowsManifest(ViewerManifest):
mask = "%s_%s_Setup.exe"
return mask % (self.channel_oneword(), '-'.join(self.args['version']))
+ def sign_command(self, *argv):
+ return [
+ "signtool.exe",
+ "sign", "/v",
+ "/f",os.environ['VIEWER_SIGNING_KEY'],
+ "/p",os.environ['VIEWER_SIGNING_PASSWORD'],
+ "/d","%s" % self.channel(),
+ "/du",os.environ['VIEWER_SIGNING_URL'],
+ "/t","http://timestamp.comodoca.com/authenticode"
+ ] + list(argv)
+
+
+ def sign(self, *argv):
+ subprocess.check_call(self.sign_command(*argv))
+
def package_finish(self):
# a standard map of strings for replacing in the templates
substitution_strings = {
@@ -458,6 +473,15 @@ class WindowsManifest(ViewerManifest):
installer_file = installer_file % substitution_strings
substitution_strings['installer_file'] = installer_file
+ # Sign the binaries
+ if 'VIEWER_SIGNING_PASSWORD' in os.environ:
+ try:
+ self.sign(self.args['configuration']+"\\"+self.final_exe())
+ self.sign(self.args['configuration']+"\\SLPlugin.exe")
+ self.sign(self.args['configuration']+"\\SLVoice.exe")
+ except Exception, e:
+ print "Couldn't sign binaries. Tried to sign %s" % self.args['configuration'] + "\\" + self.final_exe() + "\nException: %s" % e
+
tempfile = "secondlife_setup_tmp.nsi"
# the following replaces strings in the nsi template
# it also does python-style % substitution
@@ -485,14 +509,24 @@ class WindowsManifest(ViewerManifest):
NSIS_path = os.environ['ProgramFiles(X86)'] + '\\NSIS\\Unicode\\makensis.exe'
self.run_command([proper_windows_path(NSIS_path),self.dst_path_of(tempfile)])
# self.remove(self.dst_path_of(tempfile))
- # If we're on a build machine, sign the code using our Authenticode certificate. JC
- sign_py = os.path.expandvars("{SIGN_PY}")
- if sign_py == "" or sign_py == "{SIGN_PY}":
- sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
- if os.path.exists(sign_py):
- self.run_command('python ' + sign_py + ' ' + self.dst_path_of(installer_file))
+
+ # Sign the installer
+ # We're probably not on a build machine, but maybe we want to sign
+ if 'VIEWER_SIGNING_PASSWORD' in os.environ:
+ try:
+ self.sign(self.args['configuration'] + "\\" + substitution_strings['installer_file'])
+ except Exception, e:
+ print "Couldn't sign windows installer. Tried to sign %s" % self.args['configuration'] + "\\" + substitution_strings['installer_file'] + "\nException: %s" % e
else:
- print "Skipping code signing,", sign_py, "does not exist"
+ # If we're on a build machine, sign the code using our Authenticode certificate. JC
+ sign_py = os.path.expandvars("{SIGN_PY}")
+ if sign_py == "" or sign_py == "{SIGN_PY}":
+ sign_py = 'C:\\buildscripts\\code-signing\\sign.py'
+ if os.path.exists(sign_py):
+ self.run_command('python ' + sign_py + ' ' + self.dst_path_of(installer_file))
+ else:
+ print "Skipping code signing,", sign_py, "does not exist"
+
self.created_path(self.dst_path_of(installer_file))
self.package_file = installer_file
@@ -640,6 +674,37 @@ class DarwinManifest(ViewerManifest):
if not self.default_channel_for_brand():
channel_standin = self.channel()
+ # Sign the app if we have a key.
+ try:
+ signing_password = os.environ['VIEWER_SIGNING_PASSWORD']
+ except KeyError:
+ print "Skipping code signing"
+ pass
+ else:
+ home_path = os.environ['HOME']
+
+ self.run_command('security unlock-keychain -p "%s" "%s/Library/Keychains/viewer.keychain"' % (signing_password, home_path))
+ signed=False
+ sign_attempts=3
+ sign_retry_wait=15
+ while (not signed) and (sign_attempts > 0):
+ try:
+ sign_attempts-=1;
+ self.run_command('codesign --verbose --force --timestamp --keychain "%(home_path)s/Library/Keychains/viewer.keychain" -s %(identity)r -f %(bundle)r' % {
+ 'home_path' : home_path,
+ 'identity': os.environ['VIEWER_SIGNING_KEY'],
+ 'bundle': self.get_dst_prefix()
+ })
+ signed=True
+ except:
+ if sign_attempts:
+ print >> sys.stderr, "codesign failed, waiting %d seconds before retrying" % sign_retry_wait
+ time.sleep(sign_retry_wait)
+ sign_retry_wait*=2
+ else:
+ print >> sys.stderr, "Maximum codesign attempts exceeded; giving up"
+ raise
+
imagename=self.installer_prefix() + '_'.join(self.args['version'])
# See Ambroff's Hack comment further down if you want to create new bundles and dmg
@@ -776,10 +841,6 @@ class LinuxManifest(ViewerManifest):
self.path("../plugins/gstreamer010/libmedia_plugin_gstreamer010.so", "libmedia_plugin_gstreamer.so")
self.end_prefix("bin/llplugin")
- # llcommon
- if not self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so"):
- print "Skipping llcommon.so (assuming llcommon was linked statically)"
-
self.path("featuretable_linux.txt")
def wrapper_name(self):
@@ -846,6 +907,10 @@ class Linux_i686Manifest(LinuxManifest):
def construct(self):
super(Linux_i686Manifest, self).construct()
+ # llcommon
+ if not self.path("../llcommon/libllcommon.so", "lib/libllcommon.so"):
+ print "Skipping llcommon.so (assuming llcommon was linked statically)"
+
if (not self.standalone()) and self.prefix(src="../packages/lib/release", alt_build="../packages/libraries/i686-linux/lib/release", dst="lib"):
self.path("libapr-1.so*")
self.path("libaprutil-1.so*")
@@ -900,6 +965,10 @@ class Linux_x86_64Manifest(LinuxManifest):
def construct(self):
super(Linux_x86_64Manifest, self).construct()
+ # llcommon
+ if not self.path("../llcommon/libllcommon.so", "lib64/libllcommon.so"):
+ print "Skipping llcommon.so (assuming llcommon was linked statically)"
+
if (not self.standalone()) and self.prefix(src="../packages/lib/release", alt_build="../packages/libraries/x86_64-linux/lib/release", dst="lib64"):
self.path("libapr-1.so*")
self.path("libaprutil-1.so*")
diff --git a/indra/newview/wlfPanel_AdvSettings.cpp b/indra/newview/wlfPanel_AdvSettings.cpp
index bb40fb896..a69de701e 100644
--- a/indra/newview/wlfPanel_AdvSettings.cpp
+++ b/indra/newview/wlfPanel_AdvSettings.cpp
@@ -47,13 +47,21 @@
#include "llfloaterwindlight.h"
#include "llfloaterwater.h"
+#include "llagent.h"
#include "llagentcamera.h"
#include "lldaycyclemanager.h"
#include "llenvmanager.h"
+#include "llviewerregion.h"
+#include "llvoavatarself.h"
#include "llwaterparammanager.h"
#include "llwlparamset.h"
#include "llwlparammanager.h"
+// Hover funcs
+void syncFromPreferenceSetting(LLSliderCtrl* sldrCtrl);
+void onHoverSliderMoved(const LLSD& val);
+void onHoverSliderFinalCommit(const LLSD& val);
+
wlfPanel_AdvSettings::wlfPanel_AdvSettings() : mExpanded(false)
{
setVisible(false);
@@ -76,6 +84,7 @@ void wlfPanel_AdvSettings::build()
mConnections.clear();
deleteAllChildren();
mExpanded = gSavedSettings.getBOOL("wlfAdvSettingsPopup");
+ if (mRegionChangedSlot.connected()) mRegionChangedSlot.disconnect();
LLUICtrlFactory::instance().buildPanel(this, mExpanded ? "wlfPanel_AdvSettings_expanded.xml" : "wlfPanel_AdvSettings.xml", &getFactoryMap());
}
@@ -140,6 +149,7 @@ BOOL wlfPanel_AdvSettings::postBuild()
if (mExpanded)
{
+ // Windlight
getChild("use_estate_wl")->setCommitCallback(boost::bind(&wlfPanel_AdvSettings::onUseRegionSettings, this, _2));
mWaterPresetCombo = getChild("WLWaterPresetsCombo");
@@ -174,6 +184,7 @@ BOOL wlfPanel_AdvSettings::postBuild()
updateTimeSlider();
updateRlvVisibility();
+ // Camera Presets
const U32 preset(gSavedSettings.getU32("CameraPreset"));
if (preset == CAMERA_PRESET_REAR_VIEW)
getChildView("Rear")->setValue(true);
@@ -181,6 +192,35 @@ BOOL wlfPanel_AdvSettings::postBuild()
getChildView("Front")->setValue(true);
else if (preset == CAMERA_PRESET_GROUP_VIEW)
getChildView("Group")->setValue(true);
+
+ // Hover height
+ mHoverHeight = getChild("HoverHeightSlider");
+ mHoverHeight->setMinValue(MIN_HOVER_Z);
+ mHoverHeight->setMaxValue(MAX_HOVER_Z);
+ mHoverHeight->setSliderMouseUpCallback(boost::bind(onHoverSliderFinalCommit, _2));
+ mHoverHeight->setSliderEditorCommitCallback(boost::bind(onHoverSliderFinalCommit, _2));
+ mHoverHeight->setCommitCallback(boost::bind(onHoverSliderMoved, _2));
+
+ // Initialize slider from pref setting.
+ syncFromPreferenceSetting(mHoverHeight);
+ // Update slider on future pref changes.
+ if (LLControlVariable* control = gSavedPerAccountSettings.getControl("AvatarHoverOffsetZ"))
+ {
+ control->getCommitSignal()->connect(boost::bind(&syncFromPreferenceSetting, mHoverHeight));
+ }
+ else
+ {
+ llwarns << "Control not found for AvatarHoverOffsetZ" << LL_ENDL;
+ }
+
+ updateEditHoverEnabled();
+
+ if (!mRegionChangedSlot.connected())
+ {
+ mRegionChangedSlot = gAgent.addRegionChangedCallback(boost::bind(&wlfPanel_AdvSettings::onRegionChanged, this));
+ }
+ // Set up based on initial region.
+ onRegionChanged();
}
return TRUE;
}
@@ -411,3 +451,71 @@ void wlfPanel_AdvSettings::updateTimeSlider()
}
mTimeSlider->setValue(val);
}
+
+// Hover junk
+void syncFromPreferenceSetting(LLSliderCtrl* sldrCtrl)
+{
+ F32 value = gSavedPerAccountSettings.getF32("AvatarHoverOffsetZ");
+
+ sldrCtrl->setValue(value,FALSE);
+
+ if (isAgentAvatarValid())
+ {
+ LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+ LL_INFOS("Avatar") << "setting hover from preference setting " << offset[2] << LL_ENDL;
+ gAgentAvatarp->setHoverOffset(offset);
+ }
+}
+
+void onHoverSliderMoved(const LLSD& val)
+{
+ F32 value = val.asFloat();
+ LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+ LL_INFOS("Avatar") << "setting hover from slider moved" << offset[2] << LL_ENDL;
+ gAgentAvatarp->setHoverOffset(offset, false);
+}
+
+// Do send-to-the-server work when slider drag completes, or new
+// value entered as text.
+void onHoverSliderFinalCommit(const LLSD& val)
+{
+ F32 value = val.asFloat();
+ gSavedPerAccountSettings.setF32("AvatarHoverOffsetZ", value);
+
+ LLVector3 offset(0.0, 0.0, llclamp(value,MIN_HOVER_Z,MAX_HOVER_Z));
+ LL_INFOS("Avatar") << "setting hover from slider final commit " << offset[2] << LL_ENDL;
+ gAgentAvatarp->setHoverOffset(offset, true); // will send update this time.
+}
+
+void wlfPanel_AdvSettings::onRegionChanged()
+{
+ LLViewerRegion* region = gAgent.getRegion();
+ if (region && region->simulatorFeaturesReceived())
+ {
+ updateEditHoverEnabled();
+ }
+ else if (region)
+ {
+ region->setSimulatorFeaturesReceivedCallback(boost::bind(&wlfPanel_AdvSettings::onSimulatorFeaturesReceived, this, _1));
+ }
+}
+
+void wlfPanel_AdvSettings::onSimulatorFeaturesReceived(const LLUUID& region_id)
+{
+ const LLViewerRegion* region = gAgent.getRegion();
+ if (region && (region->getRegionID()==region_id))
+ {
+ updateEditHoverEnabled();
+ }
+}
+
+void wlfPanel_AdvSettings::updateEditHoverEnabled()
+{
+ const LLViewerRegion* region = gAgent.getRegion();
+ bool enabled = region && region->avatarHoverHeightEnabled();
+ mHoverHeight->setEnabled(enabled);
+ if (enabled)
+ {
+ syncFromPreferenceSetting(mHoverHeight);
+ }
+}
diff --git a/indra/newview/wlfPanel_AdvSettings.h b/indra/newview/wlfPanel_AdvSettings.h
index 17b2ddc9a..1bf1b9691 100644
--- a/indra/newview/wlfPanel_AdvSettings.h
+++ b/indra/newview/wlfPanel_AdvSettings.h
@@ -79,14 +79,20 @@ protected:
// void populateDayCyclePresetsList();
void updateTimeSlider();
+ void onRegionChanged();
+ void onSimulatorFeaturesReceived(const LLUUID& region_id);
+ void updateEditHoverEnabled();
+
LLComboBox* mWaterPresetCombo;
LLComboBox* mSkyPresetCombo;
// LLComboBox* mDayCyclePresetCombo;
LLSliderCtrl* mTimeSlider;
+ LLSliderCtrl* mHoverHeight;
bool mExpanded;
boost::ptr_list mConnections;
+ boost::signals2::connection mRegionChangedSlot;
};
#endif // LL_wlfPanel_AdvSettings_H
diff --git a/indra/test/common.cpp b/indra/test/common.cpp
index c8e62689e..37d94c7bf 100644
--- a/indra/test/common.cpp
+++ b/indra/test/common.cpp
@@ -49,7 +49,6 @@
#include "llsd.h"
#include "llsdserialize.h"
#include "u64.h"
-#include "llhash.h"
#if LL_WINDOWS
// disable overflow warnings
@@ -638,38 +637,3 @@ namespace tut
// seems to be deprecated - could not find it being used
// anywhere in the tarball - skipping unit tests for now
}
-
-
-namespace tut
-{
- struct hash_data
- {
- };
- typedef test_group hash_test;
- typedef hash_test::object hash_object;
- tut::hash_test hash_tester("hash_test");
-
- template<> template<>
- void hash_object::test<1>()
- {
- const char * str1 = "test string one";
- const char * same_as_str1 = "test string one";
-
- size_t hash1 = llhash(str1);
- size_t same_as_hash1 = llhash(same_as_str1);
-
-
- ensure("Hashes from identical strings should be equal", hash1 == same_as_hash1);
-
- char str[100];
- strcpy( str, "Another test" );
-
- size_t hash2 = llhash(str);
-
- strcpy( str, "Different string, same pointer" );
-
- size_t hash3 = llhash(str);
-
- ensure("Hashes from same pointer but different string should not be equal", hash2 != hash3);
- }
-}
diff --git a/scripts/messages/message_template.msg b/scripts/messages/message_template.msg
index 1ec83cb85..ce7e2a442 100644
--- a/scripts/messages/message_template.msg
+++ b/scripts/messages/message_template.msg
@@ -3594,6 +3594,10 @@ version 2.0
{ CofVersion S32 }
{ Flags U32 }
}
+ {
+ AppearanceHover Variable
+ { HoverHeight LLVector3 }
+ }
}
// AvatarSitResponse - response to a request to sit on an object