diff --git a/doc/contributions.txt b/doc/contributions.txt
index c1306db9b77ba9e4ddc780367c353b5c9309e50a..3851e62cfbdae7aa8137087a910a1adc6ae8fc21 100644
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -103,6 +103,7 @@ Aleric Inglewood
 	STORM-163
 	STORM-955
 	STORM-960
+	STORM-1793
 Ales Beaumont
 	VWR-9352
 	SNOW-240
@@ -598,6 +599,7 @@ Jonathan Yap
 	STORM-1685
 	STORM-1718
 	STORM-1721
+	STORM-1718
 	STORM-1727
 	STORM-1725
 	STORM-1719
@@ -612,11 +614,17 @@ Jonathan Yap
 	STORM-1733
 	STORM-1741
 	STORM-1790
+	STORM-1795
 	STORM-1788
 	STORM-1803
 	STORM-1795
 	STORM-1799
 	STORM-1796
+	STORM-1807
+	STORM-1808
+	STORM-1809
+	STORM-1793
+	STORM-1810
 Kadah Coba
 	STORM-1060
 Jondan Lundquist
@@ -1247,6 +1255,8 @@ WolfPup Lowenhar
 	VWR-20741
 	VWR-20933
 Wundur Primbee
+Xellessanova Zenith
+	STORM-1793
 Xiki Luik
 xstorm Radek
 YongYong Francois
diff --git a/indra/newview/app_settings/commands.xml b/indra/newview/app_settings/commands.xml
index 1d1d39c786b10171291631b631504b0c3f6bed37..73df064ab29026cf8a2ef95bf0928e3157de7c58 100644
--- a/indra/newview/app_settings/commands.xml
+++ b/indra/newview/app_settings/commands.xml
@@ -37,6 +37,8 @@
            tooltip_ref="Command_Build_Tooltip"
            execute_function="Build.Toggle"
            execute_parameters="build"
+           is_enabled_function="Build.Enabled"
+           is_enabled_parameters="build"
            is_running_function="Floater.IsOpen"
            is_running_parameters="build"
            />
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index ab9b5ff436823665ccd1151c00216f3187129d08..3870a3be2ecc71d3d5e122e1b5f21ff6c196bbd1 100755
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -169,11 +169,7 @@ bool LLAgent::isActionAllowed(const LLSD& sdname)
 
 	const std::string& param = sdname.asString();
 
-	if (param == "build")
-	{
-		retval = gAgent.canEditParcel();
-	}
-	else if (param == "speak")
+	if (param == "speak")
 	{
 		if ( gAgent.isVoiceConnected() && 
 			LLViewerParcelMgr::getInstance()->allowAgentVoice() &&
diff --git a/indra/newview/llfloaterscriptdebug.cpp b/indra/newview/llfloaterscriptdebug.cpp
index a0d1a32e1295659579bbd4ce48ea1f71879e41c9..b691db1049f04756867a7a3cf3b1791207a3ee15 100644
--- a/indra/newview/llfloaterscriptdebug.cpp
+++ b/indra/newview/llfloaterscriptdebug.cpp
@@ -106,7 +106,11 @@ void LLFloaterScriptDebug::addScriptLine(const std::string &utf8mesg, const std:
 	if (objectp)
 	{
 		objectp->setIcon(LLViewerTextureManager::getFetchedTextureFromFile("script_error.j2c", TRUE, LLViewerTexture::BOOST_UI));
-		floater_label = llformat("%s(%.2f, %.2f)", user_name.c_str(), objectp->getPositionRegion().mV[VX], objectp->getPositionRegion().mV[VY]);
+		floater_label = llformat("%s(%.0f, %.0f, %.0f)",
+						user_name.c_str(),
+						objectp->getPositionRegion().mV[VX],
+						objectp->getPositionRegion().mV[VY],
+						objectp->getPositionRegion().mV[VZ]);
 	}
 	else
 	{
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c0065a94e662c710bd29b5da4fff218f199ddd21..3b506d72dd6ddde05856b5dfe1abf6c68e8a5398 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4633,14 +4633,14 @@ void LLAnimationBridge::performAction(LLInventoryModel* model, std::string actio
 	{
 		if (getItem())
 		{
-			LLPreviewAnim::e_activation_type activate = LLPreviewAnim::NONE;
-			if ("playworld" == action) activate = LLPreviewAnim::PLAY;
-			if ("playlocal" == action) activate = LLPreviewAnim::AUDITION;
+			LLSD::String activate = "NONE";
+			if ("playworld" == action) activate = "Inworld";
+			if ("playlocal" == action) activate = "Locally";
 
 			LLPreviewAnim* preview = LLFloaterReg::showTypedInstance<LLPreviewAnim>("preview_anim", LLSD(mUUID));
 			if (preview)
 			{
-				preview->activate(activate);
+				preview->play(activate);
 			}
 		}
 	}
diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp
index 15d5d7c1628f8b43dd2da028ec299ea30fb825c1..1bda7640bd32825149e429ab3a451a85adfd5692 100644
--- a/indra/newview/llnetmap.cpp
+++ b/indra/newview/llnetmap.cpp
@@ -74,6 +74,8 @@ const F32 DOT_SCALE = 0.75f;
 const F32 MIN_PICK_SCALE = 2.f;
 const S32 MOUSE_DRAG_SLOP = 2;		// How far the mouse needs to move before we think it's a drag
 
+const F64 COARSEUPDATE_MAX_Z = 1020.0f;
+
 LLNetMap::LLNetMap (const Params & p)
 :	LLUICtrl (p),
 	mBackgroundColor (p.bg_color()),
@@ -300,7 +302,8 @@ void LLNetMap::draw()
 		}
 
 		LLVector3 map_center_agent = gAgent.getPosAgentFromGlobal(mObjectImageCenterGlobal);
-		map_center_agent -= gAgentCamera.getCameraPositionAgent();
+		LLVector3 camera_position = gAgentCamera.getCameraPositionAgent();
+		map_center_agent -= camera_position;
 		map_center_agent.mV[VX] *= mScale/region_width;
 		map_center_agent.mV[VY] *= mScale/region_width;
 
@@ -321,9 +324,6 @@ void LLNetMap::draw()
 
 		gGL.popMatrix();
 
-		LLVector3d pos_global;
-		LLVector3 pos_map;
-
 		// Mouse pointer in local coordinates
 		S32 local_mouse_x;
 		S32 local_mouse_y;
@@ -333,90 +333,67 @@ void LLNetMap::draw()
 		F32 closest_dist_squared = F32_MAX; // value will be overridden in the loop
 		F32 min_pick_dist_squared = (mDotRadius * MIN_PICK_SCALE) * (mDotRadius * MIN_PICK_SCALE);
 
+		LLVector3 pos_map;
+		uuid_vec_t avatar_ids;
+		std::vector<LLVector3d> positions;
+		bool unknown_relative_z;
+
+		LLWorld::getInstance()->getAvatars(&avatar_ids, &positions, gAgentCamera.getCameraPositionGlobal());
+
 		// Draw avatars
-		for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
-			 iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
+		for (U32 i = 0; i < avatar_ids.size(); i++)
 		{
-			LLViewerRegion* regionp = *iter;
-			const LLVector3d& origin_global = regionp->getOriginGlobal();
-
-			S32 count = regionp->mMapAvatars.count();
-			S32 i;
-			LLVector3 pos_local;
-			U32 compact_local;
-			U8 bits;
-			// TODO: it'd be very cool to draw these in sorted order from lowest Z to highest.
-			// just be careful to sort the avatar IDs along with the positions. -MG
-			for (i = 0; i < count; i++)
-			{
-				compact_local = regionp->mMapAvatars.get(i);
+			pos_map = globalPosToView(positions[i]);
+			LLUUID uuid = avatar_ids[i];
 
-				bits = compact_local & 0xFF;
-				pos_local.mV[VZ] = F32(bits) * 4.f;
-				compact_local >>= 8;
+			bool show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
 
-				bits = compact_local & 0xFF;
-				pos_local.mV[VY] = (F32)bits;
-				compact_local >>= 8;
+			LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
 
-				bits = compact_local & 0xFF;
-				pos_local.mV[VX] = (F32)bits;
+			unknown_relative_z = positions[i].mdV[VZ] == COARSEUPDATE_MAX_Z &&
+					camera_position.mV[VZ] >= COARSEUPDATE_MAX_Z;
 
-				pos_global.setVec( pos_local );
-				pos_global += origin_global;
+			LLWorldMapView::drawAvatar(
+				pos_map.mV[VX], pos_map.mV[VY], 
+				color, 
+				pos_map.mV[VZ], mDotRadius,
+				unknown_relative_z);
 
-				pos_map = globalPosToView(pos_global);
-
-				LLUUID uuid(NULL);
-				BOOL show_as_friend = FALSE;
-				if( i < regionp->mMapAvatarIDs.count())
+			if(uuid.notNull())
+			{
+				bool selected = false;
+				uuid_vec_t::iterator sel_iter = gmSelected.begin();
+				for (; sel_iter != gmSelected.end(); sel_iter++)
 				{
-					uuid = regionp->mMapAvatarIDs.get(i);
-					show_as_friend = (LLAvatarTracker::instance().getBuddyInfo(uuid) != NULL);
+					if(*sel_iter == uuid)
+					{
+						selected = true;
+						break;
+					}
 				}
-
-				LLColor4 color = show_as_friend ? map_avatar_friend_color : map_avatar_color;
-				LLWorldMapView::drawAvatar(
-					pos_map.mV[VX], pos_map.mV[VY], 
-					color, 
-					pos_map.mV[VZ], mDotRadius);
-
-				if(uuid.notNull())
+				if(selected)
 				{
-					bool selected = false;
-					uuid_vec_t::iterator sel_iter = gmSelected.begin();
-					for (; sel_iter != gmSelected.end(); sel_iter++)
+					if( (pos_map.mV[VX] < 0) ||
+						(pos_map.mV[VY] < 0) ||
+						(pos_map.mV[VX] >= getRect().getWidth()) ||
+						(pos_map.mV[VY] >= getRect().getHeight()) )
 					{
-						if(*sel_iter == uuid)
-						{
-							selected = true;
-							break;
-						}
-					}
-					if(selected)
+						S32 x = llround( pos_map.mV[VX] );
+						S32 y = llround( pos_map.mV[VY] );
+						LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
+					} else
 					{
-						if( (pos_map.mV[VX] < 0) ||
-							(pos_map.mV[VY] < 0) ||
-							(pos_map.mV[VX] >= getRect().getWidth()) ||
-							(pos_map.mV[VY] >= getRect().getHeight()) )
-						{
-							S32 x = llround( pos_map.mV[VX] );
-							S32 y = llround( pos_map.mV[VY] );
-							LLWorldMapView::drawTrackingCircle( getRect(), x, y, color, 1, 10);
-						} else
-						{
-							LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f);
-						}
+						LLWorldMapView::drawTrackingDot(pos_map.mV[VX],pos_map.mV[VY],color,0.f);
 					}
 				}
+			}
 
-				F32	dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
-											  LLVector2(local_mouse_x,local_mouse_y));
-				if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
-				{
-					closest_dist_squared = dist_to_cursor_squared;
-					mClosestAgentToCursor = regionp->mMapAvatarIDs.get(i);
-				}
+			F32	dist_to_cursor_squared = dist_vec_squared(LLVector2(pos_map.mV[VX], pos_map.mV[VY]),
+										  LLVector2(local_mouse_x,local_mouse_y));
+			if(dist_to_cursor_squared < min_pick_dist_squared && dist_to_cursor_squared < closest_dist_squared)
+			{
+				closest_dist_squared = dist_to_cursor_squared;
+				mClosestAgentToCursor = uuid;
 			}
 		}
 
@@ -440,7 +417,7 @@ void LLNetMap::draw()
 		}
 
 		// Draw dot for self avatar position
-		pos_global = gAgent.getPositionGlobal();
+		LLVector3d pos_global = gAgent.getPositionGlobal();
 		pos_map = globalPosToView(pos_global);
 		S32 dot_width = llround(mDotRadius * 2.f);
 		LLUIImagePtr you = LLWorldMapView::sAvatarYouLargeImage;
@@ -514,9 +491,11 @@ void LLNetMap::reshape(S32 width, S32 height, BOOL called_from_parent)
 	createObjectImage();
 }
 
-LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
+LLVector3 LLNetMap::globalPosToView(const LLVector3d& global_pos)
 {
-	LLVector3d relative_pos_global = global_pos - gAgentCamera.getCameraPositionGlobal();
+	LLVector3d camera_position = gAgentCamera.getCameraPositionGlobal();
+
+	LLVector3d relative_pos_global = global_pos - camera_position;
 	LLVector3 pos_local;
 	pos_local.setVec(relative_pos_global);  // convert to floats from doubles
 
@@ -541,7 +520,7 @@ LLVector3 LLNetMap::globalPosToView( const LLVector3d& global_pos )
 void LLNetMap::drawTracking(const LLVector3d& pos_global, const LLColor4& color, 
 							BOOL draw_arrow )
 {
-	LLVector3 pos_local = globalPosToView( pos_global );
+	LLVector3 pos_local = globalPosToView(pos_global);
 	if( (pos_local.mV[VX] < 0) ||
 		(pos_local.mV[VY] < 0) ||
 		(pos_local.mV[VX] >= getRect().getWidth()) ||
diff --git a/indra/newview/llpreviewanim.cpp b/indra/newview/llpreviewanim.cpp
index 8e8b530e1352c61ec084463ba6a10f2733b87e5d..35ac0537a3d01758397f939b3d13eb509d471ad4 100644
--- a/indra/newview/llpreviewanim.cpp
+++ b/indra/newview/llpreviewanim.cpp
@@ -43,19 +43,7 @@ extern LLAgent gAgent;
 LLPreviewAnim::LLPreviewAnim(const LLSD& key)
 	: LLPreview( key )
 {
-}
-
-// static
-void LLPreviewAnim::endAnimCallback( void *userdata )
-{
-	LLHandle<LLFloater>* handlep = ((LLHandle<LLFloater>*)userdata);
-	LLFloater* self = handlep->get();
-	delete handlep; // done with the handle
-	if (self)
-	{
-		self->getChild<LLUICtrl>("Anim play btn")->setValue(FALSE);
-		self->getChild<LLUICtrl>("Anim audition btn")->setValue(FALSE);
-	}
+	mCommitCallbackRegistrar.add("PreviewAnim.Play", boost::bind(&LLPreviewAnim::play, this, _2));
 }
 
 // virtual
@@ -68,105 +56,114 @@ BOOL LLPreviewAnim::postBuild()
 		getChild<LLUICtrl>("desc")->setValue(item->getDescription());
 	}
 
-	childSetAction("Anim play btn",playAnim, this);
-	childSetAction("Anim audition btn",auditionAnim, this);
-
 	childSetCommitCallback("desc", LLPreview::onText, this);
 	getChild<LLLineEditor>("desc")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
-	
+
 	return LLPreview::postBuild();
 }
 
-void LLPreviewAnim::activate(e_activation_type type)
+// static
+// llinventorybridge also calls into here
+void LLPreviewAnim::play(const LLSD& param)
 {
-	switch ( type ) 
+	const LLInventoryItem *item = getItem();
+
+	if(item)
 	{
-		case PLAY:
+		LLUUID itemID=item->getAssetUUID();
+
+		std::string btn_name = param.asString();
+		LLButton* btn_inuse;
+		LLButton* btn_other;
+
+		if ("Inworld" == btn_name)
 		{
-			playAnim( (void *) this );
-			break;
+			btn_inuse = getChild<LLButton>("Inworld");
+			btn_other = getChild<LLButton>("Locally");
 		}
-		case AUDITION:
+		else if ("Locally" == btn_name)
 		{
-			auditionAnim( (void *) this );
-			break;
+			btn_inuse = getChild<LLButton>("Locally");
+			btn_other = getChild<LLButton>("Inworld");
 		}
-		default:
+		else
 		{
-		//do nothing
+			return;
 		}
-	}
-}
-
-// static
-void LLPreviewAnim::playAnim( void *userdata )
-{
-	LLPreviewAnim* self = (LLPreviewAnim*) userdata;
-	const LLInventoryItem *item = self->getItem();
 
-	if(item)
-	{
-		LLUUID itemID=item->getAssetUUID();
+		if (btn_inuse)
+		{
+			btn_inuse->toggleState();
+		}
 
-		LLButton* btn = self->getChild<LLButton>("Anim play btn");
-		if (btn)
+		if (btn_other)
 		{
-			btn->toggleState();
+			btn_other->setEnabled(false);
 		}
 		
-		if (self->getChild<LLUICtrl>("Anim play btn")->getValue().asBoolean() ) 
+		if (getChild<LLUICtrl>(btn_name)->getValue().asBoolean() ) 
 		{
-			self->mPauseRequest = NULL;
-			gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
+			if("Inworld" == btn_name)
+			{
+				gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_START);
+			}
+			else
+			{
+				gAgentAvatarp->startMotion(item->getAssetUUID());
+			}
+
 			LLMotion* motion = gAgentAvatarp->findMotion(itemID);
 			if (motion)
 			{
-				motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
+				mItemID = itemID;
+				mDidStart = false;
 			}
 		}
 		else
 		{
 			gAgentAvatarp->stopMotion(itemID);
 			gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
+
+			if (btn_other)
+			{
+				btn_other->setEnabled(true);
+			}
 		}
 	}
 }
 
-// static
-void LLPreviewAnim::auditionAnim( void *userdata )
+// virtual
+void LLPreviewAnim::draw()
 {
-	LLPreviewAnim* self = (LLPreviewAnim*) userdata;
-	const LLInventoryItem *item = self->getItem();
-
-	if(item)
+	LLPreview::draw();
+	if (!this->mItemID.isNull())
 	{
-		LLUUID itemID=item->getAssetUUID();
-
-		LLButton* btn = self->getChild<LLButton>("Anim audition btn");
-		if (btn)
-		{
-			btn->toggleState();
-		}
-		
-		if (self->getChild<LLUICtrl>("Anim audition btn")->getValue().asBoolean() ) 
+		LLMotion* motion = gAgentAvatarp->findMotion(this->mItemID);
+		if (motion)
 		{
-			self->mPauseRequest = NULL;
-			gAgentAvatarp->startMotion(item->getAssetUUID());
-			LLMotion* motion = gAgentAvatarp->findMotion(itemID);
-			
-			if (motion)
+			if (motion->isStopped() && this->mDidStart)
 			{
-				motion->setDeactivateCallback(&endAnimCallback, (void *)(new LLHandle<LLFloater>(self->getHandle())));
+				cleanup();
+			}
+			if(gAgentAvatarp->isMotionActive(this->mItemID) && !this->mDidStart)
+			{
+				this->mDidStart = true;
 			}
-		}
-		else
-		{
-			gAgentAvatarp->stopMotion(itemID);
-			gAgent.sendAnimationRequest(itemID, ANIM_REQUEST_STOP);
 		}
 	}
 }
 
+// virtual
+void LLPreviewAnim::cleanup()
+{
+	this->mItemID = LLUUID::null;
+	this->mDidStart = false;
+	getChild<LLUICtrl>("Inworld")->setValue(FALSE);
+	getChild<LLUICtrl>("Locally")->setValue(FALSE);
+	getChild<LLUICtrl>("Inworld")->setEnabled(true);
+	getChild<LLUICtrl>("Locally")->setEnabled(true);
+}
+
 // virtual
 void LLPreviewAnim::onClose(bool app_quitting)
 {
@@ -176,12 +173,5 @@ void LLPreviewAnim::onClose(bool app_quitting)
 	{
 		gAgentAvatarp->stopMotion(item->getAssetUUID());
 		gAgent.sendAnimationRequest(item->getAssetUUID(), ANIM_REQUEST_STOP);
-		LLMotion* motion = gAgentAvatarp->findMotion(item->getAssetUUID());
-		
-		if (motion)
-		{
-			// *TODO: minor memory leak here, user data is never deleted (Use real callbacks)
-			motion->setDeactivateCallback(NULL, (void *)NULL);
-		}
 	}
 }
diff --git a/indra/newview/llpreviewanim.h b/indra/newview/llpreviewanim.h
index 32e07ee33a0700953f435292d42e9d16d03723b4..8eaed6ca1f9ce1bcb29847a082f20034aa365aad 100644
--- a/indra/newview/llpreviewanim.h
+++ b/indra/newview/llpreviewanim.h
@@ -33,24 +33,18 @@
 class LLPreviewAnim : public LLPreview
 {
 public:
-	enum e_activation_type { NONE = 0, PLAY = 1, AUDITION = 2 };
-	LLPreviewAnim(const LLSD& key);
 
-	static void playAnim( void* userdata );
-	static void auditionAnim( void* userdata );
-	static void endAnimCallback( void *userdata );
+	LLPreviewAnim(const LLSD& key);
 	/*virtual*/	BOOL postBuild();
 	/*virtual*/ void onClose(bool app_quitting);
-	void activate(e_activation_type type);
+	void draw();
+	void cleanup();
+	void play(const LLSD& param);
 	
 protected:
 	
-	LLAnimPauseRequest	mPauseRequest;
-	LLUUID		mItemID;
-	std::string	mTitle;
-	LLUUID		mObjectID;
-	LLButton*	mPlayBtn;
-	LLButton*	mAuditionBtn;
+	LLUUID	mItemID;
+	bool	mDidStart;
 };
 
-#endif  // LL_LLPREVIEWSOUND_H
+#endif  // LL_LLPREVIEWANIM_H
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index de22f2ae6b7f6fe3085363d7c6e8d76fa00bf782..ddedb1dcfb5ea2baca31450f7b2c71ae008b43fe 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -929,6 +929,13 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
 	tentative_label_p.rect(LLRect (0, image_middle + line_height / 2, getRect().getWidth(), image_middle - line_height / 2 ));
 	tentative_label_p.follows.flags(FOLLOWS_ALL);
 	mTentativeLabel = LLUICtrlFactory::create<LLTextBox> (tentative_label_p);
+
+	// It is no longer possible to associate a style with a textbox, so it has to be done in this fashion
+	LLStyle::Params style_params;
+	style_params.color = LLColor4::white;
+
+	mTentativeLabel->setText(LLTrans::getString("multiple_textures"), style_params);
+	mTentativeLabel->setHAlign(LLFontGL::HCENTER);
 	addChild( mTentativeLabel );
 
 	LLRect border_rect = getLocalRect();
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 6bc7c6de11b8b22e58ab605d5a79a3d4bbd76028..ac01316462caa8b43c8e646f116cc3fcd9cb26d9 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -81,7 +81,7 @@ LLToolMgr::LLToolMgr()
 	// Not a panel, register these callbacks globally.
 	LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
 	LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
-	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this));
+	LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2));
 	
 	gToolNull = new LLTool(LLStringUtil::null);  // Does nothing
 	setCurrentTool(gToolNull);
@@ -245,8 +245,15 @@ bool LLToolMgr::canEdit()
 	return LLViewerParcelMgr::getInstance()->allowAgentBuild();
 }
 
-void LLToolMgr::toggleBuildMode()
+void LLToolMgr::toggleBuildMode(const LLSD& sdname)
 {
+	const std::string& param = sdname.asString();
+
+	if (param == "build" && !canEdit())
+	{
+		return;
+	}
+
 	LLFloaterReg::toggleInstanceOrBringToFront("build");
 
 	bool build_visible = LLFloaterReg::instanceVisible("build");
diff --git a/indra/newview/lltoolmgr.h b/indra/newview/lltoolmgr.h
index d489c4c829f2ad0706eda0345ab6d02a77824e74..12649cfba2d92e33482a98c54b6cb0620fc44b78 100644
--- a/indra/newview/lltoolmgr.h
+++ b/indra/newview/lltoolmgr.h
@@ -54,7 +54,7 @@ class LLToolMgr : public LLSingleton<LLToolMgr>
 
 	bool			inEdit();
 	bool			canEdit();
-	void			toggleBuildMode();
+	void			toggleBuildMode(const LLSD& sdname);
 	
 	/* Determines if we are in Build mode or not. */
 	bool			inBuildMode();
diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp
index 676287c0addbfe4f62f96a69549d8bafcdab6808..fbd8b3ada3932f66ae33a48ffb47b56563cb39b0 100644
--- a/indra/newview/llworld.cpp
+++ b/indra/newview/llworld.cpp
@@ -1161,24 +1161,13 @@ void send_agent_resume()
 
 static LLVector3d unpackLocalToGlobalPosition(U32 compact_local, const LLVector3d& region_origin)
 {
-	LLVector3d pos_global;
-	LLVector3 pos_local;
-	U8 bits;
+	LLVector3d pos_local;
 
-	bits = compact_local & 0xFF;
-	pos_local.mV[VZ] = F32(bits) * 4.f;
-	compact_local >>= 8;
+	pos_local.mdV[VZ] = (compact_local & 0xFFU) * 4;
+	pos_local.mdV[VY] = (compact_local >> 8) & 0xFFU;
+	pos_local.mdV[VX] = (compact_local >> 16) & 0xFFU;
 
-	bits = compact_local & 0xFF;
-	pos_local.mV[VY] = (F32)bits;
-	compact_local >>= 8;
-
-	bits = compact_local & 0xFF;
-	pos_local.mV[VX] = (F32)bits;
-
-	pos_global.setVec( pos_local );
-	pos_global += region_origin;
-	return pos_global;
+	return region_origin + pos_local;
 }
 
 void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positions, const LLVector3d& relative_to, F32 radius) const
@@ -1199,23 +1188,20 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
 		iter != LLCharacter::sInstances.end(); ++iter)
 	{
 		LLVOAvatar* pVOAvatar = (LLVOAvatar*) *iter;
-		if(!pVOAvatar->isDead() && !pVOAvatar->isSelf())
+		LLVector3d pos_global = pVOAvatar->getPositionGlobal();
+		LLUUID uuid = pVOAvatar->getID();
+		if( !pVOAvatar->isDead()
+			&& !pVOAvatar->isSelf()
+			&& !uuid.isNull() &&
+			dist_vec_squared(pos_global, relative_to) <= radius_squared)
 		{
-			LLUUID uuid = pVOAvatar->getID();
-			if(!uuid.isNull())
+			if(positions != NULL)
 			{
-				LLVector3d pos_global = pVOAvatar->getPositionGlobal();
-				if(dist_vec_squared(pos_global, relative_to) <= radius_squared)
-				{
-					if(positions != NULL)
-					{
-						positions->push_back(pos_global);
-					}
-					if(avatar_ids !=NULL)
-					{
-						avatar_ids->push_back(uuid);
-					}
-				}
+				positions->push_back(pos_global);
+			}
+			if(avatar_ids !=NULL)
+			{
+				avatar_ids->push_back(uuid);
 			}
 		}
 	}
@@ -1233,9 +1219,9 @@ void LLWorld::getAvatars(uuid_vec_t* avatar_ids, std::vector<LLVector3d>* positi
 			{
 				LLUUID uuid = regionp->mMapAvatarIDs.get(i);
 				// if this avatar doesn't already exist in the list, add it
-				if(uuid.notNull() && avatar_ids!=NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
+				if(uuid.notNull() && avatar_ids != NULL && std::find(avatar_ids->begin(), avatar_ids->end(), uuid) == avatar_ids->end())
 				{
-					if(positions != NULL)
+					if (positions != NULL)
 					{
 						positions->push_back(pos_global);
 					}
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index e50851b8e76488dbdf8ac4659876700301d38cda..fc3ab1a0c0f62673feecca71123b7a172f6ce30c 100644
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -77,6 +77,7 @@ LLUIImagePtr LLWorldMapView::sAvatarYouLargeImage = NULL;
 LLUIImagePtr LLWorldMapView::sAvatarLevelImage = NULL;
 LLUIImagePtr LLWorldMapView::sAvatarAboveImage = NULL;
 LLUIImagePtr LLWorldMapView::sAvatarBelowImage = NULL;
+LLUIImagePtr LLWorldMapView::sAvatarUnknownImage = NULL;
 
 LLUIImagePtr LLWorldMapView::sTelehubImage = NULL;
 LLUIImagePtr LLWorldMapView::sInfohubImage = NULL;
@@ -120,6 +121,7 @@ void LLWorldMapView::initClass()
 	sAvatarLevelImage =		LLUI::getUIImage("map_avatar_32.tga");
 	sAvatarAboveImage =		LLUI::getUIImage("map_avatar_above_32.tga");
 	sAvatarBelowImage =		LLUI::getUIImage("map_avatar_below_32.tga");
+	sAvatarUnknownImage =	LLUI::getUIImage("map_avatar_unknown_32.tga");
 
 	sHomeImage =			LLUI::getUIImage("map_home.tga");
 	sTelehubImage = 		LLUI::getUIImage("map_telehub.tga");
@@ -149,6 +151,7 @@ void LLWorldMapView::cleanupClass()
 	sAvatarLevelImage = NULL;
 	sAvatarAboveImage = NULL;
 	sAvatarBelowImage = NULL;
+	sAvatarUnknownImage = NULL;
 
 	sTelehubImage = NULL;
 	sInfohubImage = NULL;
@@ -1147,17 +1150,25 @@ void LLWorldMapView::drawAvatar(F32 x_pixels,
 								F32 y_pixels,
 								const LLColor4& color,
 								F32 relative_z,
-								F32 dot_radius)
+								F32 dot_radius,
+								bool unknown_relative_z)
 {
 	const F32 HEIGHT_THRESHOLD = 7.f;
 	LLUIImagePtr dot_image = sAvatarLevelImage;
-	if(relative_z < -HEIGHT_THRESHOLD) 
+	if (unknown_relative_z)
 	{
-		dot_image = sAvatarBelowImage; 
+		dot_image = sAvatarUnknownImage;
 	}
-	else if(relative_z > HEIGHT_THRESHOLD) 
-	{ 
-		dot_image = sAvatarAboveImage;
+	else
+	{
+		if(relative_z < -HEIGHT_THRESHOLD)
+		{
+			dot_image = sAvatarBelowImage; 
+		}
+		else if(relative_z > HEIGHT_THRESHOLD) 
+		{ 
+			dot_image = sAvatarAboveImage;
+		}
 	}
 	S32 dot_width = llround(dot_radius * 2.f);
 	dot_image->draw(llround(x_pixels - dot_radius),
diff --git a/indra/newview/llworldmapview.h b/indra/newview/llworldmapview.h
index 9ab53b1ba387e6e81932014f87cf51daf9a080a7..a2a6dc53fb5cabd412f0fcfecedefef27c0ca1f3 100644
--- a/indra/newview/llworldmapview.h
+++ b/indra/newview/llworldmapview.h
@@ -112,7 +112,8 @@ class LLWorldMapView : public LLPanel
 								F32 y_pixels, 
 								const LLColor4& color,
 								F32 relative_z = 0.f,
-								F32 dot_radius = 3.f);
+								F32 dot_radius = 3.f,
+								bool reached_max_z = false);
 	static void		drawIconName(F32 x_pixels, 
 									F32 y_pixels, 
 									const LLColor4& color,
@@ -138,6 +139,7 @@ class LLWorldMapView : public LLPanel
 	static LLUIImagePtr	sAvatarLevelImage;
 	static LLUIImagePtr	sAvatarAboveImage;
 	static LLUIImagePtr	sAvatarBelowImage;
+	static LLUIImagePtr	sAvatarUnknownImage;
 
 	static LLUIImagePtr	sTelehubImage;
 	static LLUIImagePtr	sInfohubImage;
diff --git a/indra/newview/skins/default/textures/map_avatar_unknown_32.tga b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga
new file mode 100644
index 0000000000000000000000000000000000000000..d1192478c67cb93677e7942b2f491e1bc413e48b
Binary files /dev/null and b/indra/newview/skins/default/textures/map_avatar_unknown_32.tga differ
diff --git a/indra/newview/skins/default/xui/en/floater_preview_animation.xml b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
index 8427c7b06f228a5c3312c7351b95ef0523126dd7..3ea5f54f2cbd4f4460e3746f4565962df6069466 100644
--- a/indra/newview/skins/default/xui/en/floater_preview_animation.xml
+++ b/indra/newview/skins/default/xui/en/floater_preview_animation.xml
@@ -41,18 +41,26 @@
      label_selected="Stop"
      layout="topleft"
      left="10"
-     name="Anim play btn"
+     name="Inworld"
      tool_tip="Play this animation so that others can see it"
      top="47"
-     width="125" />
+     width="125">
+       <button.commit_callback
+        function="PreviewAnim.Play"
+        parameter="Inworld" /> 
+    </button>
     <button
      height="20"
      label="Play Locally"
      label_selected="Stop"
      layout="topleft"
      left_pad="5"
-     name="Anim audition btn"
+     name="Locally"
      tool_tip="Play this animation so that only you can see it"
      top_delta="0"
-     width="125" />
+     width="125">
+       <button.commit_callback
+        function="PreviewAnim.Play"
+        parameter="Locally" /> 
+    </button>
 </floater>
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 4bc72be49b9a0e49d71ea1dcc3768f893e56b3fe..208f4c2d32d0c467b7f40e5b9fcde8ab4fe6d63a 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -369,6 +369,9 @@ Please try logging in again in a minute.</string>
 	<string name="anim_yes_happy">Yes (Happy)</string>
 	<string name="anim_yes_head">Yes</string>
 
+	<!-- build floater -->
+	<string name="multiple_textures">Multiple</string>
+
 	<!-- world map -->
 	<string name="texture_loading">Loading...</string>
 	<string name="worldmap_offline">Offline</string>