From 24c5ac7417f8b32c39dd5defec21845bd03786c4 Mon Sep 17 00:00:00 2001
From: Jonathan Yap <none@none>
Date: Sat, 4 Jan 2014 10:40:20 -0500
Subject: [PATCH] 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 94c805205ab..95d4265bb46 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 076419e96a0..267aa9532c3 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);
-- 
GitLab