diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2ef4170c4..54e821648 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -2,6 +2,39 @@ + AscentDisplayTotalScriptJumps + + Comment + Shows large changes to the sim script count in chat. + Persist + 1 + Type + Boolean + Value + 1 + + Ascentnumscriptdiff + + Comment + The delta to spam you the script jump difference + Persist + 1 + Type + F32 + Value + 100.0 + + Ascentnumscripts + + Comment + temp.. + Persist + 0 + Type + F32 + Value + 0.0 + AscentBuildAlwaysEnabled Comment diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 7cfe81997..8f6852661 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1783,12 +1783,12 @@ void LLAgent::setCameraZoomFraction(F32 fraction) // 0.f -> camera zoomed all the way out // 1.f -> camera zoomed all the way in LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); - + BOOL disable_min = gSavedSettings.getBOOL("AscentDisableMinZoomDist"); if (selection->getObjectCount() && selection->getSelectType() == SELECT_TYPE_HUD) { mHUDTargetZoom = fraction; } - else if (mFocusOnAvatar && cameraThirdPerson()) + else if (mFocusOnAvatar && cameraThirdPerson() && !disable_min) { mCameraZoomFraction = rescale(fraction, 0.f, 1.f, MAX_ZOOM_FRACTION, MIN_ZOOM_FRACTION); } @@ -1801,12 +1801,12 @@ void LLAgent::setCameraZoomFraction(F32 fraction) else { F32 min_zoom = LAND_MIN_ZOOM; - const F32 DIST_FUDGE = 16.f; // meters - F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE, - LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE, - MAX_CAMERA_DISTANCE_FROM_AGENT); + //const F32 DIST_FUDGE = 16.f; // meters + //F32 max_zoom = llmin(mDrawDistance - DIST_FUDGE, + // LLWorld::getInstance()->getRegionWidthInMeters() - DIST_FUDGE, + // MAX_CAMERA_DISTANCE_FROM_AGENT); - if (mFocusObject.notNull()) + if (!disable_min) { if (mFocusObject.notNull()) { @@ -1820,10 +1820,14 @@ void LLAgent::setCameraZoomFraction(F32 fraction) } } } - + else + { + min_zoom = 0.f; + } LLVector3d camera_offset_dir = mCameraFocusOffsetTarget; camera_offset_dir.normalize(); - mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom); + //mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 1.f, max_zoom, min_zoom); + mCameraFocusOffsetTarget = camera_offset_dir * rescale(fraction, 0.f, 65535.*4., 1.f, min_zoom); } startCameraAnimation(); } @@ -1903,7 +1907,7 @@ void LLAgent::cameraZoomIn(const F32 fraction) LLVector3d camera_offset(mCameraFocusOffsetTarget); LLVector3d camera_offset_unit(mCameraFocusOffsetTarget); - F32 min_zoom = LAND_MIN_ZOOM; + F32 min_zoom = 0.f;//LAND_MIN_ZOOM; F32 current_distance = (F32)camera_offset_unit.normalize(); F32 new_distance = current_distance * fraction; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 8199adb9c..2a16f1377 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3805,6 +3805,25 @@ void process_sim_stats(LLMessageSystem *msg, void **user_data) LLViewerStats::getInstance()->mSimChildAgents.addValue(stat_value); break; case LL_SIM_STAT_NUMSCRIPTSACTIVE: + if (gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps")) + { + if(abs(stat_value-gSavedSettings.getF32("Ascentnumscripts"))>gSavedSettings.getF32("Ascentnumscriptdiff")) + { + LLChat chat; + std::stringstream os; + os << (U32)gSavedSettings.getF32("Ascentnumscripts"); + std::stringstream ns; + ns << (U32)stat_value; + std::stringstream diff; + S32 tdiff = (stat_value-gSavedSettings.getF32("Ascentnumscripts")); + diff << tdiff; + std::string change_type = ""; + if (tdiff > 0) change_type = "+"; + chat.mText = "Total scripts jumped from " + os.str() + " to " + ns.str() + " ("+change_type+diff.str()+")"; + LLFloaterChat::addChat(chat, FALSE,FALSE); + } + gSavedSettings.setF32("Ascentnumscripts",stat_value); + } LLViewerStats::getInstance()->mSimActiveScripts.addValue(stat_value); break; case LL_SIM_STAT_SCRIPT_EPS: