From ff8b002c3b2bc68bdf4b88c1687a711d2d7c0ca6 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 10 Oct 2013 13:56:06 -0500
Subject: Quite down log spam from loading shaders. Up bone cap to 64 for
 rigged meshes.

---
 indra/llrender/llglslshader.cpp                    |  9 +-
 indra/llrender/llshadermgr.cpp                     | 30 +++++--
 indra/llrender/llshadermgr.h                       |  3 +-
 .../shaders/class1/avatar/objectSkinV.glsl         | 38 +++++++--
 .../shaders/class1/deferred/alphaF.glsl            |  1 +
 indra/newview/lldrawpoolavatar.cpp                 | 40 ++++++++-
 indra/newview/llviewermenu.cpp                     |  4 +
 indra/newview/llvoavatar.cpp                       | 96 +++++++++++++++++++++-
 indra/newview/llvoavatar.h                         |  1 +
 indra/newview/pipeline.h                           | 19 +++--
 indra/newview/skins/default/xui/en/menu_viewer.xml | 10 +++
 11 files changed, 216 insertions(+), 35 deletions(-)

diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 35620bb656..1c50a51d02 100755
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -717,7 +717,14 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms)
 
 BOOL LLGLSLShader::link(BOOL suppress_errors)
 {
-	return LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
+	BOOL success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
+
+	if (!suppress_errors)
+	{
+        LLShaderMgr::instance()->dumpObjectLog(mProgramObject, !success, mName);
+	}
+
+	return success;
 }
 
 void LLGLSLShader::bind()
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index d230574752..6e04fc82df 100755
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -505,9 +505,25 @@ static std::string get_object_log(GLhandleARB ret)
 	return res;
 }
 
-void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns) 
+void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string& filename) 
 {
 	std::string log = get_object_log(ret);
+
+	if (log.length() > 0 || warns)
+	{
+		if (!filename.empty())
+		{
+			if (warns)
+			{
+				LL_WARNS("ShaderLoading") << "From " << filename << ":" << LL_ENDL;
+			}
+			else
+			{
+				LL_INFOS("ShaderLoading") << "From " << filename << ":" << LL_ENDL;
+			}
+		}
+	}
+
 	if ( log.length() > 0 )
 	{
 		if (warns)
@@ -558,7 +574,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
 		file = LLFile::fopen(fname.str(), "r");		/* Flawfinder: ignore */
 		if (file)
 		{
-			LL_INFOS("ShaderLoading") << "Loading file: shaders/class" << gpu_class << "/" << filename << " (Want class " << gpu_class << ")" << LL_ENDL;
+			LL_DEBUGS("ShaderLoading") << "Loading file: shaders/class" << gpu_class << "/" << filename << " (Want class " << gpu_class << ")" << LL_ENDL;
 			break; // done
 		}
 	}
@@ -812,8 +828,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
 			if (error != GL_NO_ERROR || success == GL_FALSE) 
 			{
 				//an error occured, print log
-				LL_WARNS("ShaderLoading") << "GLSL Compilation Error: (" << error << ") in " << filename << LL_ENDL;
-				dumpObjectLog(ret);
+				LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
+				dumpObjectLog(ret, TRUE, filename);
 #if LL_WINDOWS
 				std::stringstream ostr;
 				//dump shader source for debugging
@@ -938,11 +954,6 @@ BOOL LLShaderMgr::linkProgramObject(GLhandleARB obj, BOOL suppress_errors)
 		suppress_errors = FALSE;
 	}
 #endif
-	if (!suppress_errors)
-	{
-        dumpObjectLog(obj, !success);
-	}
-
 	return success;
 }
 
@@ -1146,6 +1157,7 @@ void LLShaderMgr::initAttribsAndUniforms()
 	mReservedUniforms.push_back("env_intensity");
 
 	mReservedUniforms.push_back("matrixPalette");
+	mReservedUniforms.push_back("translationPalette");
 	
 	mReservedUniforms.push_back("screenTex");
 	mReservedUniforms.push_back("screenDepth");
diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h
index 51c27fc8b6..394b38f832 100755
--- a/indra/llrender/llshadermgr.h
+++ b/indra/llrender/llshadermgr.h
@@ -176,6 +176,7 @@ public:
 		ENVIRONMENT_INTENSITY,
 		
 		AVATAR_MATRIX,
+		AVATAR_TRANSLATION,
 
 		WATER_SCREENTEX,
 		WATER_SCREENDEPTH,
@@ -224,7 +225,7 @@ DISPLAY_GAMMA,
 	virtual void initAttribsAndUniforms(void);
 
 	BOOL attachShaderFeatures(LLGLSLShader * shader);
-	void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE);
+	void dumpObjectLog(GLhandleARB ret, BOOL warns = TRUE, const std::string& filename = "");
 	BOOL	linkProgramObject(GLhandleARB obj, BOOL suppress_errors = FALSE);
 	BOOL	validateProgramObject(GLhandleARB obj);
 	GLhandleARB loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, boost::unordered_map<std::string, std::string>* defines = NULL, S32 texture_index_channels = -1);
diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index efd0d03965..3bbcf32482 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -26,7 +26,9 @@
 
 ATTRIBUTE vec4 weight4;  
 
-uniform mat4 matrixPalette[32];
+uniform mat3 matrixPalette[64];
+uniform vec3 translationPalette[64];
+
 
 mat4 getObjectSkinnedTransform()
 {
@@ -34,15 +36,35 @@ mat4 getObjectSkinnedTransform()
 	
 	vec4 w = fract(weight4);
 	vec4 index = floor(weight4);
-	
+
+		 index = min(index, vec4(63.0));
+		 index = max(index, vec4( 0.0));
+
 	float scale = 1.0/(w.x+w.y+w.z+w.w);
 	w *= scale;
-	
-	mat4 mat = matrixPalette[int(index.x)]*w.x;
-	mat += matrixPalette[int(index.y)]*w.y;
-	mat += matrixPalette[int(index.z)]*w.z;
-	mat += matrixPalette[int(index.w)]*w.w;
+
+	int i1 = int(index.x);
+	int i2 = int(index.y);
+	int i3 = int(index.z);
+	int i4 = int(index.w);
 		
-	return mat;
+	mat3 mat  = matrixPalette[i1]*w.x;
+		 mat += matrixPalette[i2]*w.y;
+		 mat += matrixPalette[i3]*w.z;
+		 mat += matrixPalette[i4]*w.w;
+
+	vec3 trans = translationPalette[i1]*w.x;
+	trans += translationPalette[i2]*w.y;
+	trans += translationPalette[i3]*w.z;
+	trans += translationPalette[i4]*w.w;
+
+	mat4 ret;
+
+	ret[0] = vec4(mat[0], 0);
+	ret[1] = vec4(mat[1], 0);
+	ret[2] = vec4(mat[2], 0);
+	ret[3] = vec4(trans, 1.0);
+				
+	return ret;
 }
 
diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
index e5f7366b70..2b5f001873 100755
--- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl
@@ -534,6 +534,7 @@ void main()
 #ifdef FOR_IMPOSTOR
 	vec4 color;
 	color.rgb = diff.rgb;
+	color.a = 1.0;
 
 #ifdef USE_VERTEX_COLOR
 	float final_alpha = diff.a * vertex_color.a;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index f622d5a63a..e77ed27fa2 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -1708,9 +1708,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
 		{
 			if (sShaderLevel > 0)
 			{ //upload matrix palette to shader
-				LLMatrix4 mat[32];
+				LLMatrix4 mat[64];
 
-				U32 count = llmin((U32) skin->mJointNames.size(), (U32) 32);
+				U32 count = llmin((U32) skin->mJointNames.size(), (U32) 64);
 
 				for (U32 i = 0; i < count; ++i)
 				{
@@ -1724,10 +1724,42 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
 				
 				stop_glerror();
 
-				LLDrawPoolAvatar::sVertexProgram->uniformMatrix4fv(LLViewerShaderMgr::AVATAR_MATRIX, 
+				F32 mp[64*9];
+
+				F32 transp[64*3];
+
+				for (U32 i = 0; i < count; ++i)
+				{
+					F32* m = (F32*) mat[i].mMatrix;
+
+					U32 idx = i*9;
+
+					mp[idx+0] = m[0];
+					mp[idx+1] = m[1];
+					mp[idx+2] = m[2];
+
+					mp[idx+3] = m[4];
+					mp[idx+4] = m[5];
+					mp[idx+5] = m[6];
+
+					mp[idx+6] = m[8];
+					mp[idx+7] = m[9];
+					mp[idx+8] = m[10];
+
+					idx = i*3;
+
+					transp[idx+0] = m[12];
+					transp[idx+1] = m[13];
+					transp[idx+2] = m[14];
+				}
+
+				LLDrawPoolAvatar::sVertexProgram->uniformMatrix3fv(LLViewerShaderMgr::AVATAR_MATRIX, 
 					count,
 					FALSE,
-					(GLfloat*) mat[0].mMatrix);
+					(GLfloat*) mp);
+
+				LLDrawPoolAvatar::sVertexProgram->uniform3fv(LLShaderMgr::AVATAR_TRANSLATION, count, transp);
+
 				
 				stop_glerror();
 			}
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index ac2940fcfc..fb07ab8fbe 100755
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1025,6 +1025,10 @@ U32 info_display_from_string(std::string info_display)
 	{
 		return LLPipeline::RENDER_DEBUG_AVATAR_VOLUME;
 	}
+	else if ("joints" == info_display)
+	{
+		return LLPipeline::RENDER_DEBUG_AVATAR_JOINTS;
+	}
 	else if ("raycast" == info_display)
 	{
 		return LLPipeline::RENDER_DEBUG_RAYCAST;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fe035a0a7f..bd33ddf1a5 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1392,9 +1392,11 @@ void LLVOAvatar::getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax)
 //-----------------------------------------------------------------------------
 void LLVOAvatar::renderCollisionVolumes()
 {
+	std::ostringstream ostr;
 	for (S32 i = 0; i < mNumCollisionVolumes; i++)
 	{
 		mCollisionVolumes[i].renderCollision();
+		ostr << mCollisionVolumes[i].getName() << ", ";
 	}
 
 	if (mNameText.notNull())
@@ -1403,6 +1405,96 @@ void LLVOAvatar::renderCollisionVolumes()
 	
 		mNameText->lineSegmentIntersect(unused, unused, unused, TRUE);
 	}
+
+	mDebugText.clear();
+	addDebugText(ostr.str());
+}
+
+void LLVOAvatar::renderJoints()
+{
+	std::ostringstream ostr;
+	std::ostringstream nullstr;
+
+	for (joint_map_t::iterator iter = mJointMap.begin(); iter != mJointMap.end(); ++iter)
+	{
+		LLJoint* jointp = iter->second;
+		if (!jointp)
+		{
+			nullstr << iter->first << " is NULL" << std::endl;
+			continue;
+		}
+
+		ostr << jointp->getName() << ", ";
+
+		jointp->updateWorldMatrix();
+	
+		gGL.pushMatrix();
+		gGL.multMatrix( &jointp->getXform()->getWorldMatrix().mMatrix[0][0] );
+
+		gGL.diffuseColor3f( 1.f, 0.f, 1.f );
+	
+		gGL.begin(LLRender::LINES);
+	
+		LLVector3 v[] = 
+		{
+			LLVector3(1,0,0),
+			LLVector3(-1,0,0),
+			LLVector3(0,1,0),
+			LLVector3(0,-1,0),
+
+			LLVector3(0,0,-1),
+			LLVector3(0,0,1),
+		};
+
+		//sides
+		gGL.vertex3fv(v[0].mV); 
+		gGL.vertex3fv(v[2].mV);
+
+		gGL.vertex3fv(v[0].mV); 
+		gGL.vertex3fv(v[3].mV);
+
+		gGL.vertex3fv(v[1].mV); 
+		gGL.vertex3fv(v[2].mV);
+
+		gGL.vertex3fv(v[1].mV); 
+		gGL.vertex3fv(v[3].mV);
+
+
+		//top
+		gGL.vertex3fv(v[0].mV); 
+		gGL.vertex3fv(v[4].mV);
+
+		gGL.vertex3fv(v[1].mV); 
+		gGL.vertex3fv(v[4].mV);
+
+		gGL.vertex3fv(v[2].mV); 
+		gGL.vertex3fv(v[4].mV);
+
+		gGL.vertex3fv(v[3].mV); 
+		gGL.vertex3fv(v[4].mV);
+
+
+		//bottom
+		gGL.vertex3fv(v[0].mV); 
+		gGL.vertex3fv(v[5].mV);
+
+		gGL.vertex3fv(v[1].mV); 
+		gGL.vertex3fv(v[5].mV);
+
+		gGL.vertex3fv(v[2].mV); 
+		gGL.vertex3fv(v[5].mV);
+
+		gGL.vertex3fv(v[3].mV); 
+		gGL.vertex3fv(v[5].mV);
+
+		gGL.end();
+
+		gGL.popMatrix();
+	}
+
+	mDebugText.clear();
+	addDebugText(ostr.str());
+	addDebugText(nullstr.str());
 }
 
 BOOL LLVOAvatar::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
@@ -3077,9 +3169,6 @@ void	LLVOAvatar::forceUpdateVisualMuteSettings()
 //------------------------------------------------------------------------
 BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 {
-	// clear debug text
-	mDebugText.clear();
-
 	if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
 	{
 		S32 central_bake_version = -1;
@@ -3588,6 +3677,7 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
 	{
 		setDebugText(mDebugText);
 	}
+	mDebugText.clear();
 
 	//mesh vertices need to be reskinned
 	mNeedsSkin = TRUE;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 931e65b3ea..5d897ee44e 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -406,6 +406,7 @@ public:
 	F32			getLastSkinTime() { return mLastSkinTime; }
 	U32 		renderTransparent(BOOL first_pass);
 	void 		renderCollisionVolumes();
+	void		renderJoints();
 	static void	deleteCachedImages(bool clearAll=true);
 	static void	destroyGL();
 	static void	restoreGL();
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 9aeb2d4978..1c7154d413 100755
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -535,15 +535,16 @@ public:
 		RENDER_DEBUG_SHADOW_FRUSTA		= 0x00040000,
 		RENDER_DEBUG_SCULPTED           = 0x00080000,
 		RENDER_DEBUG_AVATAR_VOLUME      = 0x00100000,
-		RENDER_DEBUG_BUILD_QUEUE		= 0x00200000,
-		RENDER_DEBUG_AGENT_TARGET       = 0x00400000,
-		RENDER_DEBUG_UPDATE_TYPE		= 0x00800000,
-		RENDER_DEBUG_PHYSICS_SHAPES     = 0x01000000,
-		RENDER_DEBUG_NORMALS	        = 0x02000000,
-		RENDER_DEBUG_LOD_INFO	        = 0x04000000,
-		RENDER_DEBUG_RENDER_COMPLEXITY  = 0x08000000,
-		RENDER_DEBUG_ATTACHMENT_BYTES	= 0x10000000,
-		RENDER_DEBUG_TEXEL_DENSITY		= 0x20000000
+		RENDER_DEBUG_AVATAR_JOINTS      = 0x00200000,
+		RENDER_DEBUG_BUILD_QUEUE		= 0x00400000,
+		RENDER_DEBUG_AGENT_TARGET       = 0x00800000,
+		RENDER_DEBUG_UPDATE_TYPE		= 0x01000000,
+		RENDER_DEBUG_PHYSICS_SHAPES     = 0x02000000,
+		RENDER_DEBUG_NORMALS	        = 0x04000000,
+		RENDER_DEBUG_LOD_INFO	        = 0x08000000,
+		RENDER_DEBUG_RENDER_COMPLEXITY  = 0x10000000,
+		RENDER_DEBUG_ATTACHMENT_BYTES	= 0x20000000,
+		RENDER_DEBUG_TEXEL_DENSITY		= 0x40000000
 	};
 
 public:
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index d635b8ee93..7d28d87f63 100755
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -2571,6 +2571,16 @@
            function="Advanced.ToggleInfoDisplay"
            parameter="collision skeleton" />
         </menu_item_check>
+        <menu_item_check
+         label="Joints"
+         name="Joints">
+          <menu_item_check.on_check
+           function="Advanced.CheckInfoDisplay"
+           parameter="joints" />
+          <menu_item_check.on_click
+           function="Advanced.ToggleInfoDisplay"
+           parameter="joints" />
+        </menu_item_check>
         <menu_item_check
          label="Raycast"
          name="Raycast">
-- 
cgit v1.2.3


From 3aea5a5a6ab0e6d96fe581a9bab9896956129ba3 Mon Sep 17 00:00:00 2001
From: JJ Linden <jj@lindenlab.com>
Date: Thu, 10 Oct 2013 16:44:05 -0700
Subject: adding quicklinks for extra packages:w

---
 build.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/build.sh b/build.sh
index 4875ef39f7..784b4b674d 100755
--- a/build.sh
+++ b/build.sh
@@ -371,6 +371,7 @@ then
         if [ x"$package" != x ]
         then
           upload_item installer "$package" binary/octet-stream
+          upload_item quicklink "$package" binary/octet-stream
         else
           record_failure "Failed to upload $package_id package."
         fi
-- 
cgit v1.2.3


From 356db2b9b9e2c04d50cc37d0101f559b190f3578 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Mon, 21 Oct 2013 12:55:51 -0500
Subject: MAINT-3311 Add avatar_lad and avatar_skeleton changes from Jeremiah

---
 indra/newview/character/avatar_lad.xml      | 148 +++++++++++++++++++++++++---
 indra/newview/character/avatar_skeleton.xml |  10 +-
 2 files changed, 144 insertions(+), 14 deletions(-)

diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index e5b385f4aa..b615d8d469 100755
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -3826,6 +3826,10 @@
           name="BELLY"
           scale="0.075 0.04 0.03"
           pos="0.07 0 -0.07"/>
+        <volume_morph
+          name="STOMACH"
+          scale="0.0272 0.0272 0.0272"
+          pos="0.132 -0.016 0.0"/>
       </param_morph>
     </param>
 
@@ -3844,7 +3848,16 @@
      camera_elevation=".1"
      camera_distance="1"
      camera_angle="15">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0273 0.0273 0.0273"
+          pos="0.038 0.024 -0.016"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0273 0.0273 0.0273"
+          pos="0.038 -0.024 -0.016"/>
+	  </param_morph>
     </param>
 
     <param
@@ -3861,7 +3874,16 @@
      value_max="1"
      camera_elevation="0"
      camera_distance=".28">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 -0.027 0.007"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.027 0.007"/>
+	  </param_morph>
     </param>
 
     <param
@@ -3878,7 +3900,16 @@
      value_max="1"
      camera_elevation="0"
      camera_distance=".28">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 -0.035 0.009"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.035 0.009"/>
+	  </param_morph>
     </param>
 
     <param
@@ -4041,6 +4072,18 @@
           name="CHEST"
           scale="0.02 0.03 0.03"
           pos="0 0 -0.03"/>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0367 0.0367 0.016"
+          pos="0.031 -0.005 -0.013"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0367 0.0367 0.016"
+          pos="0.031 0.005 -0.013"/>
+        <volume_morph
+          name="STOMACH"
+          scale="0.0426 0.0426 0.0426"
+          pos="0.077 0.0 -0.0"/>
         <volume_morph
           name="BELLY"
           scale="0.09 0.08 0.07"
@@ -4093,7 +4136,16 @@
      value_max="2"
      camera_elevation=".3"
      camera_distance=".8">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.004 0.0 -0.01"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.004 0.0 -0.01"/>
+      </param_morph>
     </param>
     
     <param
@@ -4143,6 +4195,12 @@
         <volume_morph
           name="BELLY"
           scale="0.0 0.02 0.0"/>
+        <volume_morph
+          name="LEFT_HANDLE"
+          pos="0.0 0.025 0.0"/>
+        <volume_morph
+          name="RIGHT_HANDLE"
+          pos="0.0 -0.025 0.0"/>
       </param_morph>
     </param>
 
@@ -4162,7 +4220,16 @@
      value_max="1.3"
      camera_elevation=".3"
      camera_distance=".8">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 -0.026 0.0"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.026 0.0"/>
+      </param_morph>
     </param>
     
     <param
@@ -4181,7 +4248,16 @@
      value_max="1.1"
      camera_elevation=".3"
      camera_distance="1.2">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.01 -0.024 0.008"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="-0.01 0.024 0.008"/>
+      </param_morph>
     </param>
 
     <!-- ############# # 
@@ -4205,6 +4281,14 @@
           name="BELLY"
           scale="0.03 0.03 0.0"
           pos="-0.03 0 0.02"/>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.008 -0.03 0.01"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.008 0.03 0.01"/>
         <volume_morph
           name="L_CLAVICLE"
           scale="0.02 0.0 0.01"
@@ -4376,7 +4460,16 @@
      value_default="0"
      value_min="-3"
      value_max="3">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.0 -0.01"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.0 -0.01"/>
+	  </param_morph>
     </param>
 
     <param
@@ -4389,7 +4482,16 @@
      value_default="0"
      value_min="-1.25"
      value_max="1.25">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 -0.026 0.0"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.026 -0.0"/>
+	  </param_morph>
     </param>
 
     <param
@@ -4402,7 +4504,12 @@
      value_default="0"
      value_min="-1"
      value_max="1">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="STOMACH"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.0 0.05"/>
+	  </param_morph>
     </param>
 
     <param
@@ -4415,7 +4522,16 @@
      value_default="0"
      value_min="-2"
      value_max="2">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="LEFT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.03 0.0"/>
+        <volume_morph
+          name="RIGHT_PEC"
+          scale="0.0 0.0 0.0"
+          pos="0.0 0.03 0.0"/>
+	  </param_morph>
     </param>
 
     <!--
@@ -4949,7 +5065,11 @@
      value_default="0"
      value_min="-1"
      value_max="1">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="BUTT"
+          pos="0.0 0.0 0.05"/>
+	  </param_morph>
     </param>
 
     <param
@@ -4962,7 +5082,11 @@
      value_default="0"
      value_min="-1"
      value_max="1">
-      <param_morph />
+      <param_morph>
+        <volume_morph
+          name="BUTT"
+          pos="0.0 0.05 0.0"/>
+	  </param_morph>
     </param>
 
     <!--
diff --git a/indra/newview/character/avatar_skeleton.xml b/indra/newview/character/avatar_skeleton.xml
index 5e73804f2d..48cf419246 100755
--- a/indra/newview/character/avatar_skeleton.xml
+++ b/indra/newview/character/avatar_skeleton.xml
@@ -1,11 +1,17 @@
 <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
-<linden_skeleton version="1.0" num_bones="46" num_collision_volumes="19">
+<linden_skeleton version="1.0" num_bones="52" num_collision_volumes="25">
 <bone name="mPelvis" pos="0.000 0.000 1.067" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 0.000000 1.067015">
 	<collision_volume name="PELVIS" pos = "-0.01 0 -0.02" rot="0.000000 8.00000 0.000000" scale="0.12 0.16 0.17"/>
+	<collision_volume name="BUTT" pos = "-0.06 0 -0.1" rot="0.000000 0.00000 0.000000" scale="0.1 0.1 0.1"/>
 	<bone name="mTorso" pos="0.000 0.000 0.084" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 0.000000 0.084073">
-		<collision_volume name="BELLY" pos = "0.028 0 0.04" rot="0.000000 8.00000 0.000000" scale="0.09 0.13 0.15"/>
+		<collision_volume name="BELLY" pos = "0.04 0 0.028" rot="0.000000 8.00000 0.000000" scale="0.09 0.13 0.15"/>
+		<collision_volume name="STOMACH" pos = "0.088 0 0.092" rot="0.000000 0.00000 0.000000" scale="0.09 0.13 0.15"/>
+		<collision_volume name="LEFT_HANDLE" pos = "0.056 0.125 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
+		<collision_volume name="RIGHT_HANDLE" pos = "0.056 -0.125 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
 		<bone name="mChest" pos="-0.015 0.000 0.205" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="-0.015368 0.000000 0.204877">
 			<collision_volume name="CHEST" pos = "0.028 0 0.07" rot="0.000000 -10.00000 0.000000" scale="0.11 0.15 0.2"/>
+			<collision_volume name="LEFT_PEC" pos = "0.119 0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05"/>
+			<collision_volume name="RIGHT_PEC" pos = "0.119 -0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05"/>
 			<bone name="mNeck" pos="-0.010 0.000 0.251" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="-0.009507 0.000000 0.251108">
 				<collision_volume name="NECK" pos = "0.0 0 0.02" rot="0.000000 0.000000 0.000000" scale="0.05 0.06 0.08"/>
 				<bone name="mHead" pos="0.000 -0.000 0.076" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 -0.000000 0.075630">
-- 
cgit v1.2.3


From 994ecbed340b3ffb5f37d377460188ae8da7710b Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 29 Oct 2013 13:53:43 -0400
Subject: add credit for BUG-3863

---
 doc/contributions.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 99527c0587..33d213d7cb 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -307,6 +307,7 @@ Christopher  Organiser
 Ciaran Laval
 Cinder Roxley
     BUG-2326
+    BUG-3863
     OPEN-185
     STORM-1703
 	STORM-1948
-- 
cgit v1.2.3


From 07b5e702e67fd652ff7e2a681c34ec8e4e825921 Mon Sep 17 00:00:00 2001
From: Tonya Souther <tonya.souther@gmail.com>
Date: Tue, 29 Oct 2013 13:59:21 -0400
Subject: BUG-3968: do not wear an object when renaming in inventory

---
 doc/contributions.txt               | 2 ++
 indra/llwindow/llopenglview-objc.mm | 7 -------
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 33d213d7cb..08ed5929cb 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -1259,6 +1259,8 @@ Tofu Buzzard
 Tony Kembia
 Tonya Souther
 	STORM-1905
+	BUG-3875
+	BUG-3968
 Torben Trautman
 TouchaHoney Perhaps
 TraductoresAnonimos Alter
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 7415c9d8dc..b393a3796d 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -376,13 +376,6 @@ attributedStringInfo getSegments(NSAttributedString *str)
         [[self inputContext] handleEvent:theEvent];
     }
     
-    if ([[theEvent charactersIgnoringModifiers] characterAtIndex:0] == NSCarriageReturnCharacter ||
-        [[theEvent charactersIgnoringModifiers] characterAtIndex:0] == NSEnterCharacter)
-    {
-        // callKeyDown won't return the value we expect for enter or return.  Handle them as a separate case.
-        [[self inputContext] handleEvent:theEvent];
-    }
-    
     // OS X intentionally does not send us key-up information on cmd-key combinations.
     // This behaviour is not a bug, and only applies to cmd-combinations (no others).
     // Since SL assumes we receive those, we fake it here.
-- 
cgit v1.2.3


From 07c011bc9c3ea2fc8eec6474c7907c9fc44bbef3 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 29 Oct 2013 15:12:39 -0400
Subject: STORM-1975 IM windows occasionally report false typing status.

---
 doc/contributions.txt                |  1 +
 indra/newview/llfloaterimsession.cpp | 82 ++++++++++++++++++++++++++++++++----
 indra/newview/llfloaterimsession.h   |  4 ++
 3 files changed, 78 insertions(+), 9 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 99527c0587..a4f42b5917 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1975
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 5cb9df5625..551acdb259 100755
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -61,6 +61,9 @@
 #include "llnotificationmanager.h"
 #include "llautoreplace.h"
 
+const F32 ME_TYPING_TIMEOUT = 3.0f;
+const F32 OTHER_TYPING_TIMEOUT = 4.0f;
+
 floater_showed_signal_t LLFloaterIMSession::sIMFloaterShowedSignal;
 
 LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
@@ -75,7 +78,10 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
 	mTypingTimer(),
 	mTypingTimeoutTimer(),
 	mPositioned(false),
-	mSessionInitialized(false)
+	mSessionInitialized(false),
+	mMeTypingTimer(),
+	mOtherTypingTimer(),
+	mImInfo()
 {
 	mIsNearbyChat = false;
 
@@ -96,13 +102,31 @@ LLFloaterIMSession::LLFloaterIMSession(const LLUUID& session_id)
 void LLFloaterIMSession::refresh()
 {
 	if (mMeTyping)
-{
+	{
+		// Send an additional Start Typing packet every ME_TYPING_TIMEOUT seconds
+		if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState)
+		{
+llwarns << "DBG Send additional Start Typing packet" << llendl;
+			LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
+			mMeTypingTimer.reset();
+		}
+
 		// Time out if user hasn't typed for a while.
 		if (mTypingTimeoutTimer.getElapsedTimeF32() > LLAgent::TYPING_TIMEOUT_SECS)
 		{
-	setTyping(false);
+			setTyping(false);
+llwarns << "DBG Send stop typing due to timeout" << llendl;
 		}
 	}
+
+	// Clear <name is typing> message if no data received for OTHER_TYPING_TIMEOUT seconds
+	if (mOtherTyping && mOtherTypingTimer.getElapsedTimeF32() > OTHER_TYPING_TIMEOUT)
+	{
+llwarns << "DBG Received: is typing cleared due to timeout" << llendl;
+		removeTypingIndicator(mImInfo);
+		mOtherTyping = false;
+	}
+
 }
 
 // virtual
@@ -953,13 +977,21 @@ void LLFloaterIMSession::setTyping(bool typing)
 	// much network traffic. Only send in person-to-person IMs.
 	if ( mShouldSendTypingState && mDialog == IM_NOTHING_SPECIAL )
 	{
-		// Still typing, send 'start typing' notification or
-		// send 'stop typing' notification immediately
-		if (!mMeTyping || mTypingTimer.getElapsedTimeF32() > 1.f)
+		if ( mMeTyping )
 		{
-			LLIMModel::instance().sendTypingState(mSessionID,
-					mOtherParticipantUUID, mMeTyping);
-					mShouldSendTypingState = false;
+			if ( mTypingTimer.getElapsedTimeF32() > 1.f )
+			{
+				// Still typing, send 'start typing' notification
+				LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
+				mShouldSendTypingState = false;
+				mMeTypingTimer.reset();
+			}
+		}
+		else
+		{
+			// Send 'stop typing' notification immediately
+			LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, FALSE);
+			mShouldSendTypingState = false;
 		}
 	}
 
@@ -975,10 +1007,12 @@ void LLFloaterIMSession::setTyping(bool typing)
 
 void LLFloaterIMSession::processIMTyping(const LLIMInfo* im_info, BOOL typing)
 {
+llwarns << "DBG typing=" << typing << llendl;
 	if ( typing )
 	{
 		// other user started typing
 		addTypingIndicator(im_info);
+		mOtherTypingTimer.reset();
 	}
 	else
 	{
@@ -1202,10 +1236,40 @@ BOOL LLFloaterIMSession::inviteToSession(const uuid_vec_t& ids)
 
 void LLFloaterIMSession::addTypingIndicator(const LLIMInfo* im_info)
 {
+/* Operation of "<name> is typing" state machine:
+Not Typing state:
+
+    User types in P2P IM chat ... Send Start Typing, save Started time,
+    start Idle Timer (N seconds) go to Typing state
+
+Typing State:
+
+    User enters a non-return character: if Now - Started > ME_TYPING_TIMEOUT, send
+    Start Typing, restart Idle Timer
+    User enters a return character: stop Idle Timer, send IM and Stop
+    Typing, go to Not Typing state
+    Idle Timer expires: send Stop Typing, go to Not Typing state
+
+The recipient has a complementary state machine in which a Start Typing
+that is not followed by either an IM or another Start Typing within OTHER_TYPING_TIMEOUT
+seconds switches the sender out of typing state.
+
+This has the nice quality of being self-healing for lost start/stop
+messages while adding messages only for the (relatively rare) case of a
+user who types a very long message (one that takes more than ME_TYPING_TIMEOUT seconds
+to type).
+
+Note: OTHER_TYPING_TIMEOUT must be > ME_TYPING_TIMEOUT for proper operation of the state machine
+
+*/
+
 	// We may have lost a "stop-typing" packet, don't add it twice
 	if (im_info && !mOtherTyping)
 	{
 		mOtherTyping = true;
+		mOtherTypingTimer.reset();
+		// Save im_info so that removeTypingIndicator can be properly called because a timeout has occurred
+		mImInfo = im_info;
 
 		// Update speaker
 		LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(mSessionID);
diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h
index a0e0171b34..60039b2e57 100755
--- a/indra/newview/llfloaterimsession.h
+++ b/indra/newview/llfloaterimsession.h
@@ -187,6 +187,8 @@ private:
 	LLFrameTimer mTypingTimer;
 	LLFrameTimer mTypingTimeoutTimer;
 	bool mSessionNameUpdatedForTyping;
+	LLFrameTimer mMeTypingTimer;
+	LLFrameTimer mOtherTypingTimer;
 
 	bool mSessionInitialized;
 	LLSD mQueuedMsgsForInit;
@@ -196,6 +198,8 @@ private:
 
 	// connection to voice channel state change signal
 	boost::signals2::connection mVoiceChannelStateChangeConnection;
+
+	const LLIMInfo* mImInfo;
 };
 
 #endif  // LL_FLOATERIMSESSION_H
-- 
cgit v1.2.3


From c5df71b1c41148f07e19fd3d4f7833305bcec9de Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 29 Oct 2013 16:21:17 -0400
Subject: STORM-1975 Convert old-style debugging lines to new-style

---
 indra/newview/llfloaterimsession.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 551acdb259..05754bc126 100755
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -106,7 +106,7 @@ void LLFloaterIMSession::refresh()
 		// Send an additional Start Typing packet every ME_TYPING_TIMEOUT seconds
 		if (mMeTypingTimer.getElapsedTimeF32() > ME_TYPING_TIMEOUT && false == mShouldSendTypingState)
 		{
-llwarns << "DBG Send additional Start Typing packet" << llendl;
+			LL_DEBUGS("TypingMsgs") << "Send additional Start Typing packet" << LL_ENDL;
 			LLIMModel::instance().sendTypingState(mSessionID, mOtherParticipantUUID, TRUE);
 			mMeTypingTimer.reset();
 		}
@@ -115,14 +115,14 @@ llwarns << "DBG Send additional Start Typing packet" << llendl;
 		if (mTypingTimeoutTimer.getElapsedTimeF32() > LLAgent::TYPING_TIMEOUT_SECS)
 		{
 			setTyping(false);
-llwarns << "DBG Send stop typing due to timeout" << llendl;
+			LL_DEBUGS("TypingMsgs") << "Send stop typing due to timeout" << LL_ENDL;
 		}
 	}
 
 	// Clear <name is typing> message if no data received for OTHER_TYPING_TIMEOUT seconds
 	if (mOtherTyping && mOtherTypingTimer.getElapsedTimeF32() > OTHER_TYPING_TIMEOUT)
 	{
-llwarns << "DBG Received: is typing cleared due to timeout" << llendl;
+		LL_DEBUGS("TypingMsgs") << "Received: is typing cleared due to timeout" << LL_ENDL;
 		removeTypingIndicator(mImInfo);
 		mOtherTyping = false;
 	}
@@ -1007,7 +1007,7 @@ void LLFloaterIMSession::setTyping(bool typing)
 
 void LLFloaterIMSession::processIMTyping(const LLIMInfo* im_info, BOOL typing)
 {
-llwarns << "DBG typing=" << typing << llendl;
+	LL_DEBUGS("TypingMsgs") << "typing=" << typing << LL_ENDL;
 	if ( typing )
 	{
 		// other user started typing
-- 
cgit v1.2.3


From ef825a1d2cf7fee9df79db7ae517ccf59f247a80 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 30 Oct 2013 16:20:32 -0400
Subject: STORM-1975 Changed timeout constants to ME_TYPING_TIMEOUT = 4.0
 OTHER_TYPING_TIMEOUT = 9.0

---
 indra/newview/llfloaterimsession.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index 05754bc126..aa933091a8 100755
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -61,8 +61,8 @@
 #include "llnotificationmanager.h"
 #include "llautoreplace.h"
 
-const F32 ME_TYPING_TIMEOUT = 3.0f;
-const F32 OTHER_TYPING_TIMEOUT = 4.0f;
+const F32 ME_TYPING_TIMEOUT = 4.0f;
+const F32 OTHER_TYPING_TIMEOUT = 9.0f;
 
 floater_showed_signal_t LLFloaterIMSession::sIMFloaterShowedSignal;
 
-- 
cgit v1.2.3


From e3739edeff2e872ecee5f4dc29247f09db1ed87c Mon Sep 17 00:00:00 2001
From: Ansariel <none@none>
Date: Sat, 2 Nov 2013 21:57:06 +0100
Subject: BUG-3764: Groups count in groups list does not display if floater is
 resized

---
 doc/contributions.txt                               | 2 ++
 indra/newview/skins/default/xui/en/panel_people.xml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index f1e907998b..6acd98529b 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -180,6 +180,8 @@ Ansariel Hiller
 	MAINT-2368
 	STORM-1931
 	MAINT-2773
+	BUG-3764
+	STORM-1979
 Aralara Rajal
 Arare Chantilly
 	CHUIBUG-191
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index dc0e4a5947..d2caf63052 100755
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -500,12 +500,13 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
             <text
                 type="string"
                 length="1"
-                follows="all"
+                follows="left|top|right"
                 height="14"
                 layout="topleft"
                 right="-10"
                 top_pad="4"
                 left="3"
+                use_ellipses="true"
                 name="groupcount">
               You belong to [COUNT] groups, and can join [REMAINING] more.
             </text>
-- 
cgit v1.2.3


From caaaa1e5e6444fa7d96a5bda792cea797b716282 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 5 Nov 2013 10:01:41 -0500
Subject: STORM-1980 Play sound for region restarting message

---
 doc/contributions.txt             | 1 +
 indra/newview/llviewermessage.cpp | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 99527c0587..c50c57feea 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1980
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ab9ea5618e..ebc6ff8165 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6085,6 +6085,7 @@ void process_alert_core(const std::string& message, BOOL modal)
 			LLStringUtil::convertToS32(text.substr(18), mins);
 			args["MINUTES"] = llformat("%d",mins);
 			LLNotificationsUtil::add("RegionRestartMinutes", args);
+			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
 		}
 		else if (text.substr(0,17) == "RESTART_X_SECONDS")
 		{
@@ -6092,6 +6093,7 @@ void process_alert_core(const std::string& message, BOOL modal)
 			LLStringUtil::convertToS32(text.substr(18), secs);
 			args["SECONDS"] = llformat("%d",secs);
 			LLNotificationsUtil::add("RegionRestartSeconds", args);
+			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
 		}
 		else
 		{
-- 
cgit v1.2.3


From 2454bcc8db5952a16bd3a880825bf6a1b7086c3c Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 5 Nov 2013 10:24:41 -0500
Subject: STORM-=1982 Remove duplicate entry in settings.xml

---
 doc/contributions.txt                   |  1 +
 indra/newview/app_settings/settings.xml | 11 -----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 99527c0587..e715221826 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1982
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 41aac583d7..50b0e54f5d 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -14860,17 +14860,6 @@
     <key>Value</key>
     <integer>0</integer>
   </map>
-  <key>DisablePrecacheDelayAfterTeleporting</key>
-  <map>
-    <key>Comment</key>
-    <string>Disables the artificial delay in the viewer that precaches some incoming assets</string>
-    <key>Persist</key>
-    <integer>0</integer>
-    <key>Type</key>
-    <string>Boolean</string>
-    <key>Value</key>
-    <integer>0</integer>
-  </map>
   <key>FMODExProfilerEnable</key>
   <map>
     <key>Comment</key>
-- 
cgit v1.2.3


From ceb15e6edeed5d0e1fb7eaab9bc5b1592a252303 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 5 Nov 2013 15:45:48 -0500
Subject: STORM-1980/1983 Add time to region restarting message

---
 indra/newview/llviewermessage.cpp                  | 48 ++++++++++------------
 .../newview/skins/default/xui/en/notifications.xml |  4 +-
 indra/newview/skins/default/xui/en/strings.xml     |  3 ++
 3 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ebc6ff8165..bcd535bb90 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5748,7 +5748,6 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock)
 	std::string regionMaturity = LLViewerRegion::accessToString(regionAccess);
 	LLStringUtil::toLower(regionMaturity);
 	llsdBlock["REGIONMATURITY"] = regionMaturity;
-	
 	bool returnValue = false;
 	LLNotificationPtr maturityLevelNotification;
 	std::string notifySuffix = "_Notify";
@@ -5918,6 +5917,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			(notificationID == "RegionEntryAccessBlocked") ||
 			(notificationID == "LandClaimAccessBlocked") ||
 			(notificationID == "LandBuyAccessBlocked")
+
 		   )
 		{
 			/*---------------------------------------------------------------------
@@ -5959,7 +5959,23 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			snap_filename += SCREEN_HOME_FILENAME;
 			gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
 		}
-		
+
+	if (notificationID == "RegionRestartMinutes" ||
+		notificationID == "RegionRestartSeconds")
+	{
+		// Get current UTC time, adjusted for the user's clock
+		// being off.
+		time_t utc_time;
+		utc_time = time_corrected();
+		std::string timeStr = LLTrans::getString("ViewerMessageTime");
+		LLSD substitution;
+		substitution["datetime"] = (S32) utc_time;
+		LLStringUtil::format(timeStr, substitution);
+		llsdBlock["TIME"] = timeStr;
+
+		send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
+	}
+
 		LLNotificationsUtil::add(notificationID, llsdBlock);
 		return true;
 	}	
@@ -6019,7 +6035,6 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
 		
 	std::string message;
 	msgsystem->getStringFast(_PREHASH_AlertData, _PREHASH_Message, message);
-
 	process_special_alert_messages(message);
 
 	if (!attempt_standard_notification(msgsystem))
@@ -6043,7 +6058,6 @@ bool handle_not_age_verified_alert(const std::string &pAlertName)
 bool handle_special_alerts(const std::string &pAlertName)
 {
 	bool isHandled = false;
-
 	if (LLStringUtil::compareStrings(pAlertName, "NotAgeVerified") == 0)
 	{
 		
@@ -6079,28 +6093,10 @@ void process_alert_core(const std::string& message, BOOL modal)
 		// System message is important, show in upper-right box not tip
 		std::string text(message.substr(1));
 		LLSD args;
-		if (text.substr(0,17) == "RESTART_X_MINUTES")
-		{
-			S32 mins = 0;
-			LLStringUtil::convertToS32(text.substr(18), mins);
-			args["MINUTES"] = llformat("%d",mins);
-			LLNotificationsUtil::add("RegionRestartMinutes", args);
-			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
-		}
-		else if (text.substr(0,17) == "RESTART_X_SECONDS")
-		{
-			S32 secs = 0;
-			LLStringUtil::convertToS32(text.substr(18), secs);
-			args["SECONDS"] = llformat("%d",secs);
-			LLNotificationsUtil::add("RegionRestartSeconds", args);
-			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
-		}
-		else
-		{
-			std::string new_msg =LLNotifications::instance().getGlobalString(text);
-			args["MESSAGE"] = new_msg;
-			LLNotificationsUtil::add("SystemMessage", args);
-		}
+
+		std::string new_msg =LLNotifications::instance().getGlobalString(text);
+		args["MESSAGE"] = new_msg;
+		LLNotificationsUtil::add("SystemMessage", args);
 	}
 	else if (modal)
 	{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index e7c89db069..a0a5a0395a 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6887,7 +6887,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
    priority="high"
    sound="UISndAlert"
    type="notify">
-This region will restart in [MINUTES] minutes.
+[TIME] This region will restart in [MINUTES] minutes.
 If you stay in this region you will be logged out.
   </notification>
 
@@ -6897,7 +6897,7 @@ If you stay in this region you will be logged out.
    priority="high"
    sound="UISndAlert"
    type="notify">
-This region will restart in [SECONDS] seconds.
+[TIME] This region will restart in [SECONDS] seconds.
 If you stay in this region you will be logged out.
   </notification>
 
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 8ac95beddb..3fc1609cd4 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2551,6 +2551,9 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
   <!-- panel preferences general -->
   <string name="DoNotDisturbModeResponseDefault">This resident has turned on &apos;Do Not Disturb&apos; and will see your message later.</string>
 
+	<!-- viewermessage -->
+	<string name="ViewerMessageTime">[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]</string>
+
 	<!-- Mute -->
 	<string name="MuteByName">(By name)</string>
 	<string name="MuteAgent">(Resident)</string>
-- 
cgit v1.2.3


From 7d4deed8bef62cee1fc782a9676505136b231412 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 5 Nov 2013 17:47:00 -0500
Subject: STORM-1980/1983 Attempt to test alert message with a new uploaded
 sound

---
 indra/newview/llviewermessage.cpp | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index bcd535bb90..51260c98cd 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5960,21 +5960,21 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE);
 		}
 
-	if (notificationID == "RegionRestartMinutes" ||
-		notificationID == "RegionRestartSeconds")
-	{
-		// Get current UTC time, adjusted for the user's clock
-		// being off.
-		time_t utc_time;
-		utc_time = time_corrected();
-		std::string timeStr = LLTrans::getString("ViewerMessageTime");
-		LLSD substitution;
-		substitution["datetime"] = (S32) utc_time;
-		LLStringUtil::format(timeStr, substitution);
-		llsdBlock["TIME"] = timeStr;
+		if (notificationID == "RegionRestartMinutes" ||
+			notificationID == "RegionRestartSeconds")
+		{
+			// Get current UTC time, adjusted for the user's clock
+			// being off.
+			time_t utc_time;
+			utc_time = time_corrected();
+			std::string timeStr = LLTrans::getString("ViewerMessageTime");
+			LLSD substitution;
+			substitution["datetime"] = (S32) utc_time;
+			LLStringUtil::format(timeStr, substitution);
+			llsdBlock["TIME"] = timeStr;
 
-		send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
-	}
+			send_sound_trigger(LLUUID("4b315701-1972-9e23-cdd8-23cbc8cb0f42"), 1.0f);
+		}
 
 		LLNotificationsUtil::add(notificationID, llsdBlock);
 		return true;
-- 
cgit v1.2.3


From 21ff4de02669f04ca9afec8d3f5aa0b68864fd13 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 5 Nov 2013 17:57:56 -0500
Subject: STORM-1980/1983 Revert previous change

---
 indra/newview/llviewermessage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 51260c98cd..f66b3ba805 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5973,7 +5973,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			LLStringUtil::format(timeStr, substitution);
 			llsdBlock["TIME"] = timeStr;
 
-			send_sound_trigger(LLUUID("4b315701-1972-9e23-cdd8-23cbc8cb0f42"), 1.0f);
+			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
 		}
 
 		LLNotificationsUtil::add(notificationID, llsdBlock);
-- 
cgit v1.2.3


From b8f1e2a7704bdac5ef270be21918317a17f77b2a Mon Sep 17 00:00:00 2001
From: "jeremiah@lindenlab.com" <jeremiah@lindenlab.com>
Date: Wed, 6 Nov 2013 11:30:39 -0500
Subject: updated avatar files

---
 indra/newview/character/avatar_lad.xml      | 24 ++++++++++--------------
 indra/newview/character/avatar_skeleton.xml |  7 +++----
 2 files changed, 13 insertions(+), 18 deletions(-)
 mode change 100755 => 100644 indra/newview/character/avatar_lad.xml
 mode change 100755 => 100644 indra/newview/character/avatar_skeleton.xml

diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
old mode 100755
new mode 100644
index b615d8d469..884d16b94b
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -3826,10 +3826,6 @@
           name="BELLY"
           scale="0.075 0.04 0.03"
           pos="0.07 0 -0.07"/>
-        <volume_morph
-          name="STOMACH"
-          scale="0.0272 0.0272 0.0272"
-          pos="0.132 -0.016 0.0"/>
       </param_morph>
     </param>
 
@@ -4080,10 +4076,6 @@
           name="RIGHT_PEC"
           scale="0.0367 0.0367 0.016"
           pos="0.031 0.005 -0.013"/>
-        <volume_morph
-          name="STOMACH"
-          scale="0.0426 0.0426 0.0426"
-          pos="0.077 0.0 -0.0"/>
         <volume_morph
           name="BELLY"
           scale="0.09 0.08 0.07"
@@ -4244,7 +4236,7 @@
      label_min="Big Pectorals"
      label_max="Sunken Chest"
      value_default="0"
-     value_min="-.5"
+     value_min="-1.0"
      value_max="1.1"
      camera_elevation=".3"
      camera_distance="1.2">
@@ -4252,11 +4244,11 @@
         <volume_morph
           name="LEFT_PEC"
           scale="0.0 0.0 0.0"
-          pos="0.01 -0.024 0.008"/>
+          pos="-0.01 -0.024 -0.05"/>
         <volume_morph
           name="RIGHT_PEC"
           scale="0.0 0.0 0.0"
-          pos="-0.01 0.024 0.008"/>
+          pos="-0.01 0.024 -0.05"/>
       </param_morph>
     </param>
 
@@ -4275,8 +4267,8 @@
       <param_morph>
         <volume_morph
           name="CHEST"
-          scale="0.03 0.04 0.02"
-          pos="-0.03 0 -0.01"/>
+          scale="0 0 0"
+          pos="0 0 0"/>
         <volume_morph
           name="BELLY"
           scale="0.03 0.03 0.0"
@@ -4506,7 +4498,7 @@
      value_max="1">
       <param_morph>
         <volume_morph
-          name="STOMACH"
+          name="BELLY"
           scale="0.0 0.0 0.0"
           pos="0.0 0.0 0.05"/>
 	  </param_morph>
@@ -4634,6 +4626,10 @@
           name="PELVIS"
           scale="-0.01 0.0 0.0"
           pos="0.01 0 0.0"/>
+        <volume_morph
+          name="BUTT"
+          scale="0.0 0.0886 0.0"
+          pos="0.03 0 0.0"/>
       </param_morph>
     </param>
 
diff --git a/indra/newview/character/avatar_skeleton.xml b/indra/newview/character/avatar_skeleton.xml
old mode 100755
new mode 100644
index 48cf419246..7ab20f8c6b
--- a/indra/newview/character/avatar_skeleton.xml
+++ b/indra/newview/character/avatar_skeleton.xml
@@ -1,13 +1,12 @@
 <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
-<linden_skeleton version="1.0" num_bones="52" num_collision_volumes="25">
+<linden_skeleton version="1.0" num_bones="51" num_collision_volumes="24">
 <bone name="mPelvis" pos="0.000 0.000 1.067" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 0.000000 1.067015">
 	<collision_volume name="PELVIS" pos = "-0.01 0 -0.02" rot="0.000000 8.00000 0.000000" scale="0.12 0.16 0.17"/>
 	<collision_volume name="BUTT" pos = "-0.06 0 -0.1" rot="0.000000 0.00000 0.000000" scale="0.1 0.1 0.1"/>
 	<bone name="mTorso" pos="0.000 0.000 0.084" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 0.000000 0.084073">
 		<collision_volume name="BELLY" pos = "0.04 0 0.028" rot="0.000000 8.00000 0.000000" scale="0.09 0.13 0.15"/>
-		<collision_volume name="STOMACH" pos = "0.088 0 0.092" rot="0.000000 0.00000 0.000000" scale="0.09 0.13 0.15"/>
-		<collision_volume name="LEFT_HANDLE" pos = "0.056 0.125 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
-		<collision_volume name="RIGHT_HANDLE" pos = "0.056 -0.125 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
+		<collision_volume name="LEFT_HANDLE" pos = "0.0 0.10 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
+		<collision_volume name="RIGHT_HANDLE" pos = "0.0 -0.10 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
 		<bone name="mChest" pos="-0.015 0.000 0.205" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="-0.015368 0.000000 0.204877">
 			<collision_volume name="CHEST" pos = "0.028 0 0.07" rot="0.000000 -10.00000 0.000000" scale="0.11 0.15 0.2"/>
 			<collision_volume name="LEFT_PEC" pos = "0.119 0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05"/>
-- 
cgit v1.2.3


From 662efccfb821c2bf61c286aeec97563d7f95a9f8 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 6 Nov 2013 15:11:11 -0500
Subject: STORM-1980/1983 Add debug setting UISndRestart and value.  This UUID
 will need to be replaced with an official UUID once one has been established.

---
 indra/newview/app_settings/settings.xml | 11 +++++++++++
 indra/newview/llviewermessage.cpp       |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 41aac583d7..be5f81e7e7 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12621,6 +12621,17 @@
       <key>Value</key>
       <string>00000000-0000-0000-0000-000000000000</string>
     </map>
+    <key>UISndRestart</key>
+    <map>
+      <key>Comment</key>
+      <string>Sound file for region restarting (uuid for sound asset)</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>String</string>
+      <key>Value</key>
+      <string>4b315701-1972-9e23-cdd8-23cbc8cb0f42</string>
+    </map>
     <key>UISndSnapshot</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f66b3ba805..48bfdc03ac 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5973,7 +5973,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			LLStringUtil::format(timeStr, substitution);
 			llsdBlock["TIME"] = timeStr;
 
-			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndAlert")), 1.0f);
+			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndRestart")), 1.0f);
 		}
 
 		LLNotificationsUtil::add(notificationID, llsdBlock);
-- 
cgit v1.2.3


From 3e429c1e11ab5d9a3279598fd671cee230d40afd Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Fri, 8 Nov 2013 16:15:36 -0500
Subject: STORM-1980/1983 Small XML cleanup. Changed notification type to
 Alert. Addes seconds field to notification message.

---
 indra/newview/llviewermessage.cpp                    | 2 +-
 indra/newview/skins/default/xui/en/notifications.xml | 6 ++----
 indra/newview/skins/default/xui/en/strings.xml       | 2 +-
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 48bfdc03ac..805b3aab18 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5967,7 +5967,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			// being off.
 			time_t utc_time;
 			utc_time = time_corrected();
-			std::string timeStr = LLTrans::getString("ViewerMessageTime");
+			std::string timeStr = LLTrans::getString("HMSTime");
 			LLSD substitution;
 			substitution["datetime"] = (S32) utc_time;
 			LLStringUtil::format(timeStr, substitution);
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index a0a5a0395a..083ff46ebb 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6885,8 +6885,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
    icon="notify.tga"
    name="RegionRestartMinutes"
    priority="high"
-   sound="UISndAlert"
-   type="notify">
+   type="alert">
 [TIME] This region will restart in [MINUTES] minutes.
 If you stay in this region you will be logged out.
   </notification>
@@ -6895,8 +6894,7 @@ If you stay in this region you will be logged out.
    icon="notify.tga"
    name="RegionRestartSeconds"
    priority="high"
-   sound="UISndAlert"
-   type="notify">
+   type="alert">
 [TIME] This region will restart in [SECONDS] seconds.
 If you stay in this region you will be logged out.
   </notification>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 3fc1609cd4..4534434c46 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2552,7 +2552,7 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
   <string name="DoNotDisturbModeResponseDefault">This resident has turned on &apos;Do Not Disturb&apos; and will see your message later.</string>
 
 	<!-- viewermessage -->
-	<string name="ViewerMessageTime">[hour12, datetime, slt]:[min, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]</string>
+	<string name="HMSTime">[hour12, datetime, slt]:[min, datetime, slt]:[second, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]</string>
 
 	<!-- Mute -->
 	<string name="MuteByName">(By name)</string>
-- 
cgit v1.2.3


From 8298e5e558fb6236fc32feb60fe097cee1751d7c Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 12 Nov 2013 16:20:41 -0500
Subject: STORM-1980/1983 Merge changes to region restart message format made
 by Simon to include region name.

---
 indra/newview/skins/default/xui/en/notifications.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 083ff46ebb..f3917f66d9 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6886,7 +6886,7 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
    name="RegionRestartMinutes"
    priority="high"
    type="alert">
-[TIME] This region will restart in [MINUTES] minutes.
+[TIME] The region [NAME] will restart in [MINUTES] minutes.
 If you stay in this region you will be logged out.
   </notification>
 
@@ -6895,7 +6895,7 @@ If you stay in this region you will be logged out.
    name="RegionRestartSeconds"
    priority="high"
    type="alert">
-[TIME] This region will restart in [SECONDS] seconds.
+[TIME] The region [NAME] will restart in [SECONDS] seconds.
 If you stay in this region you will be logged out.
   </notification>
 
-- 
cgit v1.2.3


From dd7b0f96157bdfbdd8892cc8aa209182ae777380 Mon Sep 17 00:00:00 2001
From: "jeremiah@lindenlab.com" <jeremiah@lindenlab.com>
Date: Wed, 13 Nov 2013 14:44:46 -0500
Subject: correct some male/female shape differences

---
 indra/newview/character/avatar_lad.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index 884d16b94b..4631e012fd 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -4267,8 +4267,8 @@
       <param_morph>
         <volume_morph
           name="CHEST"
-          scale="0 0 0"
-          pos="0 0 0"/>
+          scale="0.03 0.04 0.02"
+          pos="-0.03 0 -0.01"/>
         <volume_morph
           name="BELLY"
           scale="0.03 0.03 0.0"
-- 
cgit v1.2.3


From e5b0670ad7f44517a82c5a559af4bce1eddd94f1 Mon Sep 17 00:00:00 2001
From: Drake Arconis <lightdrake@gmail.com>
Date: Wed, 13 Nov 2013 19:27:17 -0500
Subject: OPEN-195 Cleaned non-UTF8 safe characters

---
 indra/llmath/llvolume.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index f74c934b21..cc5742ff7a 100755
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -6747,7 +6747,7 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
 	return TRUE;
 }
 
-//adapted from Lengyel, Eric. �Computing Tangent Space Basis Vectors for an Arbitrary Mesh�. Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html
+//adapted from Lengyel, Eric. "Computing Tangent Space Basis Vectors for an Arbitrary Mesh". Terathon Software 3D Graphics Library, 2001. http://www.terathon.com/code/tangent.html
 void CalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal,
         const LLVector2 *texcoord, U32 triangleCount, const U16* index_array, LLVector4a *tangent)
 {
-- 
cgit v1.2.3


From f8846713cefbc4519cf1c332a650dad2cc67f4d2 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 14 Nov 2013 09:16:34 -0500
Subject: add open-195 to doc/contributions.txt

---
 doc/contributions.txt | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 95133570c5..5f963ac7df 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -350,6 +350,8 @@ Dimitrio Lewis
 Dirk
 Draconis Neurocam
 	STORM-1259
+Drake Arconis
+    OPEN-195
 Drew Dri
 	VWR-19683
 Drew Dwi
-- 
cgit v1.2.3


From 335810246253c04ac3c2ab4f5db556991ed717d6 Mon Sep 17 00:00:00 2001
From: Ansariel <none@none>
Date: Thu, 14 Nov 2013 22:13:15 +0100
Subject: STORM-1984: Mousing over UI elements does not make them light up

---
 doc/contributions.txt   | 1 +
 indra/llui/llbutton.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 99527c0587..759c715970 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -180,6 +180,7 @@ Ansariel Hiller
 	MAINT-2368
 	STORM-1931
 	MAINT-2773
+	STORM-1984
 Aralara Rajal
 Arare Chantilly
 	CHUIBUG-191
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 50ac511d18..3cfe5ac57f 100755
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -641,7 +641,7 @@ void LLButton::draw()
 	
 	bool use_glow_effect = FALSE;
 	LLColor4 highlighting_color = LLColor4::white;
-	LLColor4 glow_color;
+	LLColor4 glow_color = LLColor4::white;
 	LLRender::eBlendType glow_type = LLRender::BT_ADD_WITH_ALPHA;
 	LLUIImage* imagep = NULL;
 
-- 
cgit v1.2.3


From 1e9cfd39c8441fad71ed7171ac93bdeb1d02e54b Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Fri, 15 Nov 2013 11:49:35 -0500
Subject: STORM-1980 Added a floater displaying a countdown timer. Removed most
 of the previous changes.

---
 indra/newview/CMakeLists.txt                       |   2 +
 indra/newview/llfloaterregioninfo.cpp              |   1 +
 indra/newview/llfloaterregionrestarting.cpp        | 119 +++++++++++++++++++++
 indra/newview/llfloaterregionrestarting.h          |  55 ++++++++++
 indra/newview/llviewerfloaterreg.cpp               |   2 +
 indra/newview/llviewermessage.cpp                  |  41 +++++--
 indra/newview/skins/default/colors.xml             |   3 +
 .../default/xui/en/floater_region_restarting.xml   |  62 +++++++++++
 .../newview/skins/default/xui/en/notifications.xml |   6 +-
 indra/newview/skins/default/xui/en/strings.xml     |   3 -
 10 files changed, 280 insertions(+), 14 deletions(-)
 create mode 100644 indra/newview/llfloaterregionrestarting.cpp
 create mode 100644 indra/newview/llfloaterregionrestarting.h
 create mode 100644 indra/newview/skins/default/xui/en/floater_region_restarting.xml

diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 1fea6dea9f..34c3489f9f 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -267,6 +267,7 @@ set(viewer_SOURCE_FILES
     llfloaterregiondebugconsole.cpp
     llfloaterregioninfo.cpp
     llfloaterreporter.cpp
+    llfloaterregionrestarting.cpp
     llfloaterscriptdebug.cpp
     llfloaterscriptlimits.cpp
     llfloatersearch.cpp
@@ -855,6 +856,7 @@ set(viewer_HEADER_FILES
     llfloaterregiondebugconsole.h
     llfloaterregioninfo.h
     llfloaterreporter.h
+    llfloaterregionrestarting.h
     llfloaterscriptdebug.h
     llfloaterscriptlimits.h
     llfloatersearch.h
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 66bf49331b..cc0053cb99 100755
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -91,6 +91,7 @@
 #include "lltrans.h"
 #include "llagentui.h"
 #include "llmeshrepository.h"
+#include "llfloaterregionrestarting.h"
 
 const S32 TERRAIN_TEXTURE_COUNT = 4;
 const S32 CORNER_COUNT = 4;
diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
new file mode 100644
index 0000000000..62bce27d09
--- /dev/null
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -0,0 +1,119 @@
+/** 
+ * @file llfloaterregionrestarting.cpp
+ * @brief Shows countdown timer during region restart
+ *
+ * $LicenseInfo:firstyear=2006&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 "llviewerprecompiledheaders.h"
+
+#include "llfloaterregionrestarting.h"
+
+#include "llfloaterreg.h"
+#include "lluictrl.h"
+#include "llenvmanager.h"
+
+
+static S32 mSeconds;
+
+LLFloaterRegionRestarting::LLFloaterRegionRestarting(const LLSD& key) :
+	LLFloater(key),
+	LLEventTimer(1)
+{
+	mName = key["NAME"];
+	mSeconds = (LLSD::Integer)key["SECONDS"];
+}
+
+LLFloaterRegionRestarting::~LLFloaterRegionRestarting()
+{
+}
+
+BOOL LLFloaterRegionRestarting::postBuild()
+{
+	LLStringUtil::format_map_t args;
+	std::string text;
+
+	args["[NAME]"] = mName;
+	text = getString("RegionName", args);
+	LLTextBox* textbox = getChild<LLTextBox>("region_name");
+	textbox->setValue(text);
+
+	refresh();
+
+	LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
+
+	LLFloaterRegionRestarting* floaterp = LLFloaterReg::findTypedInstance<LLFloaterRegionRestarting>("region_restarting");
+
+	if (floaterp)
+	{
+llwarns << "DBG setting color" << llendl;
+		LLColor4 bg_color;
+		bg_color = LLUIColorTable::instance().getColor("LtOrange");
+		floaterp->setBackgroundColor(bg_color);
+	}
+
+	return TRUE;
+}
+
+void LLFloaterRegionRestarting::regionChange()
+{
+	close();
+}
+
+BOOL LLFloaterRegionRestarting::tick()
+{
+	refresh();
+
+	return FALSE;
+}
+
+void LLFloaterRegionRestarting::refresh()
+{
+	LLStringUtil::format_map_t args;
+	std::string text;
+
+	args["[SECONDS]"] = llformat("%d", mSeconds);
+	text = getString("RestartSeconds", args);
+	LLTextBox* textbox = getChild<LLTextBox>("restart_seconds");
+	textbox->setValue(text);
+
+	mSeconds = mSeconds - 1;
+	if(mSeconds < 0.0)
+	{
+		mSeconds = 0;
+	}
+}
+
+void LLFloaterRegionRestarting::close()
+{
+	LLFloaterRegionRestarting* floaterp = LLFloaterReg::findTypedInstance<LLFloaterRegionRestarting>("region_restarting");
+
+	if (floaterp)
+	{
+		floaterp->closeFloater();
+	}
+}
+
+void LLFloaterRegionRestarting::updateTime(U32 time)
+{
+	mSeconds = time;
+}
diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h
new file mode 100644
index 0000000000..84f1bc65fb
--- /dev/null
+++ b/indra/newview/llfloaterregionrestarting.h
@@ -0,0 +1,55 @@
+/** 
+ * @file llfloaterregionrestarting.h
+ * @brief Shows countdown timer during region restart
+ *
+ * $LicenseInfo:firstyear=2006&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_LLFLOATERREGIONRESTARTING_H
+#define LL_LLFLOATERREGIONRESTARTING_H
+
+#include "llfloater.h"
+#include "lltextbox.h"
+#include "lleventtimer.h"
+
+class LLFloaterRegionRestarting : public LLFloater,  public LLEventTimer
+{
+	friend class LLFloaterReg;
+
+public:
+	static void close();
+	static void updateTime(U32 time);
+
+private:
+	LLFloaterRegionRestarting(const LLSD& key);
+	virtual ~LLFloaterRegionRestarting();
+	virtual BOOL postBuild();
+	virtual BOOL tick();
+	virtual void refresh();
+	virtual void regionChange();
+
+	LLTextBox*	mRestartSeconds;
+
+	std::string mName;
+};
+
+#endif // LL_LLFLOATERREGIONRESTARTING_H
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 4ce049df03..a8eeddb798 100755
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -95,6 +95,7 @@
 #include "llfloaterproperties.h"
 #include "llfloaterregiondebugconsole.h"
 #include "llfloaterregioninfo.h"
+#include "llfloaterregionrestarting.h"
 #include "llfloaterreporter.h"
 #include "llfloaterscriptdebug.h"
 #include "llfloaterscriptlimits.h"
@@ -296,6 +297,7 @@ void LLViewerFloaterReg::registerFloaters()
 	LLFloaterReg::add("reset_queue", "floater_script_queue.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterResetQueue>);
 	LLFloaterReg::add("region_debug_console", "floater_region_debug_console.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRegionDebugConsole>);
 	LLFloaterReg::add("region_info", "floater_region_info.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRegionInfo>);
+	LLFloaterReg::add("region_restarting", "floater_region_restarting.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterRegionRestarting>);
 	
 	LLFloaterReg::add("script_debug", "floater_script_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebug>);
 	LLFloaterReg::add("script_debug_output", "floater_script_debug_panel.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptDebugOutput>);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 805b3aab18..ac652ef329 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -110,6 +110,7 @@
 #include "llpanelblockedlist.h"
 #include "llpanelplaceprofile.h"
 #include "llviewerregion.h"
+#include "llfloaterregionrestarting.h"
 
 #include <boost/algorithm/string/split.hpp> //
 #include <boost/regex.hpp>
@@ -5963,15 +5964,30 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 		if (notificationID == "RegionRestartMinutes" ||
 			notificationID == "RegionRestartSeconds")
 		{
-			// Get current UTC time, adjusted for the user's clock
-			// being off.
-			time_t utc_time;
-			utc_time = time_corrected();
-			std::string timeStr = LLTrans::getString("HMSTime");
-			LLSD substitution;
-			substitution["datetime"] = (S32) utc_time;
-			LLStringUtil::format(timeStr, substitution);
-			llsdBlock["TIME"] = timeStr;
+			U32 seconds;
+			if (notificationID == "RegionRestartMinutes")
+			{
+				seconds = 60 * static_cast<U32>(llsdBlock["MINUTES"].asInteger());
+			}
+			else
+			{
+				seconds = static_cast<U32>(llsdBlock["SECONDS"].asInteger());
+			}
+
+			LLSD params;
+			params["NAME"] = llsdBlock["NAME"];
+			params["SECONDS"] = (LLSD::Integer)seconds;
+
+			LLFloaterRegionRestarting* floaterp = LLFloaterReg::findTypedInstance<LLFloaterRegionRestarting>("region_restarting");
+
+			if (floaterp)
+			{
+				LLFloaterRegionRestarting::updateTime(seconds);
+			}
+			else
+			{
+				LLFloaterReg::showInstance("region_restarting", params);
+			}
 
 			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndRestart")), 1.0f);
 		}
@@ -6094,6 +6110,13 @@ void process_alert_core(const std::string& message, BOOL modal)
 		std::string text(message.substr(1));
 		LLSD args;
 
+		// *NOTE: If the text from the server ever changes this line will need to be adjusted.
+		std::string restart_cancelled = "Region restart cancelled.";
+		if (text.substr(0, restart_cancelled.length()) == restart_cancelled)
+		{
+			LLFloaterRegionRestarting::close();
+		}
+
 		std::string new_msg =LLNotifications::instance().getGlobalString(text);
 		args["MESSAGE"] = new_msg;
 		LLNotificationsUtil::add("SystemMessage", args);
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index f53995732f..1587e6124d 100755
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -122,6 +122,9 @@
   <color
       name="Blue_80"
       value="0 0 1 0.8" />
+  <color
+      name="Orange"
+      value="1 .82 .46 1" />
 
   <!-- This color name makes potentially unused colors show up bright purple.
   Leave this here until all Unused? are removed below, otherwise
diff --git a/indra/newview/skins/default/xui/en/floater_region_restarting.xml b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
new file mode 100644
index 0000000000..1bf5884653
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ height="245"
+ width="500"
+ layout="topleft"
+ name="region_restarting"
+ help_topic="floater_region_restarting"
+ single_instance="true"
+ reuse_instance="false"
+ title="REGION RESTARTING">
+    <string name="RegionName">
+    The region you are in now ([NAME]) is about to restart.
+
+If you stay in this region you will be logged out.
+    </string>
+    <string name="RestartSeconds">
+     Seconds until restart
+[SECONDS]
+    </string>
+     <panel
+     name="layout_panel_1"
+     height="245"
+     width="500"
+     follows="right|top"
+     top="0"
+     left="0"
+     background_visible="true"
+     bg_alpha_color="Orange">
+    <text
+     type="string"
+     length="1"
+     follows="top|left"
+     layout="topleft"
+     name="region_name"
+     text_color="Black"
+     font="SansSerifLarge"
+     word_wrap="true"
+     height="100"
+     top="30"
+     left="10"
+     width="480">
+    The region you are in now (-The longest region name-) is about to restart.
+
+If you stay in this region you will be logged out.
+    </text>
+    <text
+     type="string"
+     length="1"
+     follows="top|left"
+     layout="topleft"
+     name="restart_seconds"
+     text_color="Black"
+     font="SansSerifHuge"
+     height="100"
+     left="0"
+     halign="center"
+     width="500">
+     Seconds until restart
+     32767
+    </text>
+  </panel>
+ </floater>
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index f3917f66d9..81e1025f13 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6884,8 +6884,9 @@ This will add a bookmark in your inventory so you can quickly IM this Resident.
   <notification
    icon="notify.tga"
    name="RegionRestartMinutes"
+   show_toast="false"
    priority="high"
-   type="alert">
+   type="notify">
 [TIME] The region [NAME] will restart in [MINUTES] minutes.
 If you stay in this region you will be logged out.
   </notification>
@@ -6893,8 +6894,9 @@ If you stay in this region you will be logged out.
   <notification
    icon="notify.tga"
    name="RegionRestartSeconds"
+   show_toast="false"
    priority="high"
-   type="alert">
+   type="notify">
 [TIME] The region [NAME] will restart in [SECONDS] seconds.
 If you stay in this region you will be logged out.
   </notification>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4534434c46..8ac95beddb 100755
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -2551,9 +2551,6 @@ Drag folders to this area and click "Send to Marketplace" to list them for sale
   <!-- panel preferences general -->
   <string name="DoNotDisturbModeResponseDefault">This resident has turned on &apos;Do Not Disturb&apos; and will see your message later.</string>
 
-	<!-- viewermessage -->
-	<string name="HMSTime">[hour12, datetime, slt]:[min, datetime, slt]:[second, datetime, slt] [ampm, datetime, slt] [timezone,datetime, slt]</string>
-
 	<!-- Mute -->
 	<string name="MuteByName">(By name)</string>
 	<string name="MuteAgent">(Resident)</string>
-- 
cgit v1.2.3


From 590630a32fee3205861e61438a88de0944d9c996 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Sat, 16 Nov 2013 10:54:30 -0500
Subject: STORM-1980 Code cleanup and an attempt to fix a mac/linux compile
 error

---
 indra/newview/llfloaterregionrestarting.cpp | 18 +++---------------
 indra/newview/llfloaterregionrestarting.h   |  4 +---
 indra/newview/llviewermessage.cpp           |  6 +++---
 3 files changed, 7 insertions(+), 21 deletions(-)

diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index 62bce27d09..09518fff2d 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -39,7 +39,7 @@ LLFloaterRegionRestarting::LLFloaterRegionRestarting(const LLSD& key) :
 	LLFloater(key),
 	LLEventTimer(1)
 {
-	mName = key["NAME"];
+	mName = (std::string)key["NAME"];
 	mSeconds = (LLSD::Integer)key["SECONDS"];
 }
 
@@ -61,16 +61,6 @@ BOOL LLFloaterRegionRestarting::postBuild()
 
 	LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
 
-	LLFloaterRegionRestarting* floaterp = LLFloaterReg::findTypedInstance<LLFloaterRegionRestarting>("region_restarting");
-
-	if (floaterp)
-	{
-llwarns << "DBG setting color" << llendl;
-		LLColor4 bg_color;
-		bg_color = LLUIColorTable::instance().getColor("LtOrange");
-		floaterp->setBackgroundColor(bg_color);
-	}
-
 	return TRUE;
 }
 
@@ -92,9 +82,7 @@ void LLFloaterRegionRestarting::refresh()
 	std::string text;
 
 	args["[SECONDS]"] = llformat("%d", mSeconds);
-	text = getString("RestartSeconds", args);
-	LLTextBox* textbox = getChild<LLTextBox>("restart_seconds");
-	textbox->setValue(text);
+	getChild<LLTextBox>("restart_seconds")->setValue(getString("RestartSeconds", args));
 
 	mSeconds = mSeconds - 1;
 	if(mSeconds < 0.0)
@@ -113,7 +101,7 @@ void LLFloaterRegionRestarting::close()
 	}
 }
 
-void LLFloaterRegionRestarting::updateTime(U32 time)
+void LLFloaterRegionRestarting::updateTime(S32 time)
 {
 	mSeconds = time;
 }
diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h
index 84f1bc65fb..fef0dcddfe 100644
--- a/indra/newview/llfloaterregionrestarting.h
+++ b/indra/newview/llfloaterregionrestarting.h
@@ -37,7 +37,7 @@ class LLFloaterRegionRestarting : public LLFloater,  public LLEventTimer
 
 public:
 	static void close();
-	static void updateTime(U32 time);
+	static void updateTime(S32 time);
 
 private:
 	LLFloaterRegionRestarting(const LLSD& key);
@@ -47,8 +47,6 @@ private:
 	virtual void refresh();
 	virtual void regionChange();
 
-	LLTextBox*	mRestartSeconds;
-
 	std::string mName;
 };
 
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ac652ef329..0ce8585c15 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5964,14 +5964,14 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 		if (notificationID == "RegionRestartMinutes" ||
 			notificationID == "RegionRestartSeconds")
 		{
-			U32 seconds;
+			S32 seconds;
 			if (notificationID == "RegionRestartMinutes")
 			{
-				seconds = 60 * static_cast<U32>(llsdBlock["MINUTES"].asInteger());
+				seconds = 60 * static_cast<S32>(llsdBlock["MINUTES"].asInteger());
 			}
 			else
 			{
-				seconds = static_cast<U32>(llsdBlock["SECONDS"].asInteger());
+				seconds = static_cast<S32>(llsdBlock["SECONDS"].asInteger());
 			}
 
 			LLSD params;
-- 
cgit v1.2.3


From 84a96cdf0f4e27089dedd151df55e7916b33abb8 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 18 Nov 2013 11:33:58 -0500
Subject: correct attribution for open-195

---
 doc/contributions.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 5f963ac7df..4ffe6490d5 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -350,8 +350,6 @@ Dimitrio Lewis
 Dirk
 Draconis Neurocam
 	STORM-1259
-Drake Arconis
-    OPEN-195
 Drew Dri
 	VWR-19683
 Drew Dwi
@@ -1147,6 +1145,7 @@ snowy Sidran
 Sovereign Engineer
     MAINT-2334
     OPEN-189
+    OPEN-195
 SpacedOut Frye
 	VWR-34
 	VWR-45
-- 
cgit v1.2.3


From ecb2220afd68e1d13c9af476265d008c2d92354b Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 18 Nov 2013 12:12:31 -0500
Subject: add handler for socket.error to fix OPEN-196

---
 indra/lib/python/indra/base/lluuid.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/lib/python/indra/base/lluuid.py b/indra/lib/python/indra/base/lluuid.py
index 369ae4e92f..7413ffe10d 100755
--- a/indra/lib/python/indra/base/lluuid.py
+++ b/indra/lib/python/indra/base/lluuid.py
@@ -72,7 +72,7 @@ class UUID(object):
     ip = ''
     try:
         ip = socket.gethostbyname(socket.gethostname())
-    except(socket.gaierror):
+    except(socket.gaierror, socket.error):
         # no ip address, so just default to somewhere in 10.x.x.x
         ip = '10'
         for i in range(3):
-- 
cgit v1.2.3


From 6bd777214c535b91048533c792cb2dd499ec6ebf Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 18 Nov 2013 19:05:34 -0500
Subject: add callbacks to LLAgent for Region and Parcel changes

---
 indra/newview/llagent.cpp             | 48 +++++++++++++++++++++++++++--------
 indra/newview/llagent.h               | 28 +++++++++++++++++---
 indra/newview/lllocationinputctrl.cpp |  4 +--
 indra/newview/llmoveview.cpp          |  2 +-
 indra/newview/llpanelplaces.cpp       |  2 +-
 indra/newview/llpaneltopinfobar.cpp   |  2 +-
 indra/newview/llviewerparcelmgr.cpp   |  9 +++----
 indra/newview/llviewerparcelmgr.h     | 10 +++-----
 8 files changed, 75 insertions(+), 30 deletions(-)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 325707bbf1..da29aaff50 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -259,9 +259,9 @@ bool handleSlowMotionAnimation(const LLSD& newvalue)
 	return true;
 }
 
-// static
-void LLAgent::parcelChangedCallback()
+void LLAgent::setCanEditParcel() // called via mParcelChangedSignal
 {
+	LL_DEBUGS("AgentLocation") << LL_ENDL;
 	bool can_edit = LLToolMgr::getInstance()->canEdit();
 
 	gAgent.mCanEditParcel = can_edit;
@@ -425,6 +425,8 @@ LLAgent::LLAgent() :
 
 	mListener.reset(new LLAgentListener(*this));
 
+	addParcelChangedCallback(&setCanEditParcel);
+
 	mMoveTimer.stop();
 }
 
@@ -451,8 +453,6 @@ void LLAgent::init()
 	mLastKnownRequestMaturity = mLastKnownResponseMaturity;
 	mIsDoSendMaturityPreferenceToServer = true;
 
-	LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(boost::bind(&LLAgent::parcelChangedCallback));
-
 	if (!mTeleportFinishedSlot.connected())
 	{
 		mTeleportFinishedSlot = LLViewerParcelMgr::getInstance()->setTeleportFinishedCallback(boost::bind(&LLAgent::handleTeleportFinished, this));
@@ -835,22 +835,34 @@ void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id)
 	}
 }
 
+void LLAgent::changeParcels()
+{
+	LL_DEBUGS("AgentLocation") << LL_ENDL;
+	// Notify anything that wants to know about parcel changes
+	mParcelChangedSignal();
+}
+
+boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_callback_t cb)
+{
+	return mParcelChangedSignal.connect(cb);
+}
+
 //-----------------------------------------------------------------------------
 // setRegion()
 //-----------------------------------------------------------------------------
 void LLAgent::setRegion(LLViewerRegion *regionp)
 {
 	bool teleport = true;
-
+	bool notifyRegionChange;
+	
 	llassert(regionp);
 	if (mRegionp != regionp)
 	{
-		// std::string host_name;
-		// host_name = regionp->getHost().getHostName();
-
+		notifyRegionChange = true;
+		
 		std::string ip = regionp->getHost().getString();
-		llinfos << "Moving agent into region: " << regionp->getName()
-				<< " located at " << ip << llendl;
+		LL_INFOS("AgentLocation") << "Moving agent into region: " << regionp->getName()
+				<< " located at " << ip << LL_ENDL;
 		if (mRegionp)
 		{
 			// We've changed regions, we're now going to change our agent coordinate frame.
@@ -902,6 +914,10 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
 		// Pass new region along to metrics components that care about this level of detail.
 		LLAppViewer::metricsUpdateRegion(regionp->getHandle());
 	}
+	else
+	{
+		notifyRegionChange = false;
+	}
 	mRegionp = regionp;
 
 	// Pass the region host to LLUrlEntryParcel to resolve parcel name
@@ -943,6 +959,12 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
 		// Need to handle via callback after caps arrive.
 		mRegionp->setCapabilitiesReceivedCallback(boost::bind(&LLAgent::handleServerBakeRegionTransition,this,_1));
 	}
+
+	if (notifyRegionChange)
+	{
+		LL_DEBUGS("AgentLocation") << "Calling RegionChanged callbacks" << LL_ENDL;
+		mRegionChangedSignal();
+	}
 }
 
 
@@ -967,6 +989,12 @@ LLHost LLAgent::getRegionHost() const
 	}
 }
 
+boost::signals2::connection LLAgent::addRegionChangedCallback(region_changed_callback_t cb)
+{
+	return mRegionChangedSignal.connect(cb);
+}
+
+
 //-----------------------------------------------------------------------------
 // inPrelude()
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 7fac17d098..fafa166efd 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -231,15 +231,36 @@ private:
 	LLVector3		mHomePosRegion;
 
 	//--------------------------------------------------------------------
-	// Region
+	// Parcel
 	//--------------------------------------------------------------------
 public:
+	void changeParcels(); // called by LLViewerParcelMgr when we cross a parcel boundary
+	
+	// Register a boost callback to be called when the agent changes parcels
+	typedef boost::function<void()> parcel_changed_callback_t;
+	boost::signals2::connection     addParcelChangedCallback(parcel_changed_callback_t);
+
+private:
+	typedef boost::signals2::signal<void()> parcel_changed_signal_t;
+	parcel_changed_signal_t		mParcelChangedSignal;
+
+	//--------------------------------------------------------------------
+	// Region
+	//--------------------------------------------------------------------
+  public:
 	void			setRegion(LLViewerRegion *regionp);
 	LLViewerRegion	*getRegion() const;
 	LLHost			getRegionHost() const;
 	BOOL			inPrelude();
-private:
+
+	// Register a boost callback to be called when the agent changes regions
+	typedef boost::function<void()> region_changed_callback_t;
+	boost::signals2::connection     addRegionChangedCallback(region_changed_callback_t);
+
+  private:
 	LLViewerRegion	*mRegionp;
+	typedef boost::signals2::signal<void()> region_changed_signal_t;
+	region_changed_signal_t		            mRegionChangedSignal;
 
 	//--------------------------------------------------------------------
 	// History
@@ -640,9 +661,10 @@ private:
 public:
 	bool			canEditParcel() const { return mCanEditParcel; }
 private:
+	static void     setCanEditParcel();
 	bool			mCanEditParcel;
 
-	static void parcelChangedCallback();
+
 
 /********************************************************************************
  **                                                                            **
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 5022dba934..dbdff11f11 100755
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -407,14 +407,14 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
 	// - Make the "Add landmark" button updated when either current parcel gets changed
 	//   or a landmark gets created or removed from the inventory.
 	// - Update the location string on parcel change.
-	mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
+	mParcelMgrConnection = gAgent.addParcelChangedCallback(
 		boost::bind(&LLLocationInputCtrl::onAgentParcelChange, this));
 	// LLLocationHistory instance is being created before the location input control, so we have to update initial state of button manually.
 	mButton->setEnabled(LLLocationHistory::instance().getItemCount() > 0);
 	mLocationHistoryConnection = LLLocationHistory::getInstance()->setChangedCallback(
 			boost::bind(&LLLocationInputCtrl::onLocationHistoryChanged, this,_1));
 
-	mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLLocationInputCtrl::onRegionBoundaryCrossed, this));
+	mRegionCrossingSlot = gAgent.addRegionChangedCallback(boost::bind(&LLLocationInputCtrl::onRegionBoundaryCrossed, this));
 	createNavMeshStatusListenerForCurrentRegion();
 
 	mRemoveLandmarkObserver	= new LLRemoveLandmarkObserver(this);
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index eb6591eb39..32b168b8c5 100755
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -140,7 +140,7 @@ BOOL LLFloaterMove::postBuild()
 
 	initMovementMode();
 
-	LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
+	gAgent.addParcelChangedCallback(LLFloaterMove::sUpdateFlyingStatus);
 
 	return TRUE;
 }
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp
index 6c2a01fc82..8bb3ace2d9 100755
--- a/indra/newview/llpanelplaces.cpp
+++ b/indra/newview/llpanelplaces.cpp
@@ -251,7 +251,7 @@ LLPanelPlaces::LLPanelPlaces()
 
 	gInventory.addObserver(mInventoryObserver);
 
-	mAgentParcelChangedConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
+	mAgentParcelChangedConnection = gAgent.addParcelChangedCallback(
 			boost::bind(&LLPanelPlaces::updateVerbs, this));
 
 	//buildFromFile( "panel_places.xml"); // Called from LLRegisterPanelClass::defaultPanelClassBuilder()
diff --git a/indra/newview/llpaneltopinfobar.cpp b/indra/newview/llpaneltopinfobar.cpp
index 9dd665198f..0d09f0bbfc 100755
--- a/indra/newview/llpaneltopinfobar.cpp
+++ b/indra/newview/llpaneltopinfobar.cpp
@@ -166,7 +166,7 @@ BOOL LLPanelTopInfoBar::postBuild()
 		mShowCoordsCtrlConnection = ctrl->getSignal()->connect(boost::bind(&LLPanelTopInfoBar::onNavBarShowParcelPropertiesCtrlChanged, this));
 	}
 
-	mParcelMgrConnection = LLViewerParcelMgr::getInstance()->addAgentParcelChangedCallback(
+	mParcelMgrConnection = gAgent.addParcelChangedCallback(
 			boost::bind(&LLPanelTopInfoBar::onAgentParcelChange, this));
 
 	setVisibleCallback(boost::bind(&LLPanelTopInfoBar::onVisibilityChange, this, _2));
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index 4cdb568d17..e361fad9de 100755
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -1580,7 +1580,8 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
 			// Let interesting parties know about agent parcel change.
 			LLViewerParcelMgr* instance = LLViewerParcelMgr::getInstance();
 
-			instance->mAgentParcelChangedSignal();
+			// Notify anything that wants to know when the agent changes parcels
+			gAgent.changeParcels();
 
 			if (instance->mTeleportInProgress)
 			{
@@ -2458,10 +2459,6 @@ LLViewerTexture* LLViewerParcelMgr::getPassImage() const
 	return sPassImage;
 }
 
-boost::signals2::connection LLViewerParcelMgr::addAgentParcelChangedCallback(parcel_changed_callback_t cb)
-{
-	return mAgentParcelChangedSignal.connect(cb);
-}
 /*
  * Set finish teleport callback. You can use it to observe all  teleport events.
  * NOTE:
@@ -2475,7 +2472,7 @@ boost::signals2::connection LLViewerParcelMgr::setTeleportFinishedCallback(telep
 	return mTeleportFinishedSignal.connect(cb);
 }
 
-boost::signals2::connection LLViewerParcelMgr::setTeleportFailedCallback(parcel_changed_callback_t cb)
+boost::signals2::connection LLViewerParcelMgr::setTeleportFailedCallback(teleport_failed_callback_t cb)
 {
 	return mTeleportFailedSignal.connect(cb);
 }
diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h
index 6183b7e90e..9da49bb3f3 100755
--- a/indra/newview/llviewerparcelmgr.h
+++ b/indra/newview/llviewerparcelmgr.h
@@ -80,8 +80,8 @@ class LLViewerParcelMgr : public LLSingleton<LLViewerParcelMgr>
 public:
 	typedef boost::function<void (const LLVector3d&, const bool& local)> teleport_finished_callback_t;
 	typedef boost::signals2::signal<void (const LLVector3d&, const bool&)> teleport_finished_signal_t;
-	typedef boost::function<void()> parcel_changed_callback_t;
-	typedef boost::signals2::signal<void()> parcel_changed_signal_t;
+	typedef boost::function<void()> teleport_failed_callback_t;
+	typedef boost::signals2::signal<void()> teleport_failed_signal_t;
 
 	LLViewerParcelMgr();
 	~LLViewerParcelMgr();
@@ -283,9 +283,8 @@ public:
 	// the agent is banned or not in the allowed group
 	BOOL isCollisionBanned();
 
-	boost::signals2::connection addAgentParcelChangedCallback(parcel_changed_callback_t cb);
 	boost::signals2::connection setTeleportFinishedCallback(teleport_finished_callback_t cb);
-	boost::signals2::connection setTeleportFailedCallback(parcel_changed_callback_t cb);
+	boost::signals2::connection setTeleportFailedCallback(teleport_failed_callback_t cb);
 	void onTeleportFinished(bool local, const LLVector3d& new_pos);
 	void onTeleportFailed();
 
@@ -338,8 +337,7 @@ private:
 
 	BOOL						mTeleportInProgress;
 	teleport_finished_signal_t	mTeleportFinishedSignal;
-	parcel_changed_signal_t		mTeleportFailedSignal;
-	parcel_changed_signal_t		mAgentParcelChangedSignal;
+	teleport_failed_signal_t	mTeleportFailedSignal;
 
 	// Array of pieces of parcel edges to potentially draw
 	// Has (parcels_per_edge + 1) * (parcels_per_edge + 1) elements so
-- 
cgit v1.2.3


From a5db4f6c3d1f6804c20b3095b39203887728d3a6 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 19 Nov 2013 09:28:58 -0500
Subject: add documentation to LLAgent::addRegionChangedCallback and improve
 logging

---
 indra/newview/llagent.cpp |  6 +++---
 indra/newview/llagent.h   | 19 ++++++++++++++++++-
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index da29aaff50..5302ae2636 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -261,9 +261,7 @@ bool handleSlowMotionAnimation(const LLSD& newvalue)
 
 void LLAgent::setCanEditParcel() // called via mParcelChangedSignal
 {
-	LL_DEBUGS("AgentLocation") << LL_ENDL;
 	bool can_edit = LLToolMgr::getInstance()->canEdit();
-
 	gAgent.mCanEditParcel = can_edit;
 }
 
@@ -837,7 +835,7 @@ void LLAgent::handleServerBakeRegionTransition(const LLUUID& region_id)
 
 void LLAgent::changeParcels()
 {
-	LL_DEBUGS("AgentLocation") << LL_ENDL;
+	LL_DEBUGS("AgentLocation") << "Calling ParcelChanged callbacks" << LL_ENDL;
 	// Notify anything that wants to know about parcel changes
 	mParcelChangedSignal();
 }
@@ -920,6 +918,8 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
 	}
 	mRegionp = regionp;
 
+	// TODO - most of what follows probably should be moved into callbacks
+
 	// Pass the region host to LLUrlEntryParcel to resolve parcel name
 	// with a server request.
 	LLUrlEntryParcel::setRegionHost(getRegionHost());
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index fafa166efd..0662be897a 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -253,7 +253,24 @@ private:
 	LLHost			getRegionHost() const;
 	BOOL			inPrelude();
 
-	// Register a boost callback to be called when the agent changes regions
+	/**
+	 * Register a boost callback to be called when the agent changes regions
+	 * Note that if you need to access a capability for the region, you may need to wait
+	 * for the capabilities to be received, since in some cases your region changed
+	 * callback will be called before the capabilities have been received.  Your callback
+	 * may need to look something like:
+	 *
+	 * 	 LLViewerRegion* region = gAgent.getRegion();
+	 * 	 if (region->capabilitiesReceived())
+	 * 	 {
+	 *       useCapability(region);
+	 * 	 }
+	 * 	 else // Need to handle via callback after caps arrive.
+	 * 	 {
+	 *       region->setCapabilitiesReceivedCallback(boost::bind(&useCapability,region,_1));
+	 *       // you may or may not want to remove that callback
+	 * 	 }
+	 */
 	typedef boost::function<void()> region_changed_callback_t;
 	boost::signals2::connection     addRegionChangedCallback(region_changed_callback_t);
 
-- 
cgit v1.2.3


From fcc885d4fc5ef63dad33e89a9324edc39d466d37 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 19 Nov 2013 15:51:27 -0500
Subject: replace uses of LLEnvManagerNew::setRegionChangeCallback with
 LLAgent::addRegionChangedCallback

---
 indra/newview/llagent.cpp                          | 13 ----
 indra/newview/llenvmanager.cpp                     | 76 +++++++++++-----------
 indra/newview/llenvmanager.h                       |  9 +--
 indra/newview/llfloatereditdaycycle.cpp            |  2 +-
 indra/newview/llfloaterpathfindingconsole.cpp      |  4 +-
 indra/newview/llfloaterpathfindingobjects.cpp      |  3 +-
 indra/newview/llfloaterregioninfo.cpp              |  2 +-
 .../llmenuoptionpathfindingrebakenavmesh.cpp       |  2 +-
 8 files changed, 46 insertions(+), 65 deletions(-)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 5302ae2636..6ee8f26b9f 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -850,7 +850,6 @@ boost::signals2::connection LLAgent::addParcelChangedCallback(parcel_changed_cal
 //-----------------------------------------------------------------------------
 void LLAgent::setRegion(LLViewerRegion *regionp)
 {
-	bool teleport = true;
 	bool notifyRegionChange;
 	
 	llassert(regionp);
@@ -888,9 +887,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
 			{
 				gSky.mVOGroundp->setRegion(regionp);
 			}
-
-			// Notify windlight managers
-			teleport = (gAgent.getTeleportState() != LLAgent::TELEPORT_NONE);
 		}
 		else
 		{
@@ -938,15 +934,6 @@ void LLAgent::setRegion(LLViewerRegion *regionp)
 
 	LLFloaterMove::sUpdateFlyingStatus();
 
-	if (teleport)
-	{
-		LLEnvManagerNew::instance().onTeleport();
-	}
-	else
-	{
-		LLEnvManagerNew::instance().onRegionCrossing();
-	}
-
 	// If the newly entered region is using server bakes, and our
 	// current appearance is non-baked, request appearance update from
 	// server.
diff --git a/indra/newview/llenvmanager.cpp b/indra/newview/llenvmanager.cpp
index 86fe6754dc..589cf28615 100755
--- a/indra/newview/llenvmanager.cpp
+++ b/indra/newview/llenvmanager.cpp
@@ -92,9 +92,11 @@ void LLEnvPrefs::setUseDayCycle(const std::string& name)
 }
 
 //=============================================================================
-LLEnvManagerNew::LLEnvManagerNew()
+LLEnvManagerNew::LLEnvManagerNew():
+	mInterpNextChangeMessage(true),
+	mCurRegionUUID(LLUUID::null),
+	mLastReceivedID(LLUUID::null)
 {
-	mInterpNextChangeMessage = true;
 
 	// Set default environment settings.
 	mUserPrefs.mUseRegionSettings = true;
@@ -102,6 +104,9 @@ LLEnvManagerNew::LLEnvManagerNew()
 	mUserPrefs.mWaterPresetName = "Default";
 	mUserPrefs.mSkyPresetName = "Default";
 	mUserPrefs.mDayCycleName = "Default";
+
+	LL_DEBUGS("Windlight")<<LL_ENDL;
+	gAgent.addRegionChangedCallback(boost::bind(&LLEnvManagerNew::onRegionChange, this));
 }
 
 bool LLEnvManagerNew::getUseRegionSettings() const
@@ -300,6 +305,11 @@ void LLEnvManagerNew::loadUserPrefs()
 
 	mUserPrefs.mUseRegionSettings	= gSavedSettings.getBOOL("UseEnvironmentFromRegion");
 	mUserPrefs.mUseDayCycle			= gSavedSettings.getBOOL("UseDayCycle");
+
+	if (mUserPrefs.mUseRegionSettings)
+	{
+		requestRegionSettings();
+	}
 }
 
 void LLEnvManagerNew::saveUserPrefs()
@@ -398,6 +408,7 @@ void LLEnvManagerNew::dumpPresets()
 
 void LLEnvManagerNew::requestRegionSettings()
 {
+	LL_DEBUGS("Windlight") << LL_ENDL;
 	LLEnvironmentRequest::initiate();
 }
 
@@ -422,11 +433,6 @@ boost::signals2::connection LLEnvManagerNew::setRegionSettingsChangeCallback(con
 	return mRegionSettingsChangeSignal.connect(cb);
 }
 
-boost::signals2::connection LLEnvManagerNew::setRegionChangeCallback(const region_change_signal_t::slot_type& cb)
-{
-	return mRegionChangeSignal.connect(cb);
-}
-
 boost::signals2::connection LLEnvManagerNew::setRegionSettingsAppliedCallback(const region_settings_applied_signal_t::slot_type& cb)
 {
 	return mRegionSettingsAppliedSignal.connect(cb);
@@ -457,25 +463,13 @@ const std::string LLEnvManagerNew::getScopeString(LLEnvKey::EScope scope)
 	}
 }
 
-void LLEnvManagerNew::onRegionCrossing()
-{
-	LL_DEBUGS("Windlight") << "Crossed region" << LL_ENDL;
-	onRegionChange(true);
-}
-
-void LLEnvManagerNew::onTeleport()
-{
-	LL_DEBUGS("Windlight") << "Teleported" << LL_ENDL;
-	onRegionChange(false);
-}
-
 void LLEnvManagerNew::onRegionSettingsResponse(const LLSD& content)
 {
 	// If the message was valid, grab the UUID from it and save it for next outbound update message.
 	mLastReceivedID = content[0]["messageID"].asUUID();
 
 	// Refresh cached region settings.
-	LL_DEBUGS("Windlight") << "Caching region environment settings: " << content << LL_ENDL;
+	LL_DEBUGS("Windlight") << "Received region environment settings: " << content << LL_ENDL;
 	F32 sun_hour = 0; // *TODO
 	LLEnvironmentSettings new_settings(content[1], content[2], content[3], sun_hour);
 	mCachedRegionPrefs = new_settings;
@@ -594,6 +588,7 @@ void LLEnvManagerNew::updateWaterFromPrefs(bool interpolate)
 
 void LLEnvManagerNew::updateManagersFromPrefs(bool interpolate)
 {
+	LL_DEBUGS("Windlight")<<LL_ENDL;
 	// Apply water settings.
 	updateWaterFromPrefs(interpolate);
 
@@ -651,28 +646,35 @@ bool LLEnvManagerNew::useDefaultWater()
 }
 
 
-void LLEnvManagerNew::onRegionChange(bool interpolate)
+void LLEnvManagerNew::onRegionChange()
 {
 	// Avoid duplicating region setting requests
 	// by checking whether the region is actually changing.
 	LLViewerRegion* regionp = gAgent.getRegion();
 	LLUUID region_uuid = regionp ? regionp->getRegionID() : LLUUID::null;
-	if (region_uuid == mCurRegionUUID)
+	if (region_uuid != mCurRegionUUID)
 	{
-		return;
+		// Clear locally modified region settings.
+		mNewRegionPrefs.clear();
+
+		// *TODO: clear environment settings of the previous region?
+
+		// Request environment settings of the new region.
+		mCurRegionUUID = region_uuid;
+		// for region crossings, interpolate the change; for teleports, don't
+		mInterpNextChangeMessage = (gAgent.getTeleportState() == LLAgent::TELEPORT_NONE);
+		LL_DEBUGS("Windlight") << (mInterpNextChangeMessage ? "Crossed" : "Teleported")
+							   << " to new region: " << region_uuid
+							   << LL_ENDL;
+		requestRegionSettings();
+	}
+	else
+	{
+		LL_DEBUGS("Windlight") << "disregarding region change; interp: "
+							   << (mInterpNextChangeMessage ? "true" : "false")
+							   << " regionp: " << regionp
+							   << " old: " << mCurRegionUUID
+							   << " new: " << region_uuid
+							   << LL_ENDL;
 	}
-
-	// Clear locally modified region settings.
-	mNewRegionPrefs.clear();
-
-	// *TODO: clear environment settings of the previous region?
-
-	// Request environment settings of the new region.
-	LL_DEBUGS("Windlight") << "New viewer region: " << region_uuid << LL_ENDL;
-	mCurRegionUUID = region_uuid;
-	mInterpNextChangeMessage = interpolate;
-	requestRegionSettings();
-
-	// Let interested parties know agent region has been changed.
-	mRegionChangeSignal();
 }
diff --git a/indra/newview/llenvmanager.h b/indra/newview/llenvmanager.h
index ad56761bc7..c7877303fc 100755
--- a/indra/newview/llenvmanager.h
+++ b/indra/newview/llenvmanager.h
@@ -166,7 +166,6 @@ class LLEnvManagerNew : public LLSingleton<LLEnvManagerNew>
 public:
 	typedef boost::signals2::signal<void()> prefs_change_signal_t;
 	typedef boost::signals2::signal<void()> region_settings_change_signal_t;
-	typedef boost::signals2::signal<void()> region_change_signal_t;
 	typedef boost::signals2::signal<void(bool)> region_settings_applied_signal_t;
 
 	LLEnvManagerNew();
@@ -222,15 +221,12 @@ public:
 	bool sendRegionSettings(const LLEnvironmentSettings& new_settings);
 	boost::signals2::connection setPreferencesChangeCallback(const prefs_change_signal_t::slot_type& cb);
 	boost::signals2::connection setRegionSettingsChangeCallback(const region_settings_change_signal_t::slot_type& cb);
-	boost::signals2::connection setRegionChangeCallback(const region_change_signal_t::slot_type& cb);
 	boost::signals2::connection setRegionSettingsAppliedCallback(const region_settings_applied_signal_t::slot_type& cb);
 
 	static bool canEditRegionSettings(); /// @return true if we have access to editing region environment
 	static const std::string getScopeString(LLEnvKey::EScope scope);
 
 	// Public callbacks.
-	void onRegionCrossing();
-	void onTeleport();
 	void onRegionSettingsResponse(const LLSD& content);
 	void onRegionSettingsApplyResponse(bool ok);
 
@@ -251,7 +247,7 @@ private:
 	bool useDefaultSky();
 	bool useDefaultWater();
 
-	void onRegionChange(bool interpolate);
+	void onRegionChange();
 
 	/// Emitted when user environment preferences change.
 	prefs_change_signal_t mUsePrefsChangeSignal;
@@ -259,9 +255,6 @@ private:
 	/// Emitted when region environment settings update comes.
 	region_settings_change_signal_t	mRegionSettingsChangeSignal;
 
-	/// Emitted when agent region changes. Move to LLAgent?
-	region_change_signal_t	mRegionChangeSignal;
-
 	/// Emitted when agent region changes. Move to LLAgent?
 	region_settings_applied_signal_t mRegionSettingsAppliedSignal;
 
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp
index b63677b258..78e20e3bf0 100755
--- a/indra/newview/llfloatereditdaycycle.cpp
+++ b/indra/newview/llfloatereditdaycycle.cpp
@@ -145,7 +145,7 @@ void LLFloaterEditDayCycle::initCallbacks(void)
 	// Connect to env manager events.
 	LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
 	env_mgr.setRegionSettingsChangeCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsChange, this));
-	env_mgr.setRegionChangeCallback(boost::bind(&LLFloaterEditDayCycle::onRegionChange, this));
+	gAgent.addRegionChangedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionChange, this));
 	env_mgr.setRegionSettingsAppliedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsApplied, this, _1));
 
 	// Connect to day cycle manager events.
diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp
index 298454724b..161259d049 100755
--- a/indra/newview/llfloaterpathfindingconsole.cpp
+++ b/indra/newview/llfloaterpathfindingconsole.cpp
@@ -34,11 +34,11 @@
 
 #include <boost/signals2.hpp>
 
+#include "llagent.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
 #include "llcombobox.h"
 #include "llcontrol.h"
-#include "llenvmanager.h"
 #include "llfloaterpathfindingcharacters.h"
 #include "llfloaterpathfindinglinksets.h"
 #include "llfloaterreg.h"
@@ -224,7 +224,7 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey)
 
 	if (!mRegionBoundarySlot.connected())
 	{
-		mRegionBoundarySlot = LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionBoundaryCross, this));
+		mRegionBoundarySlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterPathfindingConsole::onRegionBoundaryCross, this));
 	}
 
 	if (!mTeleportFailedSlot.connected())
diff --git a/indra/newview/llfloaterpathfindingobjects.cpp b/indra/newview/llfloaterpathfindingobjects.cpp
index 20c1215bcb..d72ee073e1 100755
--- a/indra/newview/llfloaterpathfindingobjects.cpp
+++ b/indra/newview/llfloaterpathfindingobjects.cpp
@@ -41,7 +41,6 @@
 #include "llavatarnamecache.h"
 #include "llbutton.h"
 #include "llcheckboxctrl.h"
-#include "llenvmanager.h"
 #include "llfloater.h"
 #include "llfontgl.h"
 #include "llnotifications.h"
@@ -85,7 +84,7 @@ void LLFloaterPathfindingObjects::onOpen(const LLSD &pKey)
 
 	if (!mRegionBoundaryCrossingSlot.connected())
 	{
-		mRegionBoundaryCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this));
+		mRegionBoundaryCrossingSlot = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterPathfindingObjects::onRegionBoundaryCrossed, this));
 	}
 
 	if (!mGodLevelChangeSlot.connected())
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index 66bf49331b..ed0209f90b 100755
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -219,7 +219,7 @@ BOOL LLFloaterRegionInfo::postBuild()
 		&processEstateOwnerRequest);
 
 	// Request region info when agent region changes.
-	LLEnvManagerNew::instance().setRegionChangeCallback(boost::bind(&LLFloaterRegionInfo::requestRegionInfo, this));
+	gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionInfo::requestRegionInfo, this));
 
 	return TRUE;
 }
diff --git a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
index a567d1217a..8879cfd7fb 100755
--- a/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
+++ b/indra/newview/llmenuoptionpathfindingrebakenavmesh.cpp
@@ -79,7 +79,7 @@ void LLMenuOptionPathfindingRebakeNavmesh::initialize()
 
 		if ( !mRegionCrossingSlot.connected() )
 		{
-			mRegionCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this));
+			mRegionCrossingSlot = gAgent.addRegionChangedCallback(boost::bind(&LLMenuOptionPathfindingRebakeNavmesh::handleRegionBoundaryCrossed, this));
 		}
 
 		if (!mAgentStateSlot.connected())
-- 
cgit v1.2.3


From dad992ea31b6b823c316400e61d50d1aa9e52330 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 19 Nov 2013 16:17:58 -0500
Subject: STORM-1980 Minor xml change

---
 indra/newview/skins/default/xui/en/floater_region_restarting.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/indra/newview/skins/default/xui/en/floater_region_restarting.xml b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
index 1bf5884653..dcb5fcc41d 100644
--- a/indra/newview/skins/default/xui/en/floater_region_restarting.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
@@ -25,6 +25,7 @@ If you stay in this region you will be logged out.
      top="0"
      left="0"
      background_visible="true"
+     bg_opaque_color="Orange"
      bg_alpha_color="Orange">
     <text
      type="string"
-- 
cgit v1.2.3


From 6b1d835f95c66f09caaafd073780dcbd5eb07907 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Sun, 24 Nov 2013 15:46:21 -0500
Subject: STORM-1981 Rough initial changes for evaluation purposes.

---
 doc/contributions.txt       |  1 +
 indra/newview/lltracker.cpp | 87 +++++++++++++++++++++++++++++++++++++++------
 2 files changed, 77 insertions(+), 11 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 99527c0587..2a279e1c58 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1981
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index cbd16e873d..1aa61cf50e 100755
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -412,7 +412,7 @@ const std::string& LLTracker::getTrackedLocationName()
 	return instance()->mTrackedLocationName;
 }
 
-F32 pulse_func(F32 t, F32 z)
+F32 pulse_func(F32 t, F32 z, bool tracking_avatar)
 {
 	if (!LLTracker::sCheesyBeacon)
 	{
@@ -420,8 +420,15 @@ F32 pulse_func(F32 t, F32 z)
 	}
 	
 	t *= F_PI;
-	z -= t*64.f - 256.f;
-	
+	if (tracking_avatar)
+	{
+		z += t*64.f - 256.f;
+	}
+	else
+	{
+		z -= t*64.f - 256.f;
+	}
+
 	F32 a = cosf(z*F_PI/512.f)*10.0f;
 	a = llmax(a, 9.9f);
 	a -= 9.9f;
@@ -497,9 +504,11 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
 	}
 
 	LLColor4 fogged_color = color_frac * color + (1 - color_frac)*gSky.getFogColor();
+	LLColor4 under_color = color_frac * LLColor4::blue + (1 - color_frac) * gSky.getFogColor();
 
 	F32 FADE_DIST = 3.f;
 	fogged_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
+	under_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
 
 	LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(pos_global);
 
@@ -508,22 +517,21 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
 	LLGLDisable cull_face(GL_CULL_FACE);
 	LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
 	
-	
 	gGL.matrixMode(LLRender::MM_MODELVIEW);
 	gGL.pushMatrix();
 	{
 		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
-		
+
 		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
 
 		gGL.color4fv(fogged_color.mV);
 		const U32 BEACON_VERTS = 256;
-		const F32 step = 1024.0f/BEACON_VERTS;
-		
+		const F32 step = (5020.0f - pos_agent.mV[2]) / BEACON_VERTS;
+
 		LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
 		F32 t = gRenderStartTime.getElapsedTimeF32();
 		F32 dr = dist/LLViewerCamera::getInstance()->getFar();
-		
+
 		for (U32 i = 0; i < BEACON_VERTS; i++)
 		{
 			F32 x = x_axis.mV[0];
@@ -531,9 +539,10 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
 			
 			F32 z = i * step;
 			F32 z_next = (i+1)*step;
-		
-			F32 a = pulse_func(t, z);
-			F32 an = pulse_func(t, z_next);
+
+			bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
+			F32 a = pulse_func(t, z, tracking_avatar);
+			F32 an = pulse_func(t, z_next, tracking_avatar);
 			
 			LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
 			LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
@@ -561,7 +570,63 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
 			gGL.vertex3f(x*a,y*a,z);
 			gGL.color4fv(col_edge_next.mV);
 			gGL.vertex3f(x*an,y*an,z_next);
+			gGL.end();
+		}
+	}
+	gGL.popMatrix();
+
+	gGL.pushMatrix();
+	{
+		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], 0);
+
+//		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, under_color);
+
+		gGL.color4fv(under_color.mV);
+		const U32 BEACON_VERTS = 256;
+		const F32 step = pos_agent.mV[2] / BEACON_VERTS;
+
+		LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
+		F32 t = gRenderStartTime.getElapsedTimeF32();
+		F32 dr = dist/LLViewerCamera::getInstance()->getFar();
+
+		for (U32 i = 0; i < BEACON_VERTS; i++)
+		{
+			F32 x = x_axis.mV[0];
+			F32 y = x_axis.mV[1];
+			
+			F32 z = i * step;
+			F32 z_next = (i+1)*step;
+
+			bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
+			F32 a = pulse_func(t, z, tracking_avatar);
+			F32 an = pulse_func(t, z_next, tracking_avatar);
+			
+			LLColor4 c_col = under_color + LLColor4(a,a,a,a);
+			LLColor4 col_next = under_color + LLColor4(an,an,an,an);
+			LLColor4 col_edge = under_color * LLColor4(a,a,a,0.0f);
+			LLColor4 col_edge_next = under_color * LLColor4(an,an,an,0.0f);
+			
+			a *= 2.f;
+			a += 1.0f+dr;
+			
+			an *= 2.f;
+			an += 1.0f+dr;
+		
+			gGL.begin(LLRender::TRIANGLE_STRIP);
+			gGL.color4fv(col_edge.mV);
+			gGL.vertex3f(-x*a, -y*a, z);
+			gGL.color4fv(col_edge_next.mV);
+			gGL.vertex3f(-x*an, -y*an, z_next);
 			
+			gGL.color4fv(c_col.mV);
+			gGL.vertex3f(0, 0, z);
+			gGL.color4fv(col_next.mV);
+			gGL.vertex3f(0, 0, z_next);
+			
+			gGL.color4fv(col_edge.mV);
+			gGL.vertex3f(x*a,y*a,z);
+			gGL.color4fv(col_edge_next.mV);
+			gGL.vertex3f(x*an,y*an,z_next);
 			gGL.end();
 		}
 	}
-- 
cgit v1.2.3


From f04c2a781ce1ff65f17bee24187a1ea1fc667787 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Mon, 25 Nov 2013 13:54:43 -0500
Subject: STORM-1981 Make pulse operate properly in both directions. Move
 duplicated common code into its own function.

---
 indra/newview/lltracker.cpp            | 202 +++++++++++++--------------------
 indra/newview/lltracker.h              |   2 +
 indra/newview/skins/default/colors.xml |   3 +
 3 files changed, 85 insertions(+), 122 deletions(-)

diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index 1aa61cf50e..e242cd6f5e 100755
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -167,6 +167,7 @@ void LLTracker::render3D()
 	}
 	
 	static LLUIColor map_track_color = LLUIColorTable::instance().getColor("MapTrackColor", LLColor4::white);
+	static LLUIColor map_track_color_under = LLUIColorTable::instance().getColor("MapTrackColorUnder", LLColor4::white);
 	
 	// Arbitary location beacon
 	if( instance()->mIsTrackingLocation )
@@ -187,7 +188,7 @@ void LLTracker::render3D()
 		}
 		else
 		{
-			renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, 
+			renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, map_track_color_under,
 					  	instance()->mBeaconText, instance()->mTrackedLocationName );
 		}
 	}
@@ -229,7 +230,7 @@ void LLTracker::render3D()
 					// and back again
 					instance()->mHasReachedLandmark = FALSE;
 				}
-				renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, 
+				renderBeacon( instance()->mTrackedPositionGlobal, map_track_color, map_track_color_under,
 							  instance()->mBeaconText, instance()->mTrackedLandmarkName );
 			}
 		}
@@ -258,7 +259,7 @@ void LLTracker::render3D()
 			}
 			else
 			{
-				renderBeacon( av_tracker.getGlobalPos(), map_track_color, 
+				renderBeacon( av_tracker.getGlobalPos(), map_track_color, map_track_color_under,
 						  	instance()->mBeaconText, av_tracker.getName() );
 			}
 		}
@@ -412,7 +413,7 @@ const std::string& LLTracker::getTrackedLocationName()
 	return instance()->mTrackedLocationName;
 }
 
-F32 pulse_func(F32 t, F32 z, bool tracking_avatar)
+F32 pulse_func(F32 t, F32 z, bool tracking_avatar, std::string direction)
 {
 	if (!LLTracker::sCheesyBeacon)
 	{
@@ -420,7 +421,7 @@ F32 pulse_func(F32 t, F32 z, bool tracking_avatar)
 	}
 	
 	t *= F_PI;
-	if (tracking_avatar)
+	if ("DOWN" == direction)
 	{
 		z += t*64.f - 256.f;
 	}
@@ -481,10 +482,79 @@ void draw_shockwave(F32 center_z, F32 t, S32 steps, LLColor4 color)
 	gGL.end();
 }
 
+void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4 fogged_color, F32 dist)
+{
+	const U32 BEACON_VERTS = 256;
+	F32 step;
+
+	gGL.matrixMode(LLRender::MM_MODELVIEW);
+	gGL.pushMatrix();
+
+	if ("DOWN" == direction)
+	{
+		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
+		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
+		step = (5020.0f - pos_agent.mV[2]) / BEACON_VERTS;
+	}
+	else
+	{
+		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], 0);
+		step = pos_agent.mV[2] / BEACON_VERTS;
+	}
+
+	gGL.color4fv(fogged_color.mV);
+
+	LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
+	F32 t = gRenderStartTime.getElapsedTimeF32();
+	F32 dr = dist/LLViewerCamera::getInstance()->getFar();
+
+	for (U32 i = 0; i < BEACON_VERTS; i++)
+	{
+		F32 x = x_axis.mV[0];
+		F32 y = x_axis.mV[1];
+			
+		F32 z = i * step;
+		F32 z_next = (i+1)*step;
+
+		bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
+		F32 a = pulse_func(t, z, tracking_avatar, direction);
+		F32 an = pulse_func(t, z_next, tracking_avatar, direction);
+
+		LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
+		LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
+		LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f);
+		LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
+
+		a *= 2.f;
+		a += 1.0f+dr;
+
+		an *= 2.f;
+		an += 1.0f+dr;
+
+		gGL.begin(LLRender::TRIANGLE_STRIP);
+		gGL.color4fv(col_edge.mV);
+		gGL.vertex3f(-x*a, -y*a, z);
+		gGL.color4fv(col_edge_next.mV);
+		gGL.vertex3f(-x*an, -y*an, z_next);
+
+		gGL.color4fv(c_col.mV);
+		gGL.vertex3f(0, 0, z);
+		gGL.color4fv(col_next.mV);
+		gGL.vertex3f(0, 0, z_next);
+
+		gGL.color4fv(col_edge.mV);
+		gGL.vertex3f(x*a,y*a,z);
+		gGL.color4fv(col_edge_next.mV);
+		gGL.vertex3f(x*an,y*an,z_next);
+		gGL.end();
+	}
+	gGL.popMatrix();
+}
 
 // static 
 void LLTracker::renderBeacon(LLVector3d pos_global, 
-							 const LLColor4& color, 
+							 const LLColor4& color,
+							 const LLColor4& color_under,
 							 LLHUDText* hud_textp, 
 							 const std::string& label )
 {
@@ -504,11 +574,11 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
 	}
 
 	LLColor4 fogged_color = color_frac * color + (1 - color_frac)*gSky.getFogColor();
-	LLColor4 under_color = color_frac * LLColor4::blue + (1 - color_frac) * gSky.getFogColor();
+	LLColor4 fogged_color_under = color_frac * color_under + (1 - color_frac) * gSky.getFogColor();
 
 	F32 FADE_DIST = 3.f;
 	fogged_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
-	under_color.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
+	fogged_color_under.mV[3] = llmax(0.2f, llmin(0.5f,(dist-FADE_DIST)/FADE_DIST));
 
 	LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(pos_global);
 
@@ -517,120 +587,8 @@ void LLTracker::renderBeacon(LLVector3d pos_global,
 	LLGLDisable cull_face(GL_CULL_FACE);
 	LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE);
 	
-	gGL.matrixMode(LLRender::MM_MODELVIEW);
-	gGL.pushMatrix();
-	{
-		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]);
-
-		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, fogged_color);
-
-		gGL.color4fv(fogged_color.mV);
-		const U32 BEACON_VERTS = 256;
-		const F32 step = (5020.0f - pos_agent.mV[2]) / BEACON_VERTS;
-
-		LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
-		F32 t = gRenderStartTime.getElapsedTimeF32();
-		F32 dr = dist/LLViewerCamera::getInstance()->getFar();
-
-		for (U32 i = 0; i < BEACON_VERTS; i++)
-		{
-			F32 x = x_axis.mV[0];
-			F32 y = x_axis.mV[1];
-			
-			F32 z = i * step;
-			F32 z_next = (i+1)*step;
-
-			bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
-			F32 a = pulse_func(t, z, tracking_avatar);
-			F32 an = pulse_func(t, z_next, tracking_avatar);
-			
-			LLColor4 c_col = fogged_color + LLColor4(a,a,a,a);
-			LLColor4 col_next = fogged_color + LLColor4(an,an,an,an);
-			LLColor4 col_edge = fogged_color * LLColor4(a,a,a,0.0f);
-			LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
-			
-			a *= 2.f;
-			a += 1.0f+dr;
-			
-			an *= 2.f;
-			an += 1.0f+dr;
-		
-			gGL.begin(LLRender::TRIANGLE_STRIP);
-			gGL.color4fv(col_edge.mV);
-			gGL.vertex3f(-x*a, -y*a, z);
-			gGL.color4fv(col_edge_next.mV);
-			gGL.vertex3f(-x*an, -y*an, z_next);
-			
-			gGL.color4fv(c_col.mV);
-			gGL.vertex3f(0, 0, z);
-			gGL.color4fv(col_next.mV);
-			gGL.vertex3f(0, 0, z_next);
-			
-			gGL.color4fv(col_edge.mV);
-			gGL.vertex3f(x*a,y*a,z);
-			gGL.color4fv(col_edge_next.mV);
-			gGL.vertex3f(x*an,y*an,z_next);
-			gGL.end();
-		}
-	}
-	gGL.popMatrix();
-
-	gGL.pushMatrix();
-	{
-		gGL.translatef(pos_agent.mV[0], pos_agent.mV[1], 0);
-
-//		draw_shockwave(1024.f, gRenderStartTime.getElapsedTimeF32(), 32, under_color);
-
-		gGL.color4fv(under_color.mV);
-		const U32 BEACON_VERTS = 256;
-		const F32 step = pos_agent.mV[2] / BEACON_VERTS;
-
-		LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
-		F32 t = gRenderStartTime.getElapsedTimeF32();
-		F32 dr = dist/LLViewerCamera::getInstance()->getFar();
-
-		for (U32 i = 0; i < BEACON_VERTS; i++)
-		{
-			F32 x = x_axis.mV[0];
-			F32 y = x_axis.mV[1];
-			
-			F32 z = i * step;
-			F32 z_next = (i+1)*step;
-
-			bool tracking_avatar = getTrackingStatus() == TRACKING_AVATAR;
-			F32 a = pulse_func(t, z, tracking_avatar);
-			F32 an = pulse_func(t, z_next, tracking_avatar);
-			
-			LLColor4 c_col = under_color + LLColor4(a,a,a,a);
-			LLColor4 col_next = under_color + LLColor4(an,an,an,an);
-			LLColor4 col_edge = under_color * LLColor4(a,a,a,0.0f);
-			LLColor4 col_edge_next = under_color * LLColor4(an,an,an,0.0f);
-			
-			a *= 2.f;
-			a += 1.0f+dr;
-			
-			an *= 2.f;
-			an += 1.0f+dr;
-		
-			gGL.begin(LLRender::TRIANGLE_STRIP);
-			gGL.color4fv(col_edge.mV);
-			gGL.vertex3f(-x*a, -y*a, z);
-			gGL.color4fv(col_edge_next.mV);
-			gGL.vertex3f(-x*an, -y*an, z_next);
-			
-			gGL.color4fv(c_col.mV);
-			gGL.vertex3f(0, 0, z);
-			gGL.color4fv(col_next.mV);
-			gGL.vertex3f(0, 0, z_next);
-			
-			gGL.color4fv(col_edge.mV);
-			gGL.vertex3f(x*a,y*a,z);
-			gGL.color4fv(col_edge_next.mV);
-			gGL.vertex3f(x*an,y*an,z_next);
-			gGL.end();
-		}
-	}
-	gGL.popMatrix();
+	LLTracker::drawBeacon(pos_agent, "DOWN", fogged_color, dist);
+	LLTracker::drawBeacon(pos_agent, "UP", fogged_color_under, dist);
 
 	std::string text;
 	text = llformat( "%.0f m", to_vec.magVec());
diff --git a/indra/newview/lltracker.h b/indra/newview/lltracker.h
index 8e916af315..d8d5803787 100755
--- a/indra/newview/lltracker.h
+++ b/indra/newview/lltracker.h
@@ -108,8 +108,10 @@ protected:
 	LLTracker();
 	~LLTracker();
 
+	static void drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4 fogged_color, F32 dist);
 	static void renderBeacon( LLVector3d pos_global, 
 							 const LLColor4& color, 
+							 const LLColor4& color_under,
 							 LLHUDText* hud_textp, 
 							 const std::string& label );
 
diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml
index f53995732f..6f1a24d7f8 100755
--- a/indra/newview/skins/default/colors.xml
+++ b/indra/newview/skins/default/colors.xml
@@ -510,6 +510,9 @@
     <color
      name="MapTrackColor"
      reference="Red" />
+    <color
+     name="MapTrackColorUnder"
+     reference="Blue" />
     <color
      name="MapTrackDisabledColor"
      value="0.5 0 0 1" />
-- 
cgit v1.2.3


From 44ea72848fd64201ceef344e4136b9323c258615 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 26 Nov 2013 09:30:53 -0500
Subject: STORM-1981 Eliminate beam spreading

---
 indra/newview/lltracker.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp
index e242cd6f5e..73ceb783b5 100755
--- a/indra/newview/lltracker.cpp
+++ b/indra/newview/lltracker.cpp
@@ -506,7 +506,6 @@ void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4
 
 	LLVector3 x_axis = LLViewerCamera::getInstance()->getLeftAxis();
 	F32 t = gRenderStartTime.getElapsedTimeF32();
-	F32 dr = dist/LLViewerCamera::getInstance()->getFar();
 
 	for (U32 i = 0; i < BEACON_VERTS; i++)
 	{
@@ -526,10 +525,10 @@ void LLTracker::drawBeacon(LLVector3 pos_agent, std::string direction, LLColor4
 		LLColor4 col_edge_next = fogged_color * LLColor4(an,an,an,0.0f);
 
 		a *= 2.f;
-		a += 1.0f+dr;
+		a += 1.0f;
 
 		an *= 2.f;
-		an += 1.0f+dr;
+		an += 1.0f;
 
 		gGL.begin(LLRender::TRIANGLE_STRIP);
 		gGL.color4fv(col_edge.mV);
-- 
cgit v1.2.3


From 52ec6f9af029797615a80e5a889572c18914d56e Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 26 Nov 2013 15:09:55 -0500
Subject: remove excessively complex fixes for MAINT-2914 and MAINT-3142

---
 indra/llui/llcommandmanager.cpp                    |  4 --
 indra/llui/llcommandmanager.h                      |  7 ----
 indra/llui/lltabcontainer.cpp                      | 23 ++---------
 indra/llui/lltabcontainer.h                        | 11 +----
 indra/llui/lltoolbar.cpp                           |  2 -
 indra/newview/app_settings/commands.xml            | 48 ----------------------
 indra/newview/skins/default/textures/textures.xml  |  3 --
 .../newview/skins/default/xui/en/panel_people.xml  |  3 +-
 .../default/xui/en/widgets/location_input.xml      |  1 -
 .../skins/default/xui/en/widgets/tab_container.xml | 15 ++-----
 10 files changed, 8 insertions(+), 109 deletions(-)

diff --git a/indra/llui/llcommandmanager.cpp b/indra/llui/llcommandmanager.cpp
index 49cfb2255e..625fb8e870 100755
--- a/indra/llui/llcommandmanager.cpp
+++ b/indra/llui/llcommandmanager.cpp
@@ -50,8 +50,6 @@ const LLCommandId LLCommandId::null = LLCommandId("null command");
 LLCommand::Params::Params()
 	: available_in_toybox("available_in_toybox", false)
 	, icon("icon")
-	, hover_icon_unselected("hover_icon_unselected")
-	, hover_icon_selected("hover_icon_selected")
 	, label_ref("label_ref")
 	, name("name")
 	, tooltip_ref("tooltip_ref")
@@ -73,8 +71,6 @@ LLCommand::LLCommand(const LLCommand::Params& p)
 	: mIdentifier(p.name)
 	, mAvailableInToybox(p.available_in_toybox)
 	, mIcon(p.icon)
-	, mHoverIconUnselected(p.hover_icon_unselected)
-	, mHoverIconSelected(p.hover_icon_selected)
 	, mLabelRef(p.label_ref)
 	, mName(p.name)
 	, mTooltipRef(p.tooltip_ref)
diff --git a/indra/llui/llcommandmanager.h b/indra/llui/llcommandmanager.h
index 9f276f712d..ff5a8a3257 100755
--- a/indra/llui/llcommandmanager.h
+++ b/indra/llui/llcommandmanager.h
@@ -96,9 +96,6 @@ public:
 		Mandatory<std::string>	name;
 		Mandatory<std::string>	tooltip_ref;
 
-		Optional<std::string>   hover_icon_selected;
-		Optional<std::string>   hover_icon_unselected;
-
 		Mandatory<std::string>	execute_function;
 		Optional<LLSD>			execute_parameters;
 
@@ -127,8 +124,6 @@ public:
 	const std::string& labelRef() const { return mLabelRef; }
 	const std::string& name() const { return mName; }
 	const std::string& tooltipRef() const { return mTooltipRef; }
-	const std::string& hoverIconUnselected() const {return mHoverIconUnselected; }
-	const std::string& hoverIconSelected() const {return mHoverIconSelected; }
 
 	const std::string& executeFunctionName() const { return mExecuteFunction; }
 	const LLSD& executeParameters() const { return mExecuteParameters; }
@@ -155,8 +150,6 @@ private:
 	std::string mLabelRef;
 	std::string mName;
 	std::string mTooltipRef;
-	std::string mHoverIconUnselected;
-	std::string mHoverIconSelected;
 
 	std::string mExecuteFunction;
 	LLSD        mExecuteParameters;
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp
index 6fd2bb1b36..76ba53ec32 100755
--- a/indra/llui/lltabcontainer.cpp
+++ b/indra/llui/lltabcontainer.cpp
@@ -193,15 +193,12 @@ LLTabContainer::TabParams::TabParams()
 :	tab_top_image_unselected("tab_top_image_unselected"),
 	tab_top_image_selected("tab_top_image_selected"),
 	tab_top_image_flash("tab_top_image_flash"),
-	tab_top_image_hovered("tab_top_image_hovered"),
 	tab_bottom_image_unselected("tab_bottom_image_unselected"),
 	tab_bottom_image_selected("tab_bottom_image_selected"),
 	tab_bottom_image_flash("tab_bottom_image_flash"),
-	tab_bottom_image_hovered("tab_bottom_image_hovered"),
 	tab_left_image_unselected("tab_left_image_unselected"),
 	tab_left_image_selected("tab_left_image_selected"),
-	tab_left_image_flash("tab_left_image_flash"),
-	tab_left_image_hovered("tab_left_image_hovered")
+	tab_left_image_flash("tab_left_image_flash")
 {}
 
 LLTabContainer::Params::Params()
@@ -221,8 +218,7 @@ LLTabContainer::Params::Params()
 	open_tabs_on_drag_and_drop("open_tabs_on_drag_and_drop", false),
 	tab_icon_ctrl_pad("tab_icon_ctrl_pad", 0),
 	use_ellipses("use_ellipses"),
-	font_halign("halign"),
-	use_highlighting_on_hover("use_highlighting_on_hover",false)
+	font_halign("halign")
 {}
 
 LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
@@ -258,8 +254,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p)
 	mCustomIconCtrlUsed(p.use_custom_icon_ctrl),
 	mOpenTabsOnDragAndDrop(p.open_tabs_on_drag_and_drop),
 	mTabIconCtrlPad(p.tab_icon_ctrl_pad),
-	mUseTabEllipses(p.use_ellipses),
-	mUseHighlightingOnHover(p.use_highlighting_on_hover)
+	mUseTabEllipses(p.use_ellipses)
 {
 	static LLUICachedControl<S32> tabcntr_vert_tab_min_width ("UITabCntrVertTabMinWidth", 0);
 
@@ -908,30 +903,18 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon
 			tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_top_image_unselected));
 			tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_top_image_selected));
 			tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_top_image_flash));
-			if(mUseHighlightingOnHover)
-			{
-				tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_top_image_hovered));
-			}
 		}
 		else if (pos == LLTabContainer::BOTTOM)
 		{
 			tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_unselected));
 			tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_bottom_image_selected));
 			tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_bottom_image_flash));
-			if(mUseHighlightingOnHover)
-			{
-				tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_bottom_image_hovered));
-			}
 		}
 		else if (pos == LLTabContainer::LEFT)
 		{
 			tuple->mButton->setImageUnselected(static_cast<LLUIImage*>(params.tab_left_image_unselected));
 			tuple->mButton->setImageSelected(static_cast<LLUIImage*>(params.tab_left_image_selected));
 			tuple->mButton->setImageFlash(static_cast<LLUIImage*>(params.tab_left_image_flash));
-			if(mUseHighlightingOnHover)
-			{
-				tuple->mButton->setImageHoverUnselected(static_cast<LLUIImage*>(params.tab_left_image_hovered));
-			}
 		}
 	}
 }
diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h
index 7e7d4ac6e6..57862fc626 100755
--- a/indra/llui/lltabcontainer.h
+++ b/indra/llui/lltabcontainer.h
@@ -62,15 +62,12 @@ public:
 		Optional<LLUIImage*>				tab_top_image_unselected,
 											tab_top_image_selected,
 											tab_top_image_flash,
-											tab_top_image_hovered,
 											tab_bottom_image_unselected,
 											tab_bottom_image_selected,
 											tab_bottom_image_flash,
-											tab_bottom_image_hovered,
 											tab_left_image_unselected,
 											tab_left_image_selected,
-											tab_left_image_flash,
-											tab_left_image_hovered;
+											tab_left_image_flash;		
 		TabParams();
 	};
 
@@ -117,11 +114,6 @@ public:
 		 */
 		Optional<S32>						tab_icon_ctrl_pad;
 
-		/**
-		 *  This variable is used to found out should we highlight tab button on hover
-		*/
-		Optional<bool>						use_highlighting_on_hover;
-
 		Params();
 	};
 
@@ -315,7 +307,6 @@ private:
 	bool							mOpenTabsOnDragAndDrop;
 	S32								mTabIconCtrlPad;
 	bool							mUseTabEllipses;
-	bool                            mUseHighlightingOnHover;
 };
 
 #endif  // LL_TABCONTAINER_H
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index 6bfe113933..928e82cb8c 100755
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -928,8 +928,6 @@ LLToolBarButton* LLToolBar::createButton(const LLCommandId& id)
 	button_p.label = LLTrans::getString(commandp->labelRef());
 	button_p.tool_tip = LLTrans::getString(commandp->tooltipRef());
 	button_p.image_overlay = LLUI::getUIImage(commandp->icon());
-	button_p.image_hover_unselected = LLUI::getUIImage(commandp->hoverIconUnselected());
-	button_p.image_hover_selected = LLUI::getUIImage(commandp->hoverIconSelected());
 	button_p.button_flash_enable = commandp->isFlashingAllowed();
 	button_p.overwriteFrom(mButtonParams[mButtonType]);
 	LLToolBarButton* button = LLUICtrlFactory::create<LLToolBarButton>(button_p);
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index ce878f156b..60c942094a 100755
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -3,8 +3,6 @@
   <command name="aboutland"
            available_in_toybox="true"
            icon="Command_AboutLand_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_AboutLand_Label"
            tooltip_ref="Command_AboutLand_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -15,8 +13,6 @@
   <command name="appearance"  
            available_in_toybox="true"
            icon="Command_Appearance_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Appearance_Label"
            tooltip_ref="Command_Appearance_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -27,8 +23,6 @@
   <command name="avatar"
            available_in_toybox="true"
            icon="Command_Avatar_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Avatar_Label"
            tooltip_ref="Command_Avatar_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -39,8 +33,6 @@
   <command name="build"
            available_in_toybox="true"
            icon="Command_Build_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Build_Label"
            tooltip_ref="Command_Build_Tooltip"
            execute_function="Build.Toggle"
@@ -54,8 +46,6 @@
            available_in_toybox="true"
 		   is_flashing_allowed="true"
            icon="Command_Chat_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Chat_Label"
            tooltip_ref="Command_Conversations_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -66,8 +56,6 @@
   <command name="compass"
            available_in_toybox="false"
            icon="Command_Compass_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Compass_Label"
            tooltip_ref="Command_Compass_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -78,8 +66,6 @@
   <command name="destinations"
            available_in_toybox="true"
            icon="Command_Destinations_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Destinations_Label"
            tooltip_ref="Command_Destinations_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -90,8 +76,6 @@
   <command name="gestures"
            available_in_toybox="true"
            icon="Command_Gestures_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Gestures_Label"
            tooltip_ref="Command_Gestures_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -102,8 +86,6 @@
   <command name="howto"
            available_in_toybox="true"
            icon="Command_HowTo_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_HowTo_Label"
            tooltip_ref="Command_HowTo_Tooltip"
            execute_function="Help.ToggleHowTo"
@@ -112,8 +94,6 @@
   <command name="inventory"
            available_in_toybox="true"
            icon="Command_Inventory_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Inventory_Label"
            tooltip_ref="Command_Inventory_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -124,8 +104,6 @@
   <command name="map"
            available_in_toybox="true"
            icon="Command_Map_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Map_Label"
            tooltip_ref="Command_Map_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -136,8 +114,6 @@
   <command name="marketplace"
            available_in_toybox="false"
            icon="Command_Marketplace_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Marketplace_Label"
            tooltip_ref="Command_Marketplace_Tooltip"
            execute_function="Avatar.OpenMarketplace"
@@ -145,8 +121,6 @@
   <command name="minimap"
            available_in_toybox="true"
            icon="Command_MiniMap_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_MiniMap_Label"
            tooltip_ref="Command_MiniMap_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -157,8 +131,6 @@
   <command name="move"
            available_in_toybox="true"
            icon="Command_Move_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Move_Label"
            tooltip_ref="Command_Move_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -169,8 +141,6 @@
   <command name="outbox"
            available_in_toybox="false"
            icon="Command_Outbox_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Outbox_Label"
            tooltip_ref="Command_Outbox_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -181,8 +151,6 @@
   <command name="people"
            available_in_toybox="true"
            icon="Command_People_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_People_Label"
            tooltip_ref="Command_People_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -193,8 +161,6 @@
   <command name="picks"
            available_in_toybox="true"
            icon="Command_Picks_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Picks_Label"
            tooltip_ref="Command_Picks_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -205,8 +171,6 @@
   <command name="places"
            available_in_toybox="true"
            icon="Command_Places_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Places_Label"
            tooltip_ref="Command_Places_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -217,8 +181,6 @@
   <command name="preferences"
            available_in_toybox="true"
            icon="Command_Preferences_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Preferences_Label"
            tooltip_ref="Command_Preferences_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -229,8 +191,6 @@
   <command name="profile"
            available_in_toybox="true"
            icon="Command_Profile_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Profile_Label"
            tooltip_ref="Command_Profile_Tooltip"
            execute_function="Avatar.ToggleMyProfile"
@@ -239,8 +199,6 @@
   <command name="search"
            available_in_toybox="true"
            icon="Command_Search_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Search_Label"
            tooltip_ref="Command_Search_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -251,8 +209,6 @@
   <command name="snapshot"
            available_in_toybox="true"
            icon="Command_Snapshot_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Snapshot_Label"
            tooltip_ref="Command_Snapshot_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
@@ -273,8 +229,6 @@
   <command name="speak"
            available_in_toybox="true"
            icon="Command_Speak_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_Speak_Label"
            tooltip_ref="Command_Speak_Tooltip"
            execute_function="Agent.PressMicrophone"
@@ -289,8 +243,6 @@
   <command name="view"
            available_in_toybox="true"
            icon="Command_View_Icon"
-           hover_icon_unselected="Command_Highlighting_Icon"
-           hover_icon_selected="Command_Highlighting_Selected_Icon"
            label_ref="Command_View_Label"
            tooltip_ref="Command_View_Tooltip"
            execute_function="Floater.ToggleOrBringToFront"
diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml
index bb891996c9..94c187e21a 100755
--- a/indra/newview/skins/default/textures/textures.xml
+++ b/indra/newview/skins/default/textures/textures.xml
@@ -153,8 +153,6 @@ with the same filename but different name
   <texture name="Command_Speak_Icon"        file_name="toolbar_icons/speak.png"        preload="true" />
   <texture name="Command_View_Icon"         file_name="toolbar_icons/view.png"         preload="true" />
   <texture name="Command_Voice_Icon"        file_name="toolbar_icons/nearbyvoice.png"  preload="true" />
-  <texture name="Command_Highlighting_Icon" file_name="toolbar_icons/highlighting.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
-  <texture name="Command_Highlighting_Selected_Icon" file_name="toolbar_icons/highlighting_selected.png" preload="true" scale.left="4" scale.top="19" scale.right="28" scale.bottom="4" />
   <texture name="Caret_Bottom_Icon"         file_name="toolbar_icons/caret_bottom.png" preload="true" scale.left="1" scale.top="23" scale.right="15" scale.bottom="1" />
   <texture name="Caret_Right_Icon"          file_name="toolbar_icons/caret_right.png"  preload="true" scale.left="5" scale.top="15" scale.right="28" scale.bottom="1" />
   <texture name="Caret_Left_Icon"           file_name="toolbar_icons/caret_left.png"   preload="true" scale.left="1" scale.top="15" scale.right="23" scale.bottom="1" />
@@ -165,7 +163,6 @@ with the same filename but different name
   <texture name="ComboButton_On" file_name="widgets/ComboButton_On.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
   <texture name="ComboButton_Off" file_name="widgets/ComboButton_Off.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
   <texture name="ComboButton_UpOff" file_name="widgets/ComboButton_UpOff.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
-  <texture name="ComboButton_Hovered" file_name="widgets/ComboButton_Hover.png" preload="true" scale.left="2" scale.top="19" scale.right="18" scale.bottom="2" />
 
   <texture name="Container" file_name="containers/Container.png" preload="false" />
 
diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml
index 3caf2b3d7e..05013f6b1e 100755
--- a/indra/newview/skins/default/xui/en/panel_people.xml
+++ b/indra/newview/skins/default/xui/en/panel_people.xml
@@ -66,8 +66,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M
      tab_position="top"
      top="0"
      halign="center"
-     right="-5"
-     use_highlighting_on_hover="true">
+     right="-5">
 
 <!-- ================================= NEARBY tab =========================== -->
 
diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml
index 4ea1aa6efb..61ec046649 100755
--- a/indra/newview/skins/default/xui/en/widgets/location_input.xml
+++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml
@@ -150,7 +150,6 @@
   <combo_button
 		name="Location History"
                 label=""
-                image_hover_unselected="ComboButton_Hovered"
                 pad_right="0"/>
   <combo_list
 	      bg_writeable_color="MenuDefaultBgColor"
diff --git a/indra/newview/skins/default/xui/en/widgets/tab_container.xml b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
index 9559be214a..0586119681 100755
--- a/indra/newview/skins/default/xui/en/widgets/tab_container.xml
+++ b/indra/newview/skins/default/xui/en/widgets/tab_container.xml
@@ -24,26 +24,17 @@ label_pad_left - padding to the left of tab button labels
                tab_bottom_image_unselected="Toolbar_Left_Off"
                tab_bottom_image_selected="Toolbar_Left_Selected"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
-               tab_top_image_hovered="TabTop_Left_Selected"
-               tab_button_image_hovered="Toolbar_Left_Selected"
-               tab_left_image_hovered="SegmentedBtn_Left_Selected_Over"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
   <middle_tab tab_top_image_unselected="TabTop_Middle_Off"
                tab_top_image_selected="TabTop_Middle_Selected"
                tab_bottom_image_unselected="Toolbar_Middle_Off"
                tab_bottom_image_selected="Toolbar_Middle_Selected"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
-               tab_top_image_hovered="TabTop_Middle_Selected"
-               tab_button_image_hovered="Toolbar_Middle_Selected"
-               tab_left_image_hovered="SegmentedBtn_Left_Selected_Over"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
   <last_tab tab_top_image_unselected="TabTop_Right_Off"
                tab_top_image_selected="TabTop_Right_Selected"
                tab_bottom_image_unselected="Toolbar_Right_Off"
                tab_bottom_image_selected="Toolbar_Right_Selected"
                tab_left_image_unselected="SegmentedBtn_Left_Disabled"
-               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"
-               tab_top_image_hovered="TabTop_Right_Selected"
-               tab_button_image_hovered="Toolbar_Right_Selected"
-               tab_left_image_hovered="SegmentedBtn_Left_Selected_Over"/>
+               tab_left_image_selected="SegmentedBtn_Left_Selected_Over"/>
 </tab_container>
-- 
cgit v1.2.3


From db8e4824e7f00516142461fa25616e3527007d66 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 26 Nov 2013 19:43:15 -0500
Subject: STORM-1986 Added right click Show on Map context menu for Inventory
 floater landmarks Possible fix for BUG-4593

---
 doc/contributions.txt                              |  1 +
 indra/newview/llfloaterworldmap.cpp                |  6 ++--
 indra/newview/llinventorybridge.cpp                | 36 ++++++++++++++++++++++
 indra/newview/llinventorybridge.h                  |  4 +++
 .../skins/default/xui/en/menu_inventory.xml        |  8 +++++
 5 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2f9d0c2c86..898efcfbce 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1986
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 137b5446cf..cb637c7162 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -627,8 +627,8 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
 	if (!sim_info)
 	{
 		// We haven't found a region for that point yet, leave the tracking to the world map
-		LLWorldMap::getInstance()->setTracking(pos_global);
 		LLTracker::stopTracking(NULL);
+		LLWorldMap::getInstance()->setTracking(pos_global);
 		S32 world_x = S32(pos_global.mdV[0] / 256);
 		S32 world_y = S32(pos_global.mdV[1] / 256);
 		LLWorldMapMessage::getInstance()->sendMapBlockRequest(world_x, world_y, world_x, world_y, true);
@@ -643,9 +643,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
 	{
 		// Down region. Show the blue circle of death!
 		// i.e. let the world map that this and tell it it's invalid
+		LLTracker::stopTracking(NULL);
 		LLWorldMap::getInstance()->setTracking(pos_global);
 		LLWorldMap::getInstance()->setTrackingInvalid();
-		LLTracker::stopTracking(NULL);
 		setDefaultBtn("");
 		
 		// clicked on a down region - turn off coord display
@@ -665,8 +665,8 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
 	
 	std::string tooltip("");
 	mTrackedStatus = LLTracker::TRACKING_LOCATION;
-	LLTracker::trackLocation(pos_global, full_name, tooltip);
 	LLWorldMap::getInstance()->cancelTracking();		// The floater is taking over the tracking
+	LLTracker::trackLocation(pos_global, full_name, tooltip);
 	
 	LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
 	updateTeleportCoordsDisplay( coord_pos );
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 80ef506272..f65e28a165 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -74,6 +74,7 @@
 #include "llvoavatarself.h"
 #include "llwearablelist.h"
 #include "lllandmarkactions.h"
+#include "llpanellandmarks.h"
 
 void copy_slurl_to_clipboard_callback_inv(const std::string& slurl);
 
@@ -1449,6 +1450,40 @@ void LLItemBridge::performAction(LLInventoryModel* model, std::string action)
 			}
 		}
 	}
+	else if ("show_on_map" == action)
+	{
+		doActionOnCurSelectedLandmark(boost::bind(&LLItemBridge::doShowOnMap, this, _1));
+	}
+}
+
+void LLItemBridge::doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb)
+{
+	LLViewerInventoryItem* cur_item = getItem();
+	if(cur_item && cur_item->getInventoryType() == LLInventoryType::IT_LANDMARK)
+	{ 
+		LLLandmark* landmark = LLLandmarkActions::getLandmark(cur_item->getUUID(), cb);
+		if (landmark)
+		{
+			cb(landmark);
+		}
+	}
+}
+
+void LLItemBridge::doShowOnMap(LLLandmark* landmark)
+{
+	LLVector3d landmark_global_pos;
+	// landmark has already been tested for NULL by calling routine
+	if (!landmark->getGlobalPos(landmark_global_pos))
+	{
+		return;
+	}
+
+	LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+	if (!landmark_global_pos.isExactlyZero() && worldmap_instance)
+	{
+		worldmap_instance->trackLocation(landmark_global_pos);
+		LLFloaterReg::showInstance("world_map", "center");
+	}
 }
 
 void copy_slurl_to_clipboard_callback_inv(const std::string& slurl)
@@ -4580,6 +4615,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 		items.push_back(std::string("Landmark Separator"));
 		items.push_back(std::string("url_copy"));
 		items.push_back(std::string("About Landmark"));
+		items.push_back(std::string("show_on_map"));
 	}
 
 	// Disable "About Landmark" menu item for
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 517153e171..bc875e8f37 100755
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -36,6 +36,7 @@
 #include "llviewercontrol.h"
 #include "llviewerwearable.h"
 #include "lltooldraganddrop.h"
+#include "lllandmarklist.h"
 
 class LLInventoryFilter;
 class LLInventoryPanel;
@@ -239,7 +240,10 @@ protected:
 	BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response);
 	virtual BOOL isItemPermissive() const;
 	virtual void buildDisplayName() const;
+	void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb);
 
+private:
+	void doShowOnMap(LLLandmark* landmark);
 };
 
 class LLFolderBridge : public LLInvFVBridge
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 512205ba43..6fa45d7d66 100755
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -552,6 +552,14 @@
          function="Inventory.DoToSelected"
          parameter="about" />
     </menu_item_call>
+   <menu_item_call
+     label="Show on Map"
+     layout="topleft"
+     name="show_on_map">
+        <menu_item_call.on_click
+         function="Inventory.DoToSelected"
+         parameter="show_on_map" />
+    </menu_item_call>
     <menu_item_separator
      layout="topleft" 
      name="Animation Separator" />
-- 
cgit v1.2.3


From d533dcebf77aa5d62c15488b3e6bed97ecffec02 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 27 Nov 2013 10:26:27 -0500
Subject: STORM-1987 Inconsistent menu naming and behavior in Places floater

---
 doc/contributions.txt                                             | 1 +
 indra/newview/llpanelteleporthistory.cpp                          | 5 +++++
 indra/newview/skins/default/xui/en/menu_teleport_history_item.xml | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2f9d0c2c86..b5f8572d9f 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1987
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 0756faf5c0..9c380f63bd 100755
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -359,6 +359,11 @@ void LLTeleportHistoryPanel::ContextMenu::onInfo()
 void LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback(const std::string& slurl)
 {
 	LLClipboard::instance().copyToClipboard(utf8str_to_wstring(slurl),0,slurl.size());
+
+	LLSD args;
+	args["SLURL"] = slurl;
+
+	LLNotificationsUtil::add("CopySLURL", args);
 }
 
 void LLTeleportHistoryPanel::ContextMenu::onCopyToClipboard()
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
index 0160d52b17..f939c3996d 100755
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
@@ -17,7 +17,7 @@
          function="TeleportHistory.MoreInformation" />
     </menu_item_call>
     <menu_item_call
-     label="Copy to Clipboard"
+     label="Copy SLurl"
      layout="topleft"
      name="CopyToClipboard">
         <menu_item_call.on_click
-- 
cgit v1.2.3


From bb68d6a889b339690a90a7e622daa632c9e6fd7e Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 27 Nov 2013 10:43:02 -0500
Subject: STORM-1986 Eliminated early return per code review

---
 indra/newview/llinventorybridge.cpp | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index f65e28a165..44943d8722 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1473,16 +1473,14 @@ void LLItemBridge::doShowOnMap(LLLandmark* landmark)
 {
 	LLVector3d landmark_global_pos;
 	// landmark has already been tested for NULL by calling routine
-	if (!landmark->getGlobalPos(landmark_global_pos))
+	if (landmark->getGlobalPos(landmark_global_pos))
 	{
-		return;
-	}
-
-	LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
-	if (!landmark_global_pos.isExactlyZero() && worldmap_instance)
-	{
-		worldmap_instance->trackLocation(landmark_global_pos);
-		LLFloaterReg::showInstance("world_map", "center");
+		LLFloaterWorldMap* worldmap_instance = LLFloaterWorldMap::getInstance();
+		if (!landmark_global_pos.isExactlyZero() && worldmap_instance)
+		{
+			worldmap_instance->trackLocation(landmark_global_pos);
+			LLFloaterReg::showInstance("world_map", "center");
+		}
 	}
 }
 
-- 
cgit v1.2.3


From 56f9b9c04868de2dbf106736ce7ee6f454e3ec38 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Tue, 3 Dec 2013 04:19:23 -0500
Subject: STORM-1989 Overlapping UI elements in Upload Model floater

---
 doc/contributions.txt                              |  1 +
 .../skins/default/xui/en/floater_model_preview.xml | 24 +++++++++++-----------
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2f9d0c2c86..6efaf49e17 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1989
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 5e92a12251..9fa416012c 100755
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
@@ -212,11 +212,11 @@
              follows="top|left"
              height="20"
              layout="topleft"
-             left="215"
+             left="222"
              name="lod_mode_high"
              top_delta="0"
              visible="false"
-             width="135">
+             width="130">
                 <item
                  name="Triangle Limit"
                  value="Triangle Limit" />
@@ -230,7 +230,7 @@
              height="20"
              increment="10"
              layout="topleft"
-             left_pad="5"
+             left_pad="3"
              name="lod_triangle_limit_high"
              visible="false"
              width="55" />
@@ -342,10 +342,10 @@
              follows="top|left"
              height="20"
              layout="topleft"
-             left="215"
+             left="222"
              name="lod_mode_medium"
              top_delta="0"
-             width="135">
+             width="130">
                 <item
                  name="Triangle Limit"
                  value="Triangle Limit" />
@@ -359,7 +359,7 @@
              height="20"
              increment="10"
              layout="topleft"
-             left_pad="5"
+             left_pad="3"
              name="lod_triangle_limit_medium"
              width="55" />
             <spinner
@@ -470,10 +470,10 @@
              follows="top|left"
              height="20"
              layout="topleft"
-             left="215"
+             left="222"
              name="lod_mode_low"
              top_delta="0"
-             width="135">
+             width="130">
                 <item
                  name="Triangle Limit"
                  value="Triangle Limit" />
@@ -487,7 +487,7 @@
              height="20"
              increment="10"
              layout="topleft"
-             left_pad="5"
+             left_pad="3"
              name="lod_triangle_limit_low"
              width="55" />
             <spinner
@@ -598,10 +598,10 @@
              follows="top|left"
              height="20"
              layout="topleft"
-             left="215"
+             left="222"
              name="lod_mode_lowest"
              top_delta="0"
-             width="135">
+             width="130">
                 <item
                  name="Triangle Limit"
                  value="Triangle Limit" />
@@ -615,7 +615,7 @@
              height="20"
              increment="10"
              layout="topleft"
-             left_pad="5"
+             left_pad="3"
              name="lod_triangle_limit_lowest"
              width="55" />
             <spinner
-- 
cgit v1.2.3


From 83c62e7094df5ae355efc11b26ac6aa0b0c60da0 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 3 Dec 2013 09:25:30 -0500
Subject: Update based on first project viewer tests. Two more bones to better
 address back deformation: UPPER_BACK and LOWER_BACK Better deformation for
 breasts, belly, upper and lower back (seen using the Body Fat and Belly Size
 sliders) Minor tweaks in the avatar_lad.xml file for a few other minor
 shapes. Small typo bug (FITMESH-2) Updated rigs and corrected female mesh
 Removed skeleton-only files so that people all start from the same base
 meshes with example skinning These updates specifically address the following
 bugs: FITMESH-2, FITMESH-4, FITMESH-5, FITMESH-7, FITMESH-10 (.ma formats,
 not .dae)

---
 indra/newview/character/avatar_lad.xml      | 59 ++++++++++++++++++++++-------
 indra/newview/character/avatar_skeleton.xml |  6 ++-
 2 files changed, 50 insertions(+), 15 deletions(-)
 mode change 100644 => 100755 indra/newview/character/avatar_lad.xml
 mode change 100644 => 100755 indra/newview/character/avatar_skeleton.xml

diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
old mode 100644
new mode 100755
index 4631e012fd..5268498d56
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -3825,7 +3825,11 @@
         <volume_morph
           name="BELLY"
           scale="0.075 0.04 0.03"
-          pos="0.07 0 -0.07"/>
+          pos="0.07 0 -0.02"/>
+        <volume_morph
+          name="PELVIS"
+          scale="0.075 0.04 0.03"
+          pos="0.07 0 -0.02"/>
       </param_morph>
     </param>
 
@@ -3873,12 +3877,12 @@
       <param_morph>
         <volume_morph
           name="LEFT_PEC"
-          scale="0.0 0.0 0.0"
-          pos="0.0 -0.027 0.007"/>
+          scale="-0.05 0.0 0.0"
+          pos="-0.01 -0.01 -0.02"/>
         <volume_morph
           name="RIGHT_PEC"
-          scale="0.0 0.0 0.0"
-          pos="0.0 0.027 0.007"/>
+          scale="-0.05 0.0 0.0"
+          pos="-0.01 -0.01 -0.02"/>
 	  </param_morph>
     </param>
 
@@ -3899,12 +3903,12 @@
       <param_morph>
         <volume_morph
           name="LEFT_PEC"
-          scale="0.0 0.0 0.0"
-          pos="0.0 -0.035 0.009"/>
+          scale="-0.051 0.0 0.0"
+          pos="-0.02 -0.01 -0.03"/>
         <volume_morph
           name="RIGHT_PEC"
-          scale="0.0 0.0 0.0"
-          pos="0.0 0.035 0.009"/>
+          scale="-0.051 0.0 0.0"
+          pos="-0.02 -0.01 -0.03"/>
 	  </param_morph>
     </param>
 
@@ -3970,6 +3974,10 @@
           name="BELLY"
           scale="0.0 -0.01 0.0"
           pos="0.0 0.0 0"/>
+        <volume_morph
+          name="UPPER_BACK"
+          scale="-0.01 -0.01 0.0"
+          pos="0.0 0.0 0"/>
         <volume_morph
           name="CHEST"
           scale="-0.01 -0.01 0.0"
@@ -4020,6 +4028,10 @@
           name="BELLY"
           scale="-0.01 -0.01 0.0"
           pos="0.01 0.0 0"/>
+        <volume_morph
+          name="UPPER_BACK"
+          scale="-0.01 -0.01 0.0"
+          pos="0.0 0.0 0"/>
         <volume_morph
           name="CHEST"
           scale="-0.02 -0.02 0.0"
@@ -4068,14 +4080,32 @@
           name="CHEST"
           scale="0.02 0.03 0.03"
           pos="0 0 -0.03"/>
+        <volume_morph
+          name="PELVIS"
+          scale="0.02 0.03 0.03"
+          pos="0 0 -0.03"/>
+        <volume_morph
+          name="UPPER_BACK"
+          scale="0.01 0.03 0.0"
+          pos="-0.03 0 0"/>
+        <volume_morph
+          name="LOWER_BACK"
+          scale="0.04 0.06 0.0"
+          pos="-0.06 0 0"/>
+        <volume_morph
+          name="LEFT_HANDLE"
+          pos="0.0 0.08 0.0"/>
+        <volume_morph
+          name="RIGHT_HANDLE"
+          pos="0.0 -0.08 0.0"/>
         <volume_morph
           name="LEFT_PEC"
           scale="0.0367 0.0367 0.016"
-          pos="0.031 -0.005 -0.013"/>
+          pos="0.00 -0.005 -0.013"/>
         <volume_morph
           name="RIGHT_PEC"
           scale="0.0367 0.0367 0.016"
-          pos="0.031 0.005 -0.013"/>
+          pos="0.00 0.005 -0.013"/>
         <volume_morph
           name="BELLY"
           scale="0.09 0.08 0.07"
@@ -4187,6 +4217,9 @@
         <volume_morph
           name="BELLY"
           scale="0.0 0.02 0.0"/>
+        <volume_morph
+          name="LOWER_BACK"
+          scale="0.0 0.02 0.0"/>
         <volume_morph
           name="LEFT_HANDLE"
           pos="0.0 0.025 0.0"/>
@@ -4244,11 +4277,11 @@
         <volume_morph
           name="LEFT_PEC"
           scale="0.0 0.0 0.0"
-          pos="-0.01 -0.024 -0.05"/>
+          pos="-0.03 -0.024 -0.01"/>
         <volume_morph
           name="RIGHT_PEC"
           scale="0.0 0.0 0.0"
-          pos="-0.01 0.024 -0.05"/>
+          pos="-0.03 0.024 -0.01"/>
       </param_morph>
     </param>
 
diff --git a/indra/newview/character/avatar_skeleton.xml b/indra/newview/character/avatar_skeleton.xml
old mode 100644
new mode 100755
index 7ab20f8c6b..6b07bbc1d3
--- a/indra/newview/character/avatar_skeleton.xml
+++ b/indra/newview/character/avatar_skeleton.xml
@@ -1,14 +1,16 @@
 <?xml version="1.0" encoding="US-ASCII" standalone="yes"?>
-<linden_skeleton version="1.0" num_bones="51" num_collision_volumes="24">
+<linden_skeleton version="1.0" num_bones="53" num_collision_volumes="26">
 <bone name="mPelvis" pos="0.000 0.000 1.067" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 0.000000 1.067015">
 	<collision_volume name="PELVIS" pos = "-0.01 0 -0.02" rot="0.000000 8.00000 0.000000" scale="0.12 0.16 0.17"/>
 	<collision_volume name="BUTT" pos = "-0.06 0 -0.1" rot="0.000000 0.00000 0.000000" scale="0.1 0.1 0.1"/>
 	<bone name="mTorso" pos="0.000 0.000 0.084" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="0.000000 0.000000 0.084073">
-		<collision_volume name="BELLY" pos = "0.04 0 0.028" rot="0.000000 8.00000 0.000000" scale="0.09 0.13 0.15"/>
+		<collision_volume name="BELLY" pos = "0.028 0 0.04" rot="0.000000 8.00000 0.000000" scale="0.09 0.13 0.15"/>
+		<collision_volume name="LOWER_BACK" pos = "0.0 0.0 0.023" rot="0.000000 0.00000 0.000000" scale="0.09 0.13 0.15"/>
 		<collision_volume name="LEFT_HANDLE" pos = "0.0 0.10 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
 		<collision_volume name="RIGHT_HANDLE" pos = "0.0 -0.10 0.058" rot="0.000000 0.00000 0.000000" scale="0.05 0.05 0.05"/>
 		<bone name="mChest" pos="-0.015 0.000 0.205" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="-0.015368 0.000000 0.204877">
 			<collision_volume name="CHEST" pos = "0.028 0 0.07" rot="0.000000 -10.00000 0.000000" scale="0.11 0.15 0.2"/>
+			<collision_volume name="UPPER_BACK" pos = "0.0 0.0 0.017" rot="0.000000 0.00000 0.000000" scale="0.09 0.13 0.15"/>
 			<collision_volume name="LEFT_PEC" pos = "0.119 0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05"/>
 			<collision_volume name="RIGHT_PEC" pos = "0.119 -0.082 0.042" rot="0.000000 4.29000 0.000000" scale="0.05 0.05 0.05"/>
 			<bone name="mNeck" pos="-0.010 0.000 0.251" rot="0.000000 0.000000 0.000000" scale="1.000 1.000 1.000" pivot="-0.009507 0.000000 0.251108">
-- 
cgit v1.2.3


From e390255de640827f3f4f1c39c7ebb443142e490f Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 4 Dec 2013 19:33:10 -0500
Subject: STORM-1992 'Open voice connection' and 'Expand participant list'
 buttons are overlapping each other in IM conversation after resizing.

---
 doc/contributions.txt                                     | 1 +
 indra/newview/skins/default/xui/en/floater_im_session.xml | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2f9d0c2c86..87493f27d7 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1992
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml
index 43d0f2fb18..7076de55e3 100755
--- a/indra/newview/skins/default/xui/en/floater_im_session.xml
+++ b/indra/newview/skins/default/xui/en/floater_im_session.xml
@@ -210,7 +210,7 @@
                      default_tab_group="3"
                      tab_group="2"
                      name="right_part_holder"
-                     min_width="172">
+                     min_width="230">
                         <layout_stack
                          animate="true" 
                          default_tab_group="2"
-- 
cgit v1.2.3


From 5b40445e663c2237ceeea83827505840cf41b165 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 4 Dec 2013 19:38:52 -0500
Subject: STORM-1993 In the About Land floater only send object return time to
 server when it has been changed

---
 doc/contributions.txt           |  1 +
 indra/newview/llfloaterland.cpp | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2f9d0c2c86..563f2e789c 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	STORM-1993
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 6c8e81e563..b16ef6dd79 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1791,10 +1791,15 @@ void LLPanelLandObjects::onCommitClean(LLUICtrl *caller, void* user_data)
 	LLParcel* parcel = lop->mParcel->getParcel();
 	if (parcel)
 	{
-		lop->mOtherTime = atoi(lop->mCleanOtherObjectsTime->getText().c_str());
+		S32 return_time = atoi(lop->mCleanOtherObjectsTime->getText().c_str());
+		// Only send return time if it has changed
+		if (return_time != lop->mOtherTime)
+		{
+			lop->mOtherTime = return_time;
 
-		parcel->setCleanOtherTime(lop->mOtherTime);
-		send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
+			parcel->setCleanOtherTime(lop->mOtherTime);
+			send_other_clean_time_message(parcel->getLocalID(), lop->mOtherTime);
+		}
 	}
 }
 
-- 
cgit v1.2.3


From 81d1d427f194c969031c334151df0dda231331b8 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 11 Dec 2013 10:41:28 -0500
Subject: OPEN-113 Build > Upload > Model > Calculate weights & fee is not
 disabled in OS built viewers

---
 doc/contributions.txt                   |  1 +
 indra/newview/llfloatermodelpreview.cpp | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/doc/contributions.txt b/doc/contributions.txt
index 2f9d0c2c86..ccc62f890e 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -674,6 +674,7 @@ Jonathan Yap
 	OPEN-161
 	STORM-1953
 	STORM-1957
+	OPEN-113
 Kadah Coba
 	STORM-1060
     STORM-1843
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 19cec55837..1699fb4e8d 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -535,9 +535,16 @@ BOOL LLFloaterModelPreview::postBuild()
 	mUploadBtn = getChild<LLButton>("ok_btn");
 	mCalculateBtn = getChild<LLButton>("calculate_btn");
 
-	mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
+	if (LLConvexDecomposition::isFunctional())
+	{
+		mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
 
-	toggleCalculateButton(true);
+		toggleCalculateButton(true);
+	}
+	else
+	{
+		mCalculateBtn->setEnabled(false);
+	}
 
 	return TRUE;
 }
-- 
cgit v1.2.3


From 97d9eee4ffc56123656abfe46db140bd1acca685 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Wed, 11 Dec 2013 14:29:52 -0500
Subject: OPEN-113 Use better way of testing for stub that will not impact
 TPVs.

---
 indra/newview/llfloatermodelpreview.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 1699fb4e8d..855836af7a 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -535,7 +535,7 @@ BOOL LLFloaterModelPreview::postBuild()
 	mUploadBtn = getChild<LLButton>("ok_btn");
 	mCalculateBtn = getChild<LLButton>("calculate_btn");
 
-	if (LLConvexDecomposition::isFunctional())
+	if (LLConvexDecomposition::getInstance() != NULL)
 	{
 		mCalculateBtn->setClickedCallback(boost::bind(&LLFloaterModelPreview::onClickCalculateBtn, this));
 
-- 
cgit v1.2.3


From 0e346960bb45900cf1d9472834687c9b7b928e1f Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Tue, 17 Dec 2013 13:05:12 -0500
Subject: add LLAgent::removeRegionChangedCallback

---
 indra/newview/llagent.cpp | 4 ++++
 indra/newview/llagent.h   | 1 +
 2 files changed, 5 insertions(+)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6ee8f26b9f..b1cd68140e 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -981,6 +981,10 @@ boost::signals2::connection LLAgent::addRegionChangedCallback(region_changed_cal
 	return mRegionChangedSignal.connect(cb);
 }
 
+void LLAgent::removeRegionChangedCallback(boost::signals2::connection callback)
+{
+	mRegionChangedSignal.disconnect(callback);
+}
 
 //-----------------------------------------------------------------------------
 // inPrelude()
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 0662be897a..bc003387de 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -273,6 +273,7 @@ private:
 	 */
 	typedef boost::function<void()> region_changed_callback_t;
 	boost::signals2::connection     addRegionChangedCallback(region_changed_callback_t);
+	void                            removeRegionChangedCallback(boost::signals2::connection callback);
 
   private:
 	LLViewerRegion	*mRegionp;
-- 
cgit v1.2.3


From 1886428638c2cb1e82db9f97ad311c2a506677a6 Mon Sep 17 00:00:00 2001
From: Ima Mechanique <ima.mechanique@secondlife.com>
Date: Wed, 18 Dec 2013 06:26:22 +0000
Subject: STORM-1831 Changing addRegionChangedCallback to more closely resemble
 the feature it replaces. This fixes the crashes reported by Whirly ;-)

---
 indra/newview/llagent.cpp | 2 +-
 indra/newview/llagent.h   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index b1cd68140e..14a2508697 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -976,7 +976,7 @@ LLHost LLAgent::getRegionHost() const
 	}
 }
 
-boost::signals2::connection LLAgent::addRegionChangedCallback(region_changed_callback_t cb)
+boost::signals2::connection LLAgent::addRegionChangedCallback(const region_changed_signal_t::slot_type& cb)
 {
 	return mRegionChangedSignal.connect(cb);
 }
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index bc003387de..0766407494 100755
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -271,13 +271,13 @@ private:
 	 *       // you may or may not want to remove that callback
 	 * 	 }
 	 */
-	typedef boost::function<void()> region_changed_callback_t;
-	boost::signals2::connection     addRegionChangedCallback(region_changed_callback_t);
+	typedef boost::signals2::signal<void()> region_changed_signal_t;
+
+	boost::signals2::connection     addRegionChangedCallback(const region_changed_signal_t::slot_type& cb);
 	void                            removeRegionChangedCallback(boost::signals2::connection callback);
 
   private:
 	LLViewerRegion	*mRegionp;
-	typedef boost::signals2::signal<void()> region_changed_signal_t;
 	region_changed_signal_t		            mRegionChangedSignal;
 
 	//--------------------------------------------------------------------
-- 
cgit v1.2.3


From 02afa9cfb050fbc23f5de89bd0adcdc0fb832dea Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Wed, 18 Dec 2013 13:39:18 -0500
Subject: STORM-1980: set new region restart sound uuid

---
 indra/newview/app_settings/settings.xml | 2 +-
 indra/newview/llvieweraudio.cpp         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index abe7b95266..b6b9f40db7 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -12641,7 +12641,7 @@
       <key>Type</key>
       <string>String</string>
       <key>Value</key>
-      <string>4b315701-1972-9e23-cdd8-23cbc8cb0f42</string>
+      <string>b92a0f64-7709-8811-40c5-16afd624a45f</string>
     </map>
     <key>UISndSnapshot</key>
     <map>
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 3da934b148..826d296117 100755
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -368,6 +368,7 @@ void init_audio()
 		gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndTyping")));
 		gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndWindowClose")));
 		gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndWindowOpen")));
+		gAudiop->preloadSound(LLUUID(gSavedSettings.getString("UISndRestart")));
 	}
 
 	audio_update_volume(true);
-- 
cgit v1.2.3


From e10c32b30aca20258c8356fdab33058d64781198 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 19 Dec 2013 12:10:26 -0500
Subject: clean up audio engine logging

---
 indra/llaudio/llaudiodecodemgr.cpp | 56 ++++++++++++-------------
 indra/llaudio/llaudioengine.cpp    | 84 ++++++++++++++++++++------------------
 2 files changed, 73 insertions(+), 67 deletions(-)

diff --git a/indra/llaudio/llaudiodecodemgr.cpp b/indra/llaudio/llaudiodecodemgr.cpp
index 6c97a64ed7..8c31f8b4de 100755
--- a/indra/llaudio/llaudiodecodemgr.cpp
+++ b/indra/llaudio/llaudiodecodemgr.cpp
@@ -135,7 +135,7 @@ int vfs_seek(void *datasource, ogg_int64_t offset, int whence)
 		origin = -1;
 		break;
 	default:
-		llerrs << "Invalid whence argument to vfs_seek" << llendl;
+		LL_ERRS("AudioEngine") << "Invalid whence argument to vfs_seek" << LL_ENDL;
 		return -1;
 	}
 
@@ -197,12 +197,12 @@ BOOL LLVorbisDecodeState::initDecode()
 	vfs_callbacks.close_func = vfs_close;
 	vfs_callbacks.tell_func = vfs_tell;
 
-	//llinfos << "Initing decode from vfile: " << mUUID << llendl;
+	LL_DEBUGS("AudioEngine") << "Initing decode from vfile: " << mUUID << LL_ENDL;
 
 	mInFilep = new LLVFile(gVFS, mUUID, LLAssetType::AT_SOUND);
 	if (!mInFilep || !mInFilep->getSize())
 	{
-		llwarns << "unable to open vorbis source vfile for reading" << llendl;
+		LL_WARNS("AudioEngine") << "unable to open vorbis source vfile for reading" << LL_ENDL;
 		delete mInFilep;
 		mInFilep = NULL;
 		return FALSE;
@@ -211,7 +211,7 @@ BOOL LLVorbisDecodeState::initDecode()
 	int r = ov_open_callbacks(mInFilep, &mVF, NULL, 0, vfs_callbacks);
 	if(r < 0) 
 	{
-		llwarns << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << llendl;
+		LL_WARNS("AudioEngine") << r << " Input to vorbis decode does not appear to be an Ogg bitstream: " << mUUID << LL_ENDL;
 		return(FALSE);
 	}
 	
@@ -229,36 +229,36 @@ BOOL LLVorbisDecodeState::initDecode()
 		if( vi->channels < 1 || vi->channels > LLVORBIS_CLIP_MAX_CHANNELS )
 		{
 			abort_decode = true;
-			llwarns << "Bad channel count: " << vi->channels << llendl;
+			LL_WARNS("AudioEngine") << "Bad channel count: " << vi->channels << LL_ENDL;
 		}
 	}
 	else // !vi
 	{
 		abort_decode = true;
-		llwarns << "No default bitstream found" << llendl;	
+		LL_WARNS("AudioEngine") << "No default bitstream found" << LL_ENDL;	
 	}
 	
 	if( (size_t)sample_count > LLVORBIS_CLIP_REJECT_SAMPLES ||
 	    (size_t)sample_count <= 0)
 	{
 		abort_decode = true;
-		llwarns << "Illegal sample count: " << sample_count << llendl;
+		LL_WARNS("AudioEngine") << "Illegal sample count: " << sample_count << LL_ENDL;
 	}
 	
 	if( size_guess > LLVORBIS_CLIP_REJECT_SIZE ||
 	    size_guess < 0)
 	{
 		abort_decode = true;
-		llwarns << "Illegal sample size: " << size_guess << llendl;
+		LL_WARNS("AudioEngine") << "Illegal sample size: " << size_guess << LL_ENDL;
 	}
 	
 	if( abort_decode )
 	{
-		llwarns << "Canceling initDecode. Bad asset: " << mUUID << llendl;
+		LL_WARNS("AudioEngine") << "Canceling initDecode. Bad asset: " << mUUID << LL_ENDL;
 		vorbis_comment* comment = ov_comment(&mVF,-1);
 		if (comment && comment->vendor)
 		{
-			llwarns << "Bad asset encoded by: " << comment->vendor << llendl;
+			LL_WARNS("AudioEngine") << "Bad asset encoded by: " << comment->vendor << LL_ENDL;
 		}
 		delete mInFilep;
 		mInFilep = NULL;
@@ -359,12 +359,12 @@ BOOL LLVorbisDecodeState::decodeSection()
 {
 	if (!mInFilep)
 	{
-		llwarns << "No VFS file to decode in vorbis!" << llendl;
+		LL_WARNS("AudioEngine") << "No VFS file to decode in vorbis!" << LL_ENDL;
 		return TRUE;
 	}
 	if (mDone)
 	{
-// 		llwarns << "Already done with decode, aborting!" << llendl;
+// 		LL_WARNS("AudioEngine") << "Already done with decode, aborting!" << LL_ENDL;
 		return TRUE;
 	}
 	char pcmout[4096];	/*Flawfinder: ignore*/
@@ -377,14 +377,14 @@ BOOL LLVorbisDecodeState::decodeSection()
 		eof = TRUE;
 		mDone = TRUE;
 		mValid = TRUE;
-//			llinfos << "Vorbis EOF" << llendl;
+//			LL_INFOS("AudioEngine") << "Vorbis EOF" << LL_ENDL;
 	}
 	else if (ret < 0)
 	{
 		/* error in the stream.  Not a problem, just reporting it in
 		   case we (the app) cares.  In this case, we don't. */
 
-		llwarns << "BAD vorbis decode in decodeSection." << llendl;
+		LL_WARNS("AudioEngine") << "BAD vorbis decode in decodeSection." << LL_ENDL;
 
 		mValid = FALSE;
 		mDone = TRUE;
@@ -393,7 +393,7 @@ BOOL LLVorbisDecodeState::decodeSection()
 	}
 	else
 	{
-//			llinfos << "Vorbis read " << ret << "bytes" << llendl;
+//			LL_INFOS("AudioEngine") << "Vorbis read " << ret << "bytes" << LL_ENDL;
 		/* we don't bother dealing with sample rate changes, etc, but.
 		   you'll have to*/
 		std::copy(pcmout, pcmout+ret, std::back_inserter(mWAVBuffer));
@@ -405,7 +405,7 @@ BOOL LLVorbisDecodeState::finishDecode()
 {
 	if (!isValid())
 	{
-		llwarns << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << llendl;
+		LL_WARNS("AudioEngine") << "Bogus vorbis decode state for " << getUUID() << ", aborting!" << LL_ENDL;
 		return TRUE; // We've finished
 	}
 
@@ -480,7 +480,7 @@ BOOL LLVorbisDecodeState::finishDecode()
 
 		if (36 == data_length)
 		{
-			llwarns << "BAD Vorbis decode in finishDecode!" << llendl;
+			LL_WARNS("AudioEngine") << "BAD Vorbis decode in finishDecode!" << LL_ENDL;
 			mValid = FALSE;
 			return TRUE; // we've finished
 		}
@@ -497,7 +497,7 @@ BOOL LLVorbisDecodeState::finishDecode()
 		{
 			if (mBytesRead == 0)
 			{
-				llwarns << "Unable to write file in LLVorbisDecodeState::finishDecode" << llendl;
+				LL_WARNS("AudioEngine") << "Unable to write file in LLVorbisDecodeState::finishDecode" << LL_ENDL;
 				mValid = FALSE;
 				return TRUE; // we've finished
 			}
@@ -515,7 +515,7 @@ BOOL LLVorbisDecodeState::finishDecode()
 	LLVFile output(gVFS, mUUID, LLAssetType::AT_SOUND_WAV);
 	output.write(&mWAVBuffer[0], mWAVBuffer.size());
 #endif
-	//llinfos << "Finished decode for " << getUUID() << llendl;
+	LL_DEBUGS("AudioEngine") << "Finished decode for " << getUUID() << LL_ENDL;
 
 	return TRUE;
 }
@@ -524,7 +524,7 @@ void LLVorbisDecodeState::flushBadFile()
 {
 	if (mInFilep)
 	{
-		llwarns << "Flushing bad vorbis file from VFS for " << mUUID << llendl;
+		LL_WARNS("AudioEngine") << "Flushing bad vorbis file from VFS for " << mUUID << LL_ENDL;
 		mInFilep->remove();
 	}
 }
@@ -568,7 +568,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
 			if (mCurrentDecodep->isDone() && !mCurrentDecodep->isValid())
 			{
 				// We had an error when decoding, abort.
-				llwarns << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << llendl;
+				LL_WARNS("AudioEngine") << mCurrentDecodep->getUUID() << " has invalid vorbis data, aborting decode" << LL_ENDL;
 				mCurrentDecodep->flushBadFile();
 				LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
 				adp->setHasValidData(false);
@@ -590,7 +590,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
 					LLAudioData *adp = gAudiop->getAudioData(mCurrentDecodep->getUUID());
 					if (!adp)
 					{
-						llwarns << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << llendl;
+						LL_WARNS("AudioEngine") << "Missing LLAudioData for decode of " << mCurrentDecodep->getUUID() << LL_ENDL;
 					}
 					else if (mCurrentDecodep->isValid() && mCurrentDecodep->isDone())
 					{
@@ -601,12 +601,12 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
 						// At this point, we could see if anyone needs this sound immediately, but
 						// I'm not sure that there's a reason to - we need to poll all of the playing
 						// sounds anyway.
-						//llinfos << "Finished the vorbis decode, now what?" << llendl;
+						//LL_INFOS("AudioEngine") << "Finished the vorbis decode, now what?" << LL_ENDL;
 					}
 					else
 					{
 						adp->setHasCompletedDecode(true);
-						llinfos << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << llendl;
+						LL_INFOS("AudioEngine") << "Vorbis decode failed for " << mCurrentDecodep->getUUID() << LL_ENDL;
 					}
 					mCurrentDecodep = NULL;
 				}
@@ -631,7 +631,7 @@ void LLAudioDecodeMgr::Impl::processQueue(const F32 num_secs)
 					continue;
 				}
 
-				lldebugs << "Decoding " << uuid << " from audio queue!" << llendl;
+				lldebugs << "Decoding " << uuid << " from audio queue!" << LL_ENDL;
 
 				std::string uuid_str;
 				std::string d_path;
@@ -674,19 +674,19 @@ BOOL LLAudioDecodeMgr::addDecodeRequest(const LLUUID &uuid)
 	if (gAudiop->hasDecodedFile(uuid))
 	{
 		// Already have a decoded version, don't need to decode it.
-		//llinfos << "addDecodeRequest for " << uuid << " has decoded file already" << llendl;
+		LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has decoded file already" << LL_ENDL;
 		return TRUE;
 	}
 
 	if (gAssetStorage->hasLocalAsset(uuid, LLAssetType::AT_SOUND))
 	{
 		// Just put it on the decode queue.
-		//llinfos << "addDecodeRequest for " << uuid << " has local asset file already" << llendl;
+		LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " has local asset file already" << LL_ENDL;
 		mImpl->mDecodeQueue.push(uuid);
 		return TRUE;
 	}
 
-	//llinfos << "addDecodeRequest for " << uuid << " no file available" << llendl;
+	LL_DEBUGS("AudioEngine") << "addDecodeRequest for " << uuid << " no file available" << LL_ENDL;
 	return FALSE;
 }
 
diff --git a/indra/llaudio/llaudioengine.cpp b/indra/llaudio/llaudioengine.cpp
index 06e752cf34..ca614f5395 100755
--- a/indra/llaudio/llaudioengine.cpp
+++ b/indra/llaudio/llaudioengine.cpp
@@ -123,7 +123,7 @@ bool LLAudioEngine::init(const S32 num_channels, void* userdata)
 	// Initialize the decode manager
 	gAudioDecodeMgrp = new LLAudioDecodeMgr;
 
-	llinfos << "LLAudioEngine::init() AudioEngine successfully initialized" << llendl;
+	LL_INFOS("AudioEngine") << "LLAudioEngine::init() AudioEngine successfully initialized" << LL_ENDL;
 
 	return true;
 }
@@ -308,7 +308,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
 		LLAudioChannel *channelp = getFreeChannel(max_priority);
 		if (channelp)
 		{
-			//llinfos << "Replacing source in channel due to priority!" << llendl;
+			LL_DEBUGS("AudioEngine") << "Replacing source in channel due to priority!" << LL_ENDL;
 			max_sourcep->setChannel(channelp);
 			channelp->setSource(max_sourcep);
 			if (max_sourcep->isSyncSlave())
@@ -479,7 +479,7 @@ void LLAudioEngine::idle(F32 max_decode_time)
 		{
 			if (!mBuffers[i]->mInUse && mBuffers[i]->mLastUseTimer.getElapsedTimeF32() > 30.f)
 			{
-				//llinfos << "Flushing unused buffer!" << llendl;
+				LL_DEBUGS("AudioEngine") << "Flushing unused buffer!" << LL_ENDL;
 				mBuffers[i]->mAudioDatap->mBufferp = NULL;
 				delete mBuffers[i];
 				mBuffers[i] = NULL;
@@ -591,8 +591,8 @@ LLAudioBuffer * LLAudioEngine::getFreeBuffer()
 
 	if (buffer_id >= 0)
 	{
-		lldebugs << "Taking over unused buffer " << buffer_id << llendl;
-		//llinfos << "Flushing unused buffer!" << llendl;
+		lldebugs << "Taking over unused buffer " << buffer_id << LL_ENDL;
+		LL_DEBUGS("AudioEngine") << "Flushing unused buffer!" << LL_ENDL;
 		mBuffers[buffer_id]->mAudioDatap->mBufferp = NULL;
 		delete mBuffers[buffer_id];
 		mBuffers[buffer_id] = createBuffer();
@@ -673,6 +673,8 @@ void LLAudioEngine::cleanupBuffer(LLAudioBuffer *bufferp)
 
 bool LLAudioEngine::preloadSound(const LLUUID &uuid)
 {
+	LL_DEBUGS("AudioEngine")<<"( "<<uuid<<" )"<<LL_ENDL;
+	
 	gAudiop->getAudioData(uuid);	// We don't care about the return value, this is just to make sure
 									// that we have an entry, which will mean that the audio engine knows about this
 
@@ -684,7 +686,7 @@ bool LLAudioEngine::preloadSound(const LLUUID &uuid)
 
 	// At some point we need to have the audio/asset system check the static VFS
 	// before it goes off and fetches stuff from the server.
-	//llwarns << "Used internal preload for non-local sound" << llendl;
+	LL_DEBUGS("AudioEngine") << "Used internal preload for non-local sound "<< uuid << LL_ENDL;
 	return false;
 }
 
@@ -815,7 +817,7 @@ void LLAudioEngine::triggerSound(const LLUUID &audio_uuid, const LLUUID& owner_i
 								 const S32 type, const LLVector3d &pos_global)
 {
 	// Create a new source (since this can't be associated with an existing source.
-	//llinfos << "Localized: " << audio_uuid << llendl;
+	LL_DEBUGS("AudioEngine") << "Localized: " << audio_uuid << LL_ENDL;
 
 	if (mMuted)
 	{
@@ -982,11 +984,14 @@ void LLAudioEngine::cleanupAudioSource(LLAudioSource *asp)
 	iter = mAllSources.find(asp->getID());
 	if (iter == mAllSources.end())
 	{
-		llwarns << "Cleaning up unknown audio source!" << llendl;
-		return;
+		LL_WARNS("AudioEngine") << "Cleaning up unknown audio source!" << LL_ENDL;
+	}
+	else
+	{
+		LL_DEBUGS("AudioEngine") << "Cleaning up audio sources for "<< asp->getID() <<LL_ENDL;
+		delete asp;
+		mAllSources.erase(iter);
 	}
-	delete asp;
-	mAllSources.erase(iter);
 }
 
 
@@ -1013,16 +1018,18 @@ bool LLAudioEngine::hasDecodedFile(const LLUUID &uuid)
 bool LLAudioEngine::hasLocalFile(const LLUUID &uuid)
 {
 	// See if it's in the VFS.
-	return gVFS->getExists(uuid, LLAssetType::AT_SOUND);
+	bool have_local = gVFS->getExists(uuid, LLAssetType::AT_SOUND);
+	LL_DEBUGS("AudioEngine") << "sound uuid "<<uuid<<" exists in VFS"<<LL_ENDL;
+	return have_local;
 }
 
 
 void LLAudioEngine::startNextTransfer()
 {
-	//llinfos << "LLAudioEngine::startNextTransfer()" << llendl;
+	//LL_DEBUGS("AudioEngine") << "LLAudioEngine::startNextTransfer()" << LL_ENDL;
 	if (mCurrentTransfer.notNull() || getMuted())
 	{
-		//llinfos << "Transfer in progress, aborting" << llendl;
+		//LL_DEBUGS("AudioEngine") << "Transfer in progress, aborting" << LL_ENDL;
 		return;
 	}
 
@@ -1203,7 +1210,7 @@ void LLAudioEngine::startNextTransfer()
 
 	if (asset_id.notNull())
 	{
-		llinfos << "Getting asset data for: " << asset_id << llendl;
+		LL_INFOS("AudioEngine") << "Getting audio asset data for: " << asset_id << LL_ENDL;
 		gAudiop->mCurrentTransfer = asset_id;
 		gAudiop->mCurrentTransferTimer.reset();
 		gAssetStorage->getAssetData(asset_id, LLAssetType::AT_SOUND,
@@ -1211,7 +1218,7 @@ void LLAudioEngine::startNextTransfer()
 	}
 	else
 	{
-		//llinfos << "No pending transfers?" << llendl;
+		//LL_DEBUGS("AudioEngine") << "No pending transfers?" << LL_ENDL;
 	}
 }
 
@@ -1221,7 +1228,7 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
 {
 	if (result_code)
 	{
-		llinfos << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << llendl;
+		LL_INFOS("AudioEngine") << "Boom, error in audio file transfer: " << LLAssetStorage::getErrorString( result_code ) << " (" << result_code << ")" << LL_ENDL;
 		// Need to mark data as bad to avoid constant rerequests.
 		LLAudioData *adp = gAudiop->getAudioData(uuid);
 		if (adp)
@@ -1238,11 +1245,11 @@ void LLAudioEngine::assetCallback(LLVFS *vfs, const LLUUID &uuid, LLAssetType::E
 		if (!adp)
         {
 			// Should never happen
-			llwarns << "Got asset callback without audio data for " << uuid << llendl;
+			LL_WARNS("AudioEngine") << "Got asset callback without audio data for " << uuid << LL_ENDL;
         }
 		else
 		{
-			// llinfos << "Got asset callback with good audio data for " << uuid << ", making decode request" << llendl;
+			LL_DEBUGS("AudioEngine") << "Got asset callback with good audio data for " << uuid << ", making decode request" << LL_ENDL;
 			adp->setHasValidData(true);
 		    adp->setHasLocalData(true);
 		    gAudioDecodeMgrp->addDecodeRequest(uuid);
@@ -1321,7 +1328,7 @@ void LLAudioSource::update()
 			}
 			else if (adp->hasCompletedDecode())		// Only mark corrupted after decode is done
 			{
-				llwarns << "Marking LLAudioSource corrupted for " << adp->getID() << llendl;
+				LL_WARNS("AudioEngine") << "Marking LLAudioSource corrupted for " << adp->getID() << LL_ENDL;
 				mCorrupted = true ;
 			}
 		}
@@ -1357,7 +1364,6 @@ bool LLAudioSource::setupChannel()
 	if (!adp->getBuffer())
 	{
 		// We're not ready to play back the sound yet, so don't try and allocate a channel for it.
-		//llwarns << "Aborting, no buffer" << llendl;
 		return false;
 	}
 
@@ -1375,7 +1381,7 @@ bool LLAudioSource::setupChannel()
 		// Ugh, we don't have any free channels.
 		// Now we have to reprioritize.
 		// For now, just don't play the sound.
-		//llwarns << "Aborting, no free channels" << llendl;
+		//llwarns << "Aborting, no free channels" << LL_ENDL;
 		return false;
 	}
 
@@ -1474,7 +1480,7 @@ bool LLAudioSource::isDone() const
 		{
 			// We don't have a channel assigned, and it's been
 			// over 15 seconds since we tried to play it.  Don't bother.
-			//llinfos << "No channel assigned, source is done" << llendl;
+			LL_DEBUGS("AudioEngine") << "No channel assigned, source is done" << LL_ENDL;
 			return true;
 		}
 		else
@@ -1640,7 +1646,7 @@ LLAudioChannel::LLAudioChannel() :
 LLAudioChannel::~LLAudioChannel()
 {
 	// Need to disconnect any sources which are using this channel.
-	//llinfos << "Cleaning up audio channel" << llendl;
+	LL_DEBUGS("AudioEngine") << "Cleaning up audio channel" << LL_ENDL;
 	if (mCurrentSourcep)
 	{
 		mCurrentSourcep->setChannel(NULL);
@@ -1651,29 +1657,29 @@ LLAudioChannel::~LLAudioChannel()
 
 void LLAudioChannel::setSource(LLAudioSource *sourcep)
 {
-	//llinfos << this << ": setSource(" << sourcep << ")" << llendl;
-
 	if (!sourcep)
 	{
 		// Clearing the source for this channel, don't need to do anything.
-		//llinfos << "Clearing source for channel" << llendl;
+		LL_DEBUGS("AudioEngine") << "Clearing source" << ( mCurrentSourcep ? mCurrentSourcep->getID() : LLUUID::null ) << LL_ENDL;
 		cleanup();
 		mCurrentSourcep = NULL;
 		mWaiting = false;
-		return;
 	}
-
-	if (sourcep == mCurrentSourcep)
+	else
 	{
-		// Don't reallocate the channel, this will make FMOD goofy.
-		//llinfos << "Calling setSource with same source!" << llendl;
-	}
-
-	mCurrentSourcep = sourcep;
+		LL_DEBUGS("AudioEngine") << "( id: " << sourcep->getID() << ")" << LL_ENDL;
 
+		if (sourcep == mCurrentSourcep)
+		{
+			// Don't reallocate the channel, this will make FMOD goofy.
+			//LL_DEBUGS("AudioEngine") << "Calling setSource with same source!" << LL_ENDL;
+		}
 
-	updateBuffer();
-	update3DPosition();
+		mCurrentSourcep = sourcep;
+		
+		updateBuffer();
+		update3DPosition();
+	}
 }
 
 
@@ -1768,7 +1774,7 @@ bool LLAudioData::load()
 	if (mBufferp)
 	{
 		// We already have this sound in a buffer, don't do anything.
-		llinfos << "Already have a buffer for this sound, don't bother loading!" << llendl;
+		LL_INFOS("AudioEngine") << "Already have a buffer for this sound, don't bother loading!" << LL_ENDL;
 		return true;
 	}
 	
@@ -1776,7 +1782,7 @@ bool LLAudioData::load()
 	if (!mBufferp)
 	{
 		// No free buffers, abort.
-		llinfos << "Not able to allocate a new audio buffer, aborting." << llendl;
+		LL_INFOS("AudioEngine") << "Not able to allocate a new audio buffer, aborting." << LL_ENDL;
 		return true;
 	}
 
-- 
cgit v1.2.3


From 5f635f7942130ab25f74f5c6aaeb5b135d0cb43e Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Thu, 2 Jan 2014 13:40:16 -0500
Subject: STORM-1980 Remove callback in destructor. Shrink floater and add a
 "!" icon in the top left corner.

---
 indra/newview/llfloaterregionrestarting.cpp        |  3 +-
 indra/newview/llfloaterregionrestarting.h          |  2 ++
 .../default/xui/en/floater_region_restarting.xml   | 36 ++++++++++++++--------
 3 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index 899216b966..003ed488c6 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -44,6 +44,7 @@ LLFloaterRegionRestarting::LLFloaterRegionRestarting(const LLSD& key) :
 
 LLFloaterRegionRestarting::~LLFloaterRegionRestarting()
 {
+	mRegionChangedConnection.disconnect();
 }
 
 BOOL LLFloaterRegionRestarting::postBuild()
@@ -58,7 +59,7 @@ BOOL LLFloaterRegionRestarting::postBuild()
 
 	refresh();
 
-	gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
+	mRegionChangedConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
 
 	return TRUE;
 }
diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h
index fef0dcddfe..6ff067e0a8 100644
--- a/indra/newview/llfloaterregionrestarting.h
+++ b/indra/newview/llfloaterregionrestarting.h
@@ -48,6 +48,8 @@ private:
 	virtual void regionChange();
 
 	std::string mName;
+
+	boost::signals2::connection mRegionChangedConnection;
 };
 
 #endif // LL_LLFLOATERREGIONRESTARTING_H
diff --git a/indra/newview/skins/default/xui/en/floater_region_restarting.xml b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
index dcb5fcc41d..2fe4d0190a 100644
--- a/indra/newview/skins/default/xui/en/floater_region_restarting.xml
+++ b/indra/newview/skins/default/xui/en/floater_region_restarting.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <floater
- height="245"
- width="500"
+ height="150"
+ width="290"
  layout="topleft"
  name="region_restarting"
  help_topic="floater_region_restarting"
@@ -17,16 +17,27 @@ If you stay in this region you will be logged out.
      Seconds until restart
 [SECONDS]
     </string>
-     <panel
+    <panel
      name="layout_panel_1"
-     height="245"
-     width="500"
+     height="150"
+     width="290"
      follows="right|top"
      top="0"
      left="0"
      background_visible="true"
      bg_opaque_color="Orange"
      bg_alpha_color="Orange">
+
+    <icon color="1.0 1.0 1.0 1.0"
+     tab_stop="false"
+     mouse_opaque="false"
+     name="icon"
+     width="32"
+     height="32"
+     image_name="notify_caution_icon.tga"
+     follows="left|top">
+    </icon>
+
     <text
      type="string"
      length="1"
@@ -34,12 +45,12 @@ If you stay in this region you will be logged out.
      layout="topleft"
      name="region_name"
      text_color="Black"
-     font="SansSerifLarge"
+     font="SansSerifBold"
      word_wrap="true"
      height="100"
-     top="30"
-     left="10"
-     width="480">
+     top="5"
+     left="40"
+     width="230">
     The region you are in now (-The longest region name-) is about to restart.
 
 If you stay in this region you will be logged out.
@@ -51,11 +62,12 @@ If you stay in this region you will be logged out.
      layout="topleft"
      name="restart_seconds"
      text_color="Black"
-     font="SansSerifHuge"
-     height="100"
+     font="SansSerifLargeBold"
+     height="40"
+     top="110"
      left="0"
      halign="center"
-     width="500">
+     width="290">
      Seconds until restart
      32767
     </text>
-- 
cgit v1.2.3


From 4e4cf8b528701275d2c095c1b10c6cd27cead62e Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 2 Jan 2014 18:09:29 -0500
Subject: increment version to 3.7.0

---
 indra/newview/VIEWER_VERSION.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 3609cf7707..7c69a55dbb 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.6.13
+3.7.0
-- 
cgit v1.2.3


From d15cc2dadc34c757d1ac6aef66d5baa38fb80968 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Fri, 3 Jan 2014 13:31:51 -0500
Subject: STORM-1980 Add shake effect

---
 indra/newview/llfloaterregionrestarting.cpp | 83 +++++++++++++++++++++++++----
 indra/newview/llfloaterregionrestarting.h   | 13 +++++
 indra/newview/llviewermessage.cpp           |  7 ++-
 3 files changed, 90 insertions(+), 13 deletions(-)

diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index 003ed488c6..111daf93eb 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -31,15 +31,18 @@
 #include "llfloaterreg.h"
 #include "lluictrl.h"
 #include "llagent.h"
+#include "llagentcamera.h"
+#include "llviewerwindow.h"
 
-static S32 mSeconds;
+static S32 sSeconds;
+static U32 sShakeState;
 
 LLFloaterRegionRestarting::LLFloaterRegionRestarting(const LLSD& key) :
 	LLFloater(key),
 	LLEventTimer(1)
 {
 	mName = (std::string)key["NAME"];
-	mSeconds = (LLSD::Integer)key["SECONDS"];
+	sSeconds = (LLSD::Integer)key["SECONDS"];
 }
 
 LLFloaterRegionRestarting::~LLFloaterRegionRestarting()
@@ -49,6 +52,8 @@ LLFloaterRegionRestarting::~LLFloaterRegionRestarting()
 
 BOOL LLFloaterRegionRestarting::postBuild()
 {
+	mRegionChangedConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
+
 	LLStringUtil::format_map_t args;
 	std::string text;
 
@@ -57,9 +62,9 @@ BOOL LLFloaterRegionRestarting::postBuild()
 	LLTextBox* textbox = getChild<LLTextBox>("region_name");
 	textbox->setValue(text);
 
-	refresh();
+	sShakeState = SHAKE_START;
 
-	mRegionChangedConnection = gAgent.addRegionChangedCallback(boost::bind(&LLFloaterRegionRestarting::regionChange, this));
+	refresh();
 
 	return TRUE;
 }
@@ -81,13 +86,72 @@ void LLFloaterRegionRestarting::refresh()
 	LLStringUtil::format_map_t args;
 	std::string text;
 
-	args["[SECONDS]"] = llformat("%d", mSeconds);
+	args["[SECONDS]"] = llformat("%d", sSeconds);
 	getChild<LLTextBox>("restart_seconds")->setValue(getString("RestartSeconds", args));
 
-	mSeconds = mSeconds - 1;
-	if(mSeconds < 0.0)
+	sSeconds = sSeconds - 1;
+	if(sSeconds < 0.0)
+	{
+		sSeconds = 0;
+	}
+}
+
+void LLFloaterRegionRestarting::draw()
+{
+	LLFloater::draw();
+
+	const F32 SHAKE_INTERVAL = 0.05;
+	const U32 SHAKE_ITERATIONS = 4;
+
+	if(SHAKE_START == sShakeState)
+	{
+			mShakeTimer.setTimerExpirySec(SHAKE_INTERVAL);
+			sShakeState = SHAKE_LEFT;
+			mIterations = 0;
+	}
+
+	if(SHAKE_DONE != sShakeState && mShakeTimer.hasExpired())
 	{
-		mSeconds = 0;
+		gAgentCamera.unlockView();
+
+		switch(sShakeState)
+		{
+			case SHAKE_LEFT:
+				gAgentCamera.setPanLeftKey(1.0);
+				gAgentCamera.setPanLeftKey(1.0);
+				sShakeState = SHAKE_UP;
+				break;
+
+			case SHAKE_UP:
+				gAgentCamera.setPanUpKey(1.0);
+				gAgentCamera.setPanUpKey(1.0);
+				sShakeState = SHAKE_RIGHT;
+				break;
+
+			case SHAKE_RIGHT:
+				gAgentCamera.setPanRightKey(1.0);
+				gAgentCamera.setPanRightKey(1.0);
+				sShakeState = SHAKE_DOWN;
+				break;
+
+			case SHAKE_DOWN:
+				gAgentCamera.setPanDownKey(1.0);
+				gAgentCamera.setPanDownKey(1.0);
+				mIterations = mIterations + 1;
+				if(SHAKE_ITERATIONS == mIterations)
+				{
+					sShakeState = SHAKE_DONE;
+				}
+				else
+				{
+					sShakeState = SHAKE_LEFT;
+				}
+				break;
+
+			default:
+				break;
+		}
+		mShakeTimer.setTimerExpirySec(SHAKE_INTERVAL);
 	}
 }
 
@@ -103,5 +167,6 @@ void LLFloaterRegionRestarting::close()
 
 void LLFloaterRegionRestarting::updateTime(S32 time)
 {
-	mSeconds = time;
+	sSeconds = time;
+	sShakeState = SHAKE_START;
 }
diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h
index 6ff067e0a8..95fe772a28 100644
--- a/indra/newview/llfloaterregionrestarting.h
+++ b/indra/newview/llfloaterregionrestarting.h
@@ -45,11 +45,24 @@ private:
 	virtual BOOL postBuild();
 	virtual BOOL tick();
 	virtual void refresh();
+	virtual void draw();
 	virtual void regionChange();
 
 	std::string mName;
+	U32 mIterations;
+	LLTimer mShakeTimer;
 
 	boost::signals2::connection mRegionChangedConnection;
+
+	enum
+	{
+		SHAKE_START,
+		SHAKE_LEFT,
+		SHAKE_UP,
+		SHAKE_RIGHT,
+		SHAKE_DOWN,
+		SHAKE_DONE
+	};
 };
 
 #endif // LL_LLFLOATERREGIONRESTARTING_H
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index e81de844d1..076419e96a 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5967,10 +5967,6 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 				seconds = static_cast<S32>(llsdBlock["SECONDS"].asInteger());
 			}
 
-			LLSD params;
-			params["NAME"] = llsdBlock["NAME"];
-			params["SECONDS"] = (LLSD::Integer)seconds;
-
 			LLFloaterRegionRestarting* floaterp = LLFloaterReg::findTypedInstance<LLFloaterRegionRestarting>("region_restarting");
 
 			if (floaterp)
@@ -5979,6 +5975,9 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 			}
 			else
 			{
+				LLSD params;
+				params["NAME"] = llsdBlock["NAME"];
+				params["SECONDS"] = (LLSD::Integer)seconds;
 				LLFloaterReg::showInstance("region_restarting", params);
 			}
 
-- 
cgit v1.2.3


From 6051a865578f08e65e058478a6cc7fedb5aefb7b Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Fri, 3 Jan 2014 14:08:55 -0500
Subject: STORM-1980 Small optimization and tweaks of shaking constants

---
 indra/newview/llfloaterregionrestarting.cpp | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index 111daf93eb..b793d259cd 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -100,8 +100,9 @@ void LLFloaterRegionRestarting::draw()
 {
 	LLFloater::draw();
 
-	const F32 SHAKE_INTERVAL = 0.05;
+	const F32 SHAKE_INTERVAL = 0.03;
 	const U32 SHAKE_ITERATIONS = 4;
+	const F32 SHAKE_AMOUNT = 1.5;
 
 	if(SHAKE_START == sShakeState)
 	{
@@ -117,26 +118,22 @@ void LLFloaterRegionRestarting::draw()
 		switch(sShakeState)
 		{
 			case SHAKE_LEFT:
-				gAgentCamera.setPanLeftKey(1.0);
-				gAgentCamera.setPanLeftKey(1.0);
+				gAgentCamera.setPanLeftKey(SHAKE_AMOUNT);
 				sShakeState = SHAKE_UP;
 				break;
 
 			case SHAKE_UP:
-				gAgentCamera.setPanUpKey(1.0);
-				gAgentCamera.setPanUpKey(1.0);
+				gAgentCamera.setPanUpKey(SHAKE_AMOUNT);
 				sShakeState = SHAKE_RIGHT;
 				break;
 
 			case SHAKE_RIGHT:
-				gAgentCamera.setPanRightKey(1.0);
-				gAgentCamera.setPanRightKey(1.0);
+				gAgentCamera.setPanRightKey(SHAKE_AMOUNT);
 				sShakeState = SHAKE_DOWN;
 				break;
 
 			case SHAKE_DOWN:
-				gAgentCamera.setPanDownKey(1.0);
-				gAgentCamera.setPanDownKey(1.0);
+				gAgentCamera.setPanDownKey(SHAKE_AMOUNT);
 				mIterations = mIterations + 1;
 				if(SHAKE_ITERATIONS == mIterations)
 				{
-- 
cgit v1.2.3


From 05a313f546c4f943a74ec2214cabf4df747eda5a Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Fri, 3 Jan 2014 18:19:25 -0500
Subject: change shaking to decay exponentially

---
 indra/newview/llfloaterregionrestarting.cpp | 28 +++++++++++++++++-----------
 indra/newview/llfloaterregionrestarting.h   |  3 ++-
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index b793d259cd..94c805205a 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -100,15 +100,17 @@ void LLFloaterRegionRestarting::draw()
 {
 	LLFloater::draw();
 
-	const F32 SHAKE_INTERVAL = 0.03;
-	const U32 SHAKE_ITERATIONS = 4;
-	const F32 SHAKE_AMOUNT = 1.5;
-
+	const F32 SHAKE_INTERVAL = 0.04;
+	const F32 SHAKE_TOTAL_DURATION = 1.8; // the length of the default alert tone for this
+	const F32 SHAKE_INITIAL_MAGNITUDE = 1.5;
+	F32 time_shaking;
+	
 	if(SHAKE_START == sShakeState)
 	{
 			mShakeTimer.setTimerExpirySec(SHAKE_INTERVAL);
 			sShakeState = SHAKE_LEFT;
-			mIterations = 0;
+			mShakeIterations = 0;
+			mShakeMagnitude = SHAKE_INITIAL_MAGNITUDE;
 	}
 
 	if(SHAKE_DONE != sShakeState && mShakeTimer.hasExpired())
@@ -118,30 +120,34 @@ void LLFloaterRegionRestarting::draw()
 		switch(sShakeState)
 		{
 			case SHAKE_LEFT:
-				gAgentCamera.setPanLeftKey(SHAKE_AMOUNT);
+				gAgentCamera.setPanLeftKey(mShakeMagnitude);
 				sShakeState = SHAKE_UP;
 				break;
 
 			case SHAKE_UP:
-				gAgentCamera.setPanUpKey(SHAKE_AMOUNT);
+				gAgentCamera.setPanUpKey(mShakeMagnitude);
 				sShakeState = SHAKE_RIGHT;
 				break;
 
 			case SHAKE_RIGHT:
-				gAgentCamera.setPanRightKey(SHAKE_AMOUNT);
+				gAgentCamera.setPanRightKey(mShakeMagnitude);
 				sShakeState = SHAKE_DOWN;
 				break;
 
 			case SHAKE_DOWN:
-				gAgentCamera.setPanDownKey(SHAKE_AMOUNT);
-				mIterations = mIterations + 1;
-				if(SHAKE_ITERATIONS == mIterations)
+				gAgentCamera.setPanDownKey(mShakeMagnitude);
+				mShakeIterations++;
+				time_shaking = SHAKE_INTERVAL * (mShakeIterations * 4 /* left, up, right, down */);
+				if(SHAKE_TOTAL_DURATION <= time_shaking)
 				{
 					sShakeState = SHAKE_DONE;
+					mShakeMagnitude = 0.0;
 				}
 				else
 				{
 					sShakeState = SHAKE_LEFT;
+					F32 percent_done_shaking = (SHAKE_TOTAL_DURATION - time_shaking) / SHAKE_TOTAL_DURATION;
+					mShakeMagnitude = SHAKE_INITIAL_MAGNITUDE * (percent_done_shaking * percent_done_shaking); // exponential decay
 				}
 				break;
 
diff --git a/indra/newview/llfloaterregionrestarting.h b/indra/newview/llfloaterregionrestarting.h
index 95fe772a28..46416db2c8 100644
--- a/indra/newview/llfloaterregionrestarting.h
+++ b/indra/newview/llfloaterregionrestarting.h
@@ -49,7 +49,8 @@ private:
 	virtual void regionChange();
 
 	std::string mName;
-	U32 mIterations;
+	U32 mShakeIterations;
+	F32 mShakeMagnitude;
 	LLTimer mShakeTimer;
 
 	boost::signals2::connection mRegionChangedConnection;
-- 
cgit v1.2.3


From 24c5ac7417f8b32c39dd5defec21845bd03786c4 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Sat, 4 Jan 2014 10:40:20 -0500
Subject: STORM-1980 Center floater on screen.  Tweak shaking parameters.

---
 indra/newview/llfloaterregionrestarting.cpp | 7 ++++---
 indra/newview/llviewermessage.cpp           | 6 +++++-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp
index 94c805205a..95d4265bb4 100644
--- a/indra/newview/llfloaterregionrestarting.cpp
+++ b/indra/newview/llfloaterregionrestarting.cpp
@@ -100,9 +100,10 @@ void LLFloaterRegionRestarting::draw()
 {
 	LLFloater::draw();
 
-	const F32 SHAKE_INTERVAL = 0.04;
+	const F32 SHAKE_INTERVAL = 0.025;
 	const F32 SHAKE_TOTAL_DURATION = 1.8; // the length of the default alert tone for this
 	const F32 SHAKE_INITIAL_MAGNITUDE = 1.5;
+	const F32 SHAKE_HORIZONTAL_BIAS = 0.25;
 	F32 time_shaking;
 	
 	if(SHAKE_START == sShakeState)
@@ -120,7 +121,7 @@ void LLFloaterRegionRestarting::draw()
 		switch(sShakeState)
 		{
 			case SHAKE_LEFT:
-				gAgentCamera.setPanLeftKey(mShakeMagnitude);
+				gAgentCamera.setPanLeftKey(mShakeMagnitude * SHAKE_HORIZONTAL_BIAS);
 				sShakeState = SHAKE_UP;
 				break;
 
@@ -130,7 +131,7 @@ void LLFloaterRegionRestarting::draw()
 				break;
 
 			case SHAKE_RIGHT:
-				gAgentCamera.setPanRightKey(mShakeMagnitude);
+				gAgentCamera.setPanRightKey(mShakeMagnitude * SHAKE_HORIZONTAL_BIAS);
 				sShakeState = SHAKE_DOWN;
 				break;
 
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 076419e96a..267aa9532c 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5978,7 +5978,11 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem)
 				LLSD params;
 				params["NAME"] = llsdBlock["NAME"];
 				params["SECONDS"] = (LLSD::Integer)seconds;
-				LLFloaterReg::showInstance("region_restarting", params);
+				LLFloaterRegionRestarting* restarting_floater = dynamic_cast<LLFloaterRegionRestarting*>(LLFloaterReg::showInstance("region_restarting", params));
+				if(restarting_floater)
+				{
+					restarting_floater->center();
+				}
 			}
 
 			send_sound_trigger(LLUUID(gSavedSettings.getString("UISndRestart")), 1.0f);
-- 
cgit v1.2.3


From 6c28e65b128468d4dd14b27cc18bf4f5a5f70b7e Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Wed, 22 Jan 2014 11:12:22 -0500
Subject: record installed packages for each build

---
 build.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/build.sh b/build.sh
index 1fd2cd802b..0060b83f3f 100755
--- a/build.sh
+++ b/build.sh
@@ -414,6 +414,12 @@ then
           upload_item symbolfile "$build_dir/$symbolfile" binary/octet-stream
         done
 
+        # Upload the actual dependencies used
+        if [ -r "$build_dir/packages/installed-packages.xml" ]
+        then
+            upload_item installer "$build_dir/packages/installed-packages.xml" text/xml
+        fi
+
         # Upload the llphysicsextensions_tpv package, if one was produced
         # *TODO: Make this an upload-extension
         if [ -r "$build_dir/llphysicsextensions_package" ]
-- 
cgit v1.2.3


From 476e317c8b4803926e1775ec206d013bd717ad98 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Thu, 23 Jan 2014 17:55:03 -0600
Subject: FITMESH-6, FITMESH-20  Fix for some objects disappearing when
 hardware skinning enabled and ALM disabled.

---
 .../app_settings/shaders/class1/avatar/objectSkinV.glsl      |  9 +++------
 indra/newview/lldrawpoolavatar.cpp                           | 12 +++++++-----
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 972d10b325..8eb5a977bc 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -22,17 +22,14 @@
  * $/LicenseInfo$
  */
 
-
-
 ATTRIBUTE vec4 weight4;  
 
-uniform mat3 matrixPalette[64];
-uniform vec3 translationPalette[64];
-
+uniform mat3 matrixPalette[52];
+uniform vec3 translationPalette[52];
 
 mat4 getObjectSkinnedTransform()
 {
-	int i; 
+	int i;
 	
 	vec4 w = fract(weight4);
 	vec4 index = floor(weight4);
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index e77ed27fa2..4578d3d0cd 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -55,6 +55,7 @@ static U32 sDataMask = LLDrawPoolAvatar::VERTEX_DATA_MASK;
 static U32 sBufferUsage = GL_STREAM_DRAW_ARB;
 static U32 sShaderLevel = 0;
 
+#define JOINT_COUNT 52
 
 LLGLSLShader* LLDrawPoolAvatar::sVertexProgram = NULL;
 BOOL	LLDrawPoolAvatar::sSkipOpaque = FALSE;
@@ -1582,7 +1583,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
 		LLVector4a* norm = has_normal ? (LLVector4a*) normal.get() : NULL;
 		
 		//build matrix palette
-		LLMatrix4a mp[64];
+		LLMatrix4a mp[JOINT_COUNT];
 		LLMatrix4* mat = (LLMatrix4*) mp;
 
 		for (U32 j = 0; j < skin->mJointNames.size(); ++j)
@@ -1642,6 +1643,7 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
 				LLVector4a& n = vol_face.mNormals[j];
 				bind_shape_matrix.rotate(n, t);
 				final_mat.rotate(t, dst);
+				dst.normalize3fast();
 				norm[j] = dst;
 			}
 		}
@@ -1708,9 +1710,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
 		{
 			if (sShaderLevel > 0)
 			{ //upload matrix palette to shader
-				LLMatrix4 mat[64];
+				LLMatrix4 mat[JOINT_COUNT];
 
-				U32 count = llmin((U32) skin->mJointNames.size(), (U32) 64);
+				U32 count = llmin((U32) skin->mJointNames.size(), (U32) JOINT_COUNT);
 
 				for (U32 i = 0; i < count; ++i)
 				{
@@ -1724,9 +1726,9 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow)
 				
 				stop_glerror();
 
-				F32 mp[64*9];
+				F32 mp[JOINT_COUNT*9];
 
-				F32 transp[64*3];
+				F32 transp[JOINT_COUNT*3];
 
 				for (U32 i = 0; i < count; ++i)
 				{
-- 
cgit v1.2.3


From 7b1e1e4e35351936f2ab0305a91691f78f69519d Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Wed, 29 Jan 2014 18:25:03 -0500
Subject: FITMESH-6: correct bounds checking

---
 indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl | 2 +-
 indra/newview/lldrawpoolavatar.cpp                                | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
index 8eb5a977bc..57129c3bd1 100755
--- a/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
+++ b/indra/newview/app_settings/shaders/class1/avatar/objectSkinV.glsl
@@ -34,7 +34,7 @@ mat4 getObjectSkinnedTransform()
 	vec4 w = fract(weight4);
 	vec4 index = floor(weight4);
 	
-		 index = min(index, vec4(63.0));
+		 index = min(index, vec4(51.0));
 		 index = max(index, vec4( 0.0));
 
 	float scale = 1.0/(w.x+w.y+w.z+w.w);
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 4578d3d0cd..906b7b2809 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -698,7 +698,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
 	specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);
 	normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
 	sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
-	sVertexProgram->bind();
+	U1573sVertexProgram->bind();
 	sVertexProgram->setMinimumAlpha(0.01f);
 }
 
@@ -1586,7 +1586,8 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*
 		LLMatrix4a mp[JOINT_COUNT];
 		LLMatrix4* mat = (LLMatrix4*) mp;
 
-		for (U32 j = 0; j < skin->mJointNames.size(); ++j)
+		U32 count = llmin((U32) skin->mJointNames.size(), (U32) JOINT_COUNT);
+		for (U32 j = 0; j < count; ++j)
 		{
 			LLJoint* joint = avatar->getJoint(skin->mJointNames[j]);
 			if (joint)
-- 
cgit v1.2.3


From 9bb2bc6099c37a1d3efb4f1400a1a42750f85bac Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Thu, 30 Jan 2014 14:18:58 -0500
Subject: fix odd editor artifact

---
 indra/newview/lldrawpoolavatar.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 906b7b2809..24f467f954 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -698,7 +698,7 @@ void LLDrawPoolAvatar::beginDeferredImpostor()
 	specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);
 	normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::DEFERRED_NORMAL);
 	sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
-	U1573sVertexProgram->bind();
+	sVertexProgram->bind();
 	sVertexProgram->setMinimumAlpha(0.01f);
 }
 
-- 
cgit v1.2.3


From b236cdbe8cf55e513e6363f6a9b017a3b6bfdcd8 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 10 Feb 2014 16:00:37 -0500
Subject: Added tag 3.7.0-release for changeset 5d746de933a9

---
 .hgtags | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.hgtags b/.hgtags
index 0f67e5c3d3..4873c148a5 100755
--- a/.hgtags
+++ b/.hgtags
@@ -472,3 +472,4 @@ d40c66e410741de7e90b1ed6dac28dd8a2d7e1f6 3.6.8-release
 2feb70a4cfde43f2898d95ff8fcae3e67805c7c2 3.6.11-release
 88bbfd7a6971033f3aa103f3a3500ceb4c73521b 3.6.12-release
 0d9b9e50f1a8880e05f15688a9ec7d09e0e81013 3.6.13-release
+5d746de933a98ca17887cde2fece80e9c7ab0b98 3.7.0-release
-- 
cgit v1.2.3


From 413be91cf5044889ade97dcbec4b17fceff122e3 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 10 Feb 2014 16:00:37 -0500
Subject: increment viewer version to 3.7.1

---
 indra/newview/VIEWER_VERSION.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 7c69a55dbb..a76ccff2a6 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-3.7.0
+3.7.1
-- 
cgit v1.2.3


From 254728e00d600bdb4b211d9fd4b7da33e3872fea Mon Sep 17 00:00:00 2001
From: Drake Arconis <lightdrake@gmail.com>
Date: Fri, 14 Feb 2014 12:21:07 -0500
Subject: OPEN-203 dummy commit to satisfy mercurial

---
 indra/edit-me-to-trigger-new-build.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/indra/edit-me-to-trigger-new-build.txt b/indra/edit-me-to-trigger-new-build.txt
index 774e8c0676..4159352ab3 100755
--- a/indra/edit-me-to-trigger-new-build.txt
+++ b/indra/edit-me-to-trigger-new-build.txt
@@ -1,4 +1,4 @@
-Wed Nov  7 00:25:19 UTC 2012
+Wed Nov  7 00:25:19 UTC 2012 
 
 
 
-- 
cgit v1.2.3