diff options
Diffstat (limited to 'indra/newview')
| -rwxr-xr-x | indra/newview/app_settings/settings.xml | 11 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llagent.cpp | 8 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llagentpilot.cpp | 209 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llagentpilot.h | 47 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llappviewer.cpp | 17 | ||||
| -rw-r--r-- | indra/newview/llchathistory.cpp | 19 | ||||
| -rw-r--r-- | indra/newview/llcolorswatch.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llimview.cpp | 9 | ||||
| -rwxr-xr-x | indra/newview/llstartup.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 10 | ||||
| -rw-r--r-- | indra/newview/llviewermedia.cpp | 5 | ||||
| -rwxr-xr-x[-rw-r--r--] | indra/newview/llviewermenu.cpp | 13 | ||||
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 21 | ||||
| -rw-r--r-- | indra/newview/llviewerobjectlist.h | 1 | ||||
| -rw-r--r-- | indra/newview/llvoavatar.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llvosky.cpp | 35 | ||||
| -rw-r--r-- | indra/newview/llvosky.h | 44 | ||||
| -rw-r--r-- | indra/newview/llworld.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_about_land.xml | 4 | 
20 files changed, 339 insertions, 155 deletions
| diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6f47d9c019..d71b84739c 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10207,6 +10207,17 @@        <key>Value</key>        <string>pilot.txt</string>      </map> +    <key>StatsPilotXMLFile</key> +    <map> +      <key>Comment</key> +      <string>Filename for stats logging extended autopilot path</string> +      <key>Persist</key> +      <integer>1</integer> +      <key>Type</key> +      <string>String</string> +      <key>Value</key> +      <string>pilot.xml</string> +    </map>      <key>StatsQuitAfterRuns</key>      <map>        <key>Comment</key> diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index de7073be24..3f1bf4c5c2 100644..100755 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1213,7 +1213,13 @@ BOOL LLAgent::getBusy() const  //-----------------------------------------------------------------------------  // startAutoPilotGlobal()  //----------------------------------------------------------------------------- -void LLAgent::startAutoPilotGlobal(const LLVector3d &target_global, const std::string& behavior_name, const LLQuaternion *target_rotation, void (*finish_callback)(BOOL, void *),  void *callback_data, F32 stop_distance, F32 rot_threshold) +void LLAgent::startAutoPilotGlobal( +	const LLVector3d &target_global, +	const std::string& behavior_name, +	const LLQuaternion *target_rotation, +	void (*finish_callback)(BOOL, void *), +	void *callback_data, +	F32 stop_distance, F32 rot_threshold)  {  	if (!isAgentAvatarValid())  	{ diff --git a/indra/newview/llagentpilot.cpp b/indra/newview/llagentpilot.cpp index afeba6bdf0..f96db0a5df 100644..100755 --- a/indra/newview/llagentpilot.cpp +++ b/indra/newview/llagentpilot.cpp @@ -34,12 +34,13 @@  #include "llagent.h"  #include "llappviewer.h"  #include "llviewercontrol.h" +#include "llviewercamera.h" +#include "llviewerjoystick.h" +#include "llsdserialize.h" +#include "llsdutil_math.h"  LLAgentPilot gAgentPilot; -BOOL LLAgentPilot::sLoop = TRUE; -BOOL LLAgentPilot::sReplaySession = FALSE; -  LLAgentPilot::LLAgentPilot() :  	mNumRuns(-1),  	mQuitAfterRuns(FALSE), @@ -47,7 +48,10 @@ LLAgentPilot::LLAgentPilot() :  	mLastRecordTime(0.f),  	mStarted(FALSE),  	mPlaying(FALSE), -	mCurrentAction(0) +	mCurrentAction(0), +	mOverrideCamera(FALSE), +	mLoop(TRUE), +	mReplaySession(FALSE)  {  } @@ -55,7 +59,26 @@ LLAgentPilot::~LLAgentPilot()  {  } -void LLAgentPilot::load(const std::string& filename) +void LLAgentPilot::load() +{ +	std::string txt_filename = gSavedSettings.getString("StatsPilotFile"); +	std::string xml_filename = gSavedSettings.getString("StatsPilotXMLFile"); +	if (LLFile::isfile(xml_filename)) +	{ +		loadXML(xml_filename); +	} +	else if (LLFile::isfile(txt_filename)) +	{ +		loadTxt(txt_filename); +	} +	else +	{ +		lldebugs << "no autopilot file found" << llendl; +		return; +	} +} + +void LLAgentPilot::loadTxt(const std::string& filename)  {  	if(filename.empty())  	{ @@ -75,6 +98,7 @@ void LLAgentPilot::load(const std::string& filename)  		llinfos << "Opening pilot file " << filename << llendl;  	} +	mActions.reset();  	S32 num_actions;  	file >> num_actions; @@ -89,10 +113,59 @@ void LLAgentPilot::load(const std::string& filename)  		mActions.put(new_action);  	} +	mOverrideCamera = false; +	  	file.close();  } -void LLAgentPilot::save(const std::string& filename) +void LLAgentPilot::loadXML(const std::string& filename) +{ +	if(filename.empty()) +	{ +		return; +	} +	 +	llifstream file(filename); + +	if (!file) +	{ +		lldebugs << "Couldn't open " << filename +			<< ", aborting agentpilot load!" << llendl; +		return; +	} +	else +	{ +		llinfos << "Opening pilot file " << filename << llendl; +	} + +	mActions.reset(); +	LLSD record; +	while (!file.eof() && LLSDSerialize::fromXML(record, file)) +	{ +		Action action; +		action.mTime = record["time"].asReal(); +		action.mType = (EActionType)record["type"].asInteger(); +		action.mCameraView = record["camera_view"].asReal(); +		action.mTarget = ll_vector3d_from_sd(record["target"]); +		action.mCameraOrigin = ll_vector3_from_sd(record["camera_origin"]); +		action.mCameraXAxis = ll_vector3_from_sd(record["camera_xaxis"]); +		action.mCameraYAxis = ll_vector3_from_sd(record["camera_yaxis"]); +		action.mCameraZAxis = ll_vector3_from_sd(record["camera_zaxis"]); +		mActions.put(action); +	} +	mOverrideCamera = true; +	file.close(); +} + +void LLAgentPilot::save() +{ +	std::string txt_filename = gSavedSettings.getString("StatsPilotFile"); +	std::string xml_filename = gSavedSettings.getString("StatsPilotXMLFile"); +	saveTxt(txt_filename); +	saveXML(xml_filename); +} + +void LLAgentPilot::saveTxt(const std::string& filename)  {  	llofstream file;  	file.open(filename); @@ -108,12 +181,41 @@ void LLAgentPilot::save(const std::string& filename)  	for (i = 0; i < mActions.count(); i++)  	{  		file << mActions[i].mTime << "\t" << mActions[i].mType << "\t"; -		file << std::setprecision(32) << mActions[i].mTarget.mdV[VX] << "\t" << mActions[i].mTarget.mdV[VY] << "\t" << mActions[i].mTarget.mdV[VZ] << '\n'; +		file << std::setprecision(32) << mActions[i].mTarget.mdV[VX] << "\t" << mActions[i].mTarget.mdV[VY] << "\t" << mActions[i].mTarget.mdV[VZ]; +		file << '\n';  	}  	file.close();  } +void LLAgentPilot::saveXML(const std::string& filename) +{ +	llofstream file; +	file.open(filename); + +	if (!file) +	{ +		llinfos << "Couldn't open " << filename << ", aborting agentpilot save!" << llendl; +	} + +	S32 i; +	for (i = 0; i < mActions.count(); i++) +	{ +		Action& action = mActions[i]; +		LLSD record; +		record["time"] = (LLSD::Real)action.mTime; +		record["type"] = (LLSD::Integer)action.mType; +		record["camera_view"] = (LLSD::Real)action.mCameraView; +		record["target"] = ll_sd_from_vector3d(action.mTarget); +		record["camera_origin"] = ll_sd_from_vector3(action.mCameraOrigin); +		record["camera_xaxis"] = ll_sd_from_vector3(action.mCameraXAxis); +		record["camera_yaxis"] = ll_sd_from_vector3(action.mCameraYAxis); +		record["camera_zaxis"] = ll_sd_from_vector3(action.mCameraZAxis); +		LLSDSerialize::toXML(record, file); +	} +	file.close(); +} +  void LLAgentPilot::startRecord()  {  	mActions.reset(); @@ -125,7 +227,7 @@ void LLAgentPilot::startRecord()  void LLAgentPilot::stopRecord()  {  	gAgentPilot.addAction(STRAIGHT); -	gAgentPilot.save(gSavedSettings.getString("StatsPilotFile")); +	gAgentPilot.save();  	mRecording = FALSE;  } @@ -136,6 +238,12 @@ void LLAgentPilot::addAction(enum EActionType action_type)  	action.mType = action_type;  	action.mTarget = gAgent.getPositionGlobal();  	action.mTime = mTimer.getElapsedTimeF32(); +	LLViewerCamera *cam = LLViewerCamera::getInstance(); +	action.mCameraView = cam->getView(); +	action.mCameraOrigin = cam->getOrigin(); +	action.mCameraXAxis = cam->getXAxis(); +	action.mCameraYAxis = cam->getYAxis(); +	action.mCameraZAxis = cam->getZAxis();  	mLastRecordTime = (F32)action.mTime;  	mActions.put(action);  } @@ -151,7 +259,13 @@ void LLAgentPilot::startPlayback()  		if (mActions.count())  		{  			llinfos << "Starting playback, moving to waypoint 0" << llendl; +			if (getOverrideCamera() && +				!LLViewerJoystick::getInstance()->getOverrideCamera())	 +			{ +				LLViewerJoystick::getInstance()->toggleFlycam(); +			}  			gAgent.startAutoPilotGlobal(mActions[0].mTarget); +			moveCamera();  			mStarted = FALSE;  		}  		else @@ -172,13 +286,52 @@ void LLAgentPilot::stopPlayback()  		gAgent.stopAutoPilot();  	} -	if (sReplaySession) +	if (mReplaySession)  	{  		LLAppViewer::instance()->forceQuit();  	}  } -#define SKIP_PILOT_LOGGING 1 +void LLAgentPilot::moveCamera() +{ +	if (!getOverrideCamera()) +		return; + +	if (mCurrentAction<mActions.count()) +	{ +		S32 start_index = llmax(mCurrentAction-1,0); +		S32 end_index = mCurrentAction; +		F32 t = 0.0; +		F32 timedelta = mActions[end_index].mTime - mActions[start_index].mTime; +		F32 tickelapsed = mTimer.getElapsedTimeF32()-mActions[start_index].mTime; +		if (timedelta > 0.0) +		{ +			t = tickelapsed/timedelta; +		} + +		if ((t<0.0)||(t>1.0)) +		{ +			llwarns << "mCurrentAction is invalid, t = " << t << llendl; +			return; +		} +		 +		Action& start = mActions[start_index]; +		Action& end = mActions[end_index]; + +		F32 view = lerp(start.mCameraView, end.mCameraView, t); +		LLVector3 origin = lerp(start.mCameraOrigin, end.mCameraOrigin, t); +		LLQuaternion start_quat(start.mCameraXAxis, start.mCameraYAxis, start.mCameraZAxis); +		LLQuaternion end_quat(end.mCameraXAxis, end.mCameraYAxis, end.mCameraZAxis); +		LLQuaternion quat = nlerp(t, start_quat, end_quat); +		LLMatrix3 mat(quat); +	 +		LLViewerCamera::getInstance()->setView(view); +		LLViewerCamera::getInstance()->setOrigin(origin); +		LLViewerCamera::getInstance()->mXAxis = LLVector3(mat.mMatrix[0]); +		LLViewerCamera::getInstance()->mYAxis = LLVector3(mat.mMatrix[1]); +		LLViewerCamera::getInstance()->mZAxis = LLVector3(mat.mMatrix[2]); +	} +}  void LLAgentPilot::updateTarget()  { @@ -197,9 +350,7 @@ void LLAgentPilot::updateTarget()  				{  					if (!mStarted)  					{ -#if SKIP_PILOT_LOGGING  						llinfos << "At start, beginning playback" << llendl; -#endif  						mTimer.reset();  						mStarted = TRUE;  					} @@ -213,32 +364,27 @@ void LLAgentPilot::updateTarget()  				if (mCurrentAction < mActions.count())  				{  					gAgent.startAutoPilotGlobal(mActions[mCurrentAction].mTarget); +					moveCamera();  				}  				else  				{  					stopPlayback();  					mNumRuns--; -					if (sLoop) +					if (mLoop)  					{  						if ((mNumRuns < 0) || (mNumRuns > 0))  						{ -#if SKIP_PILOT_LOGGING  							llinfos << "Looping, restarting playback" << llendl; -#endif  							startPlayback();  						}  						else if (mQuitAfterRuns)  						{ -#if SKIP_PILOT_LOGGING  							llinfos << "Done with all runs, quitting viewer!" << llendl; -#endif  							LLAppViewer::instance()->forceQuit();  						}  						else  						{ -#if SKIP_PILOT_LOGGING  							llinfos << "Done with all runs, disabling pilot" << llendl; -#endif  							stopPlayback();  						}  					} @@ -259,29 +405,8 @@ void LLAgentPilot::updateTarget()  	}  } -// static -void LLAgentPilot::startRecord(void *) -{ -	gAgentPilot.startRecord(); -} - -void LLAgentPilot::saveRecord(void *) +void LLAgentPilot::addWaypoint()  { -	gAgentPilot.stopRecord(); -} - -void LLAgentPilot::addWaypoint(void *) -{ -	gAgentPilot.addAction(STRAIGHT); -} - -void LLAgentPilot::startPlayback(void *) -{ -	gAgentPilot.mNumRuns = -1; -	gAgentPilot.startPlayback(); +	addAction(STRAIGHT);  } -void LLAgentPilot::stopPlayback(void *) -{ -	gAgentPilot.stopPlayback(); -} diff --git a/indra/newview/llagentpilot.h b/indra/newview/llagentpilot.h index f3d34246ae..dd1709ec0c 100644..100755 --- a/indra/newview/llagentpilot.h +++ b/indra/newview/llagentpilot.h @@ -46,8 +46,12 @@ public:  	LLAgentPilot();  	virtual ~LLAgentPilot(); -	void load(const std::string& filename); -	void save(const std::string& filename); +	void load(); +	void loadTxt(const std::string& filename); +	void loadXML(const std::string& filename); +	void save(); +	void saveTxt(const std::string& filename); +	void saveXML(const std::string& filename);  	void startRecord();  	void stopRecord(); @@ -56,19 +60,34 @@ public:  	void startPlayback();  	void stopPlayback(); +	bool isRecording() { return mRecording; } +	bool isPlaying() { return mPlaying; } +	bool getOverrideCamera() { return mOverrideCamera; } +	  	void updateTarget(); -	static void startRecord(void *); -	static void addWaypoint(void *); -	static void saveRecord(void *); -	static void startPlayback(void *); -	static void stopPlayback(void *); -	static BOOL	sLoop; -	static BOOL sReplaySession; +	void addWaypoint(); +	void moveCamera(); + +	void setReplaySession(BOOL new_val) { mReplaySession = new_val; } +	BOOL getReplaySession() { return mReplaySession; } + +	void setLoop(BOOL new_val) { mLoop = new_val; } +	BOOL getLoop() { return mLoop; } + +	void setQuitAfterRuns(BOOL quit_val) { mQuitAfterRuns = quit_val; } +	void setNumRuns(S32 num_runs) { mNumRuns = num_runs; } +	 +private: + + + +	BOOL	mLoop; +	BOOL 	mReplaySession;  	S32		mNumRuns;  	BOOL	mQuitAfterRuns; -private: +  	void setAutopilotTarget(const S32 id);  	BOOL	mRecording; @@ -78,6 +97,8 @@ private:  	BOOL	mPlaying;  	S32		mCurrentAction; +	BOOL	mOverrideCamera; +  	class Action  	{  	public: @@ -85,10 +106,16 @@ private:  		EActionType		mType;  		LLVector3d		mTarget;  		F64				mTime; +		F32				mCameraView; +		LLVector3		mCameraOrigin; +		LLVector3		mCameraXAxis; +		LLVector3		mCameraYAxis; +		LLVector3		mCameraZAxis;  	};  	LLDynamicArray<Action>	mActions;  	LLTimer					mTimer; +  };  extern LLAgentPilot gAgentPilot; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c1a311b170..0118d2dfc1 100644..100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -468,8 +468,8 @@ static void settings_to_globals()  	LLSelectMgr::sRenderHiddenSelections = gSavedSettings.getBOOL("RenderHiddenSelections");  	LLSelectMgr::sRenderLightRadius = gSavedSettings.getBOOL("RenderLightRadius"); -	gAgentPilot.mNumRuns		= gSavedSettings.getS32("StatsNumRuns"); -	gAgentPilot.mQuitAfterRuns	= gSavedSettings.getBOOL("StatsQuitAfterRuns"); +	gAgentPilot.setNumRuns(gSavedSettings.getS32("StatsNumRuns")); +	gAgentPilot.setQuitAfterRuns(gSavedSettings.getBOOL("StatsQuitAfterRuns"));  	gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle"));  	gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); @@ -2289,7 +2289,7 @@ bool LLAppViewer::initConfiguration()  	if (clp.hasOption("replaysession"))  	{ -		LLAgentPilot::sReplaySession = TRUE; +		gAgentPilot.setReplaySession(TRUE);  	}  	if (clp.hasOption("nonotifications")) @@ -4221,8 +4221,15 @@ void LLAppViewer::idle()  	}  	if (LLViewerJoystick::getInstance()->getOverrideCamera()) -	{ -		LLViewerJoystick::getInstance()->moveFlycam(); +	{  +		if (gAgentPilot.isPlaying() && gAgentPilot.getOverrideCamera()) +		{ +			gAgentPilot.moveCamera(); +		} +		else +		{ +			LLViewerJoystick::getInstance()->moveFlycam(); +		}  	}  	else  	{ diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index c98bcbda45..5ff22f89ab 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -899,31 +899,14 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL  				}  			} -			LLTextEditor* text_editor = notify_box->getChild<LLTextEditor>("text_editor_box", TRUE); -			S32 text_heigth = 0; -			if(text_editor != NULL) -			{ -				text_heigth = text_editor->getTextBoundingRect().getHeight(); -			} -  			//Prepare the rect for the view  			LLRect target_rect = mEditor->getDocumentView()->getRect();  			// squeeze down the widget by subtracting padding off left and right  			target_rect.mLeft += mLeftWidgetPad + mEditor->getHPad();  			target_rect.mRight -= mRightWidgetPad; -			notify_box->reshape(target_rect.getWidth(), -					notify_box->getRect().getHeight()); +			notify_box->reshape(target_rect.getWidth(),	notify_box->getRect().getHeight());  			notify_box->setOrigin(target_rect.mLeft, notify_box->getRect().mBottom); -			if (text_editor != NULL) -			{ -				S32 text_heigth_delta = -						text_editor->getTextBoundingRect().getHeight() -								- text_heigth; -				notify_box->reshape(target_rect.getWidth(), -								notify_box->getRect().getHeight() + text_heigth_delta); -			} -  			LLInlineViewSegment::Params params;  			params.view = notify_box;  			params.left_pad = mLeftWidgetPad; diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index 6f02192d0a..d77ebc5367 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -185,6 +185,10 @@ BOOL LLColorSwatchCtrl::handleMouseUp(S32 x, S32 y, MASK mask)  			llassert(getEnabled());  			llassert(getVisible()); +			// Focus the widget now in order to return the focus +			// after the color picker is closed. +			setFocus(TRUE); +  			showPicker(FALSE);  		}  	} diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 9623554200..0ef502b81b 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -2719,6 +2719,15 @@ void LLIMMgr::inviteToSession(  		{  			LLFloaterReg::showInstance("incoming_call", payload, FALSE);  		} +		 +		// Add the caller to the Recent List here (at this point  +		// "incoming_call" floater is shown and the recipient can +		// reject the call), because even if a recipient will reject +		// the call, the caller should be added to the recent list +		// anyway. STORM-507. +		if(type == IM_SESSION_P2P_INVITE) +			LLRecentPeople::instance().add(caller_id); +		  		mPendingInvitations[session_id.asString()] = LLSD();  	}  } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c6efaf4afe..b98cbd5b78 100755 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -424,7 +424,7 @@ bool idle_startup()  		//  		// Load autopilot and stats stuff -		gAgentPilot.load(gSavedSettings.getString("StatsPilotFile")); +		gAgentPilot.load();  		//gErrorStream.setTime(gSavedSettings.getBOOL("LogTimestamps")); @@ -1989,7 +1989,7 @@ bool idle_startup()  		}  		// Start automatic replay if the flag is set. -		if (gSavedSettings.getBOOL("StatsAutoRun") || LLAgentPilot::sReplaySession) +		if (gSavedSettings.getBOOL("StatsAutoRun") || gAgentPilot.getReplaySession())  		{  			LLUUID id;  			LL_DEBUGS("AppInit") << "Starting automatic playback" << LL_ENDL; diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index 3f7dc24ade..fa91f129b8 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -563,7 +563,17 @@ void LLIMToastNotifyPanel::reshape(S32 width, S32 height, BOOL called_from_paren  	height = rc.getHeight();  	width = rc.getWidth(); +	bool is_width_changed = width != getRect().getWidth(); +  	LLToastPanel::reshape(width, height, called_from_parent); + +	// Notification height required to display the text message depends on +	// the width of the text box thus if panel width is changed the text box +	// width is also changed then reshape() is called to adjust proper height. +	if (is_width_changed) +	{ +		reshape(width, height, called_from_parent); +	}  }  // EOF diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index b36b5aa9ee..fcd9141269 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -53,7 +53,7 @@  #include "llwebsharing.h"	// For LLWebSharing::setOpenIDCookie(), *TODO: find a better way to do this!  #include "llfilepicker.h"  #include "llnotifications.h" - +#include "lldir_win32.h"  #include "llevent.h"		// LLSimpleListener  #include "llnotificationsutil.h"  #include "lluuid.h" @@ -1766,7 +1766,8 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_  			media_source->setTarget(target); -			if (media_source->init(launcher_name, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins"))) +			const std::string plugin_dir = gDirUtilp->getLLPluginDir(); +			if (media_source->init(launcher_name, plugin_dir, plugin_name, gSavedSettings.getBOOL("PluginAttachDebuggerToPlugins")))  			{  				return media_source;  			} diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e9e0268587..eb022851e7 100644..100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1901,19 +1901,20 @@ class LLAdvancedAgentPilot : public view_listener_t  		std::string command = userdata.asString();  		if ("start playback" == command)  		{ -			LLAgentPilot::startPlayback(NULL); +			gAgentPilot.setNumRuns(-1); +			gAgentPilot.startPlayback();  		}  		else if ("stop playback" == command)  		{ -			LLAgentPilot::stopPlayback(NULL); +			gAgentPilot.stopPlayback();  		}  		else if ("start record" == command)  		{ -			LLAgentPilot::startRecord(NULL); +			gAgentPilot.startRecord();  		}  		else if ("stop record" == command)  		{ -			LLAgentPilot::saveRecord(NULL); +			gAgentPilot.stopRecord();  		}  		return true; @@ -1931,7 +1932,7 @@ class LLAdvancedToggleAgentPilotLoop : public view_listener_t  {  	bool handleEvent(const LLSD& userdata)  	{ -		LLAgentPilot::sLoop = !(LLAgentPilot::sLoop); +		gAgentPilot.setLoop(!gAgentPilot.getLoop());  		return true;  	}  }; @@ -1940,7 +1941,7 @@ class LLAdvancedCheckAgentPilotLoop : public view_listener_t  {  	bool handleEvent(const LLSD& userdata)  	{ -		bool new_value = LLAgentPilot::sLoop; +		bool new_value = gAgentPilot.getLoop();  		return new_value;  	}  }; diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index d723fc0a8e..bcdc774c5e 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -487,7 +487,6 @@ void LLViewerObject::initVOClasses()  	llinfos << "Viewer Object size: " << sizeof(LLViewerObject) << llendl;  	LLVOGrass::initClass();  	LLVOWater::initClass(); -	LLVOSky::initClass();  	LLVOVolume::initClass();  } @@ -3033,6 +3032,8 @@ void LLViewerObject::setScale(const LLVector3 &scale, BOOL damped)  		{  			if (!mOnMap)  			{ +				llassert_always(LLWorld::getInstance()->getRegionFromHandle(getRegion()->getHandle())); +  				gObjectList.addToMap(this);  				mOnMap = TRUE;  			} @@ -3674,8 +3675,8 @@ void LLViewerObject::setPositionParent(const LLVector3 &pos_parent, BOOL damped)  	// Set position relative to parent, if no parent, relative to region  	if (!isRoot())  	{ -		LLViewerObject::setPosition(pos_parent); -		updateDrawable(damped); +		LLViewerObject::setPosition(pos_parent, damped); +		//updateDrawable(damped);  	}  	else  	{ @@ -3716,6 +3717,7 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)  		LLVector3 position_offset = getPosition() * getParent()->getRotation();  		((LLViewerObject *)getParent())->setPositionEdit(pos_edit - position_offset); +		updateDrawable(damped);  	}  	else if (isJointChild())  	{ @@ -3724,15 +3726,14 @@ void LLViewerObject::setPositionEdit(const LLVector3 &pos_edit, BOOL damped)  		LLQuaternion inv_parent_rot = parent->getRotation();  		inv_parent_rot.transQuat();  		LLVector3 pos_parent = (pos_edit - parent->getPositionRegion()) * inv_parent_rot; -		LLViewerObject::setPosition(pos_parent); +		LLViewerObject::setPosition(pos_parent, damped);  	}  	else  	{ -		LLViewerObject::setPosition(pos_edit); +		LLViewerObject::setPosition(pos_edit, damped);  		mPositionRegion = pos_edit;  		mPositionAgent = mRegionp->getPosAgentFromRegion(mPositionRegion); -	} -	updateDrawable(damped); +	}	  } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 8c3bf5bf12..4f71f8ea87 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1490,6 +1490,22 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)  	LLWorld::getInstance()->shiftRegions(offset);  } +//debug code +bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp)  +{ +	for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) +	{ +		LLViewerObject* objectp = *iter; + +		if(objectp->isDead() || objectp->getRegion() == regionp) +		{ +			return true ; +		} +	} + +	return false ; +} +  void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)  {  	LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1508,6 +1524,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)  	for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter)  	{  		LLViewerObject* objectp = *iter; + +		llassert_always(!objectp->isDead()); +  		if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment())  		{  			continue; @@ -1795,7 +1814,7 @@ LLViewerObject *LLViewerObjectList::replaceObject(const LLUUID &id, const LLPCod  	LLViewerObject *old_instance = findObject(id);  	if (old_instance)  	{ -		cleanupReferences(old_instance); +		//cleanupReferences(old_instance);  		old_instance->markDead();  		return createObject(pcode, regionp, id, old_instance->getLocalID(), LLHost()); diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h index 7d0653b3b4..4830f5912b 100644 --- a/indra/newview/llviewerobjectlist.h +++ b/indra/newview/llviewerobjectlist.h @@ -103,6 +103,7 @@ public:  	void shiftObjects(const LLVector3 &offset); +	bool hasMapObjectInRegion(LLViewerRegion* regionp) ;  	void renderObjectsForMap(LLNetMap &netmap);  	void renderObjectBounds(const LLVector3 ¢er); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index ec264b1f07..a257703b24 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -602,16 +602,16 @@ F32 LLVOAvatar::sRenderDistance = 256.f;  S32	LLVOAvatar::sNumVisibleAvatars = 0;  S32	LLVOAvatar::sNumLODChangesThisFrame = 0; -const LLUUID LLVOAvatar::sStepSoundOnLand = LLUUID("e8af4a28-aa83-4310-a7c4-c047e15ea0df"); +const LLUUID LLVOAvatar::sStepSoundOnLand("e8af4a28-aa83-4310-a7c4-c047e15ea0df");  const LLUUID LLVOAvatar::sStepSounds[LL_MCODE_END] =  { -	LLUUID(SND_STONE_RUBBER), -	LLUUID(SND_METAL_RUBBER), -	LLUUID(SND_GLASS_RUBBER), -	LLUUID(SND_WOOD_RUBBER), -	LLUUID(SND_FLESH_RUBBER), -	LLUUID(SND_RUBBER_PLASTIC), -	LLUUID(SND_RUBBER_RUBBER) +	SND_STONE_RUBBER, +	SND_METAL_RUBBER, +	SND_GLASS_RUBBER, +	SND_WOOD_RUBBER, +	SND_FLESH_RUBBER, +	SND_RUBBER_PLASTIC, +	SND_RUBBER_RUBBER  };  S32 LLVOAvatar::sRenderName = RENDER_NAME_ALWAYS; diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 7ae8c2c07d..80f43e51d2 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -77,9 +77,6 @@ static const LLVector2 TEX11 = LLVector2(1.f, 1.f);  LLUUID gSunTextureID = IMG_SUN;  LLUUID gMoonTextureID = IMG_MOON; -//static  -LLColor3 LLHaze::sAirScaSeaLevel; -  class LLFastLn  {  public: @@ -182,6 +179,23 @@ inline void color_gamma_correct(LLColor3 &col)  	}  } +static LLColor3 calc_air_sca_sea_level() +{ +	static LLColor3 WAVE_LEN(675, 520, 445); +	static LLColor3 refr_ind = refr_ind_calc(WAVE_LEN); +	static LLColor3 n21 = refr_ind * refr_ind - LLColor3(1, 1, 1); +	static LLColor3 n4 = n21 * n21; +	static LLColor3 wl2 = WAVE_LEN * WAVE_LEN * 1e-6f; +	static LLColor3 wl4 = wl2 * wl2; +	static LLColor3 mult_const = fsigma * 2.0f/ 3.0f * 1e24f * (F_PI * F_PI) * n4; +	static F32 dens_div_N = F32( ATM_SEA_LEVEL_NDENS / Ndens2); +	return dens_div_N * color_div ( mult_const, wl4 ); +} + +// static constants. +LLColor3 const LLHaze::sAirScaSeaLevel = calc_air_sca_sea_level(); +F32 const LLHaze::sAirScaIntense = color_intens(LLHaze::sAirScaSeaLevel);	 +F32 const LLHaze::sAirScaAvg = LLHaze::sAirScaIntense / 3.f;  /*************************************** @@ -394,12 +408,6 @@ LLVOSky::~LLVOSky()  	mCubeMap = NULL;  } -void LLVOSky::initClass() -{ -	LLHaze::initClass(); -} - -  void LLVOSky::init()  {     	const F32 haze_int = color_intens(mHaze.calcSigSca(0)); @@ -2147,17 +2155,8 @@ void LLVOSky::updateFog(const F32 distance)  	stop_glerror();  } -// static -void LLHaze::initClass() -{ -	sAirScaSeaLevel = LLHaze::calcAirScaSeaLevel(); -} - -  // Functions used a lot. - -  F32 color_norm_pow(LLColor3& col, F32 e, BOOL postmultiply)  {  	F32 mv = color_max(col); diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index 6b3e7873a1..d3a42583ea 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -292,23 +292,6 @@ LL_FORCE_INLINE LLColor3 refr_ind_calc(const LLColor3 &wave_length)  } -LL_FORCE_INLINE LLColor3 calc_air_sca_sea_level() -{ -	const static LLColor3 WAVE_LEN(675, 520, 445); -	const static LLColor3 refr_ind = refr_ind_calc(WAVE_LEN); -	const static LLColor3 n21 = refr_ind * refr_ind - LLColor3(1, 1, 1); -	const static LLColor3 n4 = n21 * n21; -	const static LLColor3 wl2 = WAVE_LEN * WAVE_LEN * 1e-6f; -	const static LLColor3 wl4 = wl2 * wl2; -	const static LLColor3 mult_const = fsigma * 2.0f/ 3.0f * 1e24f * (F_PI * F_PI) * n4; -	const static F32 dens_div_N = F32( ATM_SEA_LEVEL_NDENS / Ndens2); -	return dens_div_N * color_div ( mult_const, wl4 ); -} - -const LLColor3 gAirScaSeaLevel = calc_air_sca_sea_level(); -const F32 AIR_SCA_INTENS = color_intens(gAirScaSeaLevel);	 -const F32 AIR_SCA_AVG = AIR_SCA_INTENS / 3.f; -  class LLHaze  {  public: @@ -316,18 +299,15 @@ public:  	LLHaze(const F32 g, const LLColor3& sca, const F32 fo = 2.f) :   			mG(g), mSigSca(0.25f/F_PI * sca), mFalloff(fo), mAbsCoef(0.f)  	{ -		mAbsCoef = color_intens(mSigSca) / AIR_SCA_INTENS; +		mAbsCoef = color_intens(mSigSca) / sAirScaIntense;  	}  	LLHaze(const F32 g, const F32 sca, const F32 fo = 2.f) : mG(g),  			mSigSca(0.25f/F_PI * LLColor3(sca, sca, sca)), mFalloff(fo)  	{ -		mAbsCoef = 0.01f * sca / AIR_SCA_AVG; +		mAbsCoef = 0.01f * sca / sAirScaAvg;  	} -	static void initClass(); - -  	F32 getG() const				{ return mG; }  	void setG(const F32 g) @@ -343,12 +323,12 @@ public:  	void setSigSca(const LLColor3& s)  	{  		mSigSca = s; -		mAbsCoef = 0.01f * color_intens(mSigSca) / AIR_SCA_INTENS; +		mAbsCoef = 0.01f * color_intens(mSigSca) / sAirScaIntense;  	}  	void setSigSca(const F32 s0, const F32 s1, const F32 s2)  	{ -		mSigSca = AIR_SCA_AVG * LLColor3 (s0, s1, s2); +		mSigSca = sAirScaAvg * LLColor3 (s0, s1, s2);  		mAbsCoef = 0.01f * (s0 + s1 + s2) / 3;  	} @@ -392,10 +372,11 @@ public:  	static inline LLColor3 calcAirSca(const F32 h);  	static inline void calcAirSca(const F32 h, LLColor3 &result); -	static LLColor3 calcAirScaSeaLevel()			{ return gAirScaSeaLevel; } -	static const LLColor3 &getAirScaSeaLevel()		{ return sAirScaSeaLevel; } -public: -	static LLColor3 sAirScaSeaLevel; + +private: +	static LLColor3 const sAirScaSeaLevel; +	static F32 const sAirScaIntense; +	static F32 const sAirScaAvg;  protected:  	F32			mG; @@ -473,7 +454,6 @@ public:  	LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);  	// Initialize/delete data that's only inited once per class. -	static void initClass();  	void init();  	void initCubeMap();  	void initEmpty(); @@ -654,14 +634,12 @@ F32 color_norm_pow(LLColor3& col, F32 e, BOOL postmultiply = FALSE);  inline LLColor3 LLHaze::calcAirSca(const F32 h)  { -	static const LLColor3 air_sca_sea_level = calcAirScaSeaLevel(); -	return calcFalloff(h) * air_sca_sea_level; +	return calcFalloff(h) * sAirScaSeaLevel;  }  inline void LLHaze::calcAirSca(const F32 h, LLColor3 &result)  { -	static const LLColor3 air_sca_sea_level = calcAirScaSeaLevel(); -	result = air_sca_sea_level; +	result = sAirScaSeaLevel;  	result *= calcFalloff(h);  } diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 146bab0c0a..85871f21d6 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -281,6 +281,8 @@ void LLWorld::removeRegion(const LLHost &host)  	delete regionp;  	updateWaterObjects(); + +	llassert_always(!gObjectList.hasMapObjectInRegion(regionp)) ;  } diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 3dd6c60095..937a97797d 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1905,7 +1905,7 @@ Only large parcels can be listed in search.  			</panel.string>        <panel.string         name="allow_public_access"> -        Allow Public Access ([MATURITY]) +        Allow Public Access ([MATURITY]) (Note: Unchecking this will create ban lines)        </panel.string>              <panel.string               name="estate_override"> @@ -1932,7 +1932,7 @@ Only large parcels can be listed in search.               name="public_access"               top_pad="5"               label_text.valign="center" -             label_text.v_pad="-7"  +             label_text.v_pad="-2"                width="278" />              <text               type="string" | 
