diff options
Diffstat (limited to 'indra/newview')
24 files changed, 70 insertions, 156 deletions
diff --git a/indra/newview/app_settings/keywords.ini b/indra/newview/app_settings/keywords.ini index b5f105439c..82b43432eb 100644 --- a/indra/newview/app_settings/keywords.ini +++ b/indra/newview/app_settings/keywords.ini @@ -603,9 +603,11 @@ return Leave current function or event handler # Comment [one_sided_delimiter .8, .3, .15] // Comment:Non-functional commentary or disabled code +[two_sided_delimiter .8, .3, .15] +/* */ Comment:Non-functional commentary or disabled code # String literals -[two_sided_delimiter 0, .2, 0] +[double_quotation_marks 0, .2, 0] " String literal #functions are supplied by the program now diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 3c53a9d44c..9f01674efe 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4257,7 +4257,7 @@ <key>Type</key> <string>Boolean</string> <key>Value</key> - <integer>1</integer> + <integer>0</integer> </map> <key>InventoryDisplayOutbox</key> <map> diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 9ad313a9a7..9ad313a9a7 100644..100755 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index ecfd101eeb..dc88c81d6a 100644..100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2825,48 +2825,15 @@ void LLAppViewer::initUpdater() void LLAppViewer::checkForCrash(void) { - #if LL_SEND_CRASH_REPORTS if (gLastExecEvent == LAST_EXEC_FROZE) { - llinfos << "Last execution froze, requesting to send crash report." << llendl; - // - // Pop up a freeze or crash warning dialog - // - S32 choice; - const S32 cb = gCrashSettings.getS32("CrashSubmitBehavior"); - if(cb == CRASH_BEHAVIOR_ASK) - { - std::ostringstream msg; - msg << LLTrans::getString("MBFrozenCrashed"); - std::string alert = LLTrans::getString("APP_NAME") + " " + LLTrans::getString("MBAlert"); - choice = OSMessageBox(msg.str(), - alert, - OSMB_YESNO); - } - else if(cb == CRASH_BEHAVIOR_NEVER_SEND) - { - choice = OSBTN_NO; - } - else - { - choice = OSBTN_YES; - } - - if (OSBTN_YES == choice) - { - llinfos << "Sending crash report." << llendl; + llinfos << "Last execution froze, sending a crash report." << llendl; - bool report_freeze = true; - handleCrashReporting(report_freeze); - } - else - { - llinfos << "Not sending crash report." << llendl; - } + bool report_freeze = true; + handleCrashReporting(report_freeze); } #endif // LL_SEND_CRASH_REPORTS - } // diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 22f500ba15..83fb887d81 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -384,6 +384,9 @@ void LLFloaterAbout::setSupportText(const std::string& server_release_notes_url) // Render the LLSD from getInfo() as a format_map_t LLStringUtil::format_map_t args; + // allow the "Release Notes" URL label to be localized + args["ReleaseNotes"] = LLTrans::getString("ReleaseNotes"); + for (LLSD::map_const_iterator ii(info.beginMap()), iend(info.endMap()); ii != iend; ++ii) { diff --git a/indra/newview/llglsandbox.cpp b/indra/newview/llglsandbox.cpp index fa3f546157..2b9c113a72 100644 --- a/indra/newview/llglsandbox.cpp +++ b/indra/newview/llglsandbox.cpp @@ -240,7 +240,7 @@ void LLToolSelectRect::handleRectangleSelection(S32 x, S32 y, MASK mask) gViewerWindow->setup3DRender(); } -const F32 WIND_ALTITUDE = 180.f; +const F32 WIND_RELATIVE_ALTITUDE = 25.f; void LLWind::renderVectors() { @@ -254,13 +254,13 @@ void LLWind::renderVectors() gGL.pushMatrix(); LLVector3 origin_agent; origin_agent = gAgent.getPosAgentFromGlobal(mOriginGlobal); - gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], WIND_ALTITUDE); + gGL.translatef(origin_agent.mV[VX], origin_agent.mV[VY], gAgent.getPositionAgent().mV[VZ] + WIND_RELATIVE_ALTITUDE); for (j = 0; j < mSize; j++) { for (i = 0; i < mSize; i++) { - x = mCloudVelX[i + j*mSize] * WIND_SCALE_HACK; - y = mCloudVelY[i + j*mSize] * WIND_SCALE_HACK; + x = mVelX[i + j*mSize] * WIND_SCALE_HACK; + y = mVelY[i + j*mSize] * WIND_SCALE_HACK; gGL.pushMatrix(); gGL.translatef((F32)i * region_width_meters/mSize, (F32)j * region_width_meters/mSize, 0.0); gGL.color3f(0,1,0); diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index 619d17efad..5d2cebe031 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -72,7 +72,8 @@ LLToolBarView::LLToolBarView(const LLToolBarView::Params& p) mToolbarRight(NULL), mToolbarBottom(NULL), mDragStarted(false), - mDragToolbarButton(NULL) + mDragToolbarButton(NULL), + mToolbarsLoaded(false) { } @@ -240,6 +241,7 @@ bool LLToolBarView::loadToolbars(bool force_default) } } } + mToolbarsLoaded = true; return true; } @@ -251,6 +253,10 @@ bool LLToolBarView::loadDefaultToolbars() if (gToolBarView) { retval = gToolBarView->loadToolbars(true); + if (retval) + { + gToolBarView->saveToolbars(); + } } return retval; @@ -258,6 +264,9 @@ bool LLToolBarView::loadDefaultToolbars() void LLToolBarView::saveToolbars() const { + if (!mToolbarsLoaded) + return; + // Build the parameter tree from the toolbar data LLToolBarView::ToolbarSet toolbar_set; if (mToolbarLeft) @@ -440,6 +449,9 @@ BOOL LLToolBarView::handleDropTool( void* cargo_data, S32 x, S32 y, LLToolBar* t int new_rank = toolbar->getRankFromPosition(x,y); toolbar->addCommand(command_id, new_rank); } + + // Save the new toolbars configuration + gToolBarView->saveToolbars(); } else { diff --git a/indra/newview/lltoolbarview.h b/indra/newview/lltoolbarview.h index 60ad6316f8..2b26db3802 100644 --- a/indra/newview/lltoolbarview.h +++ b/indra/newview/lltoolbarview.h @@ -98,6 +98,7 @@ private: LLToolBar* mToolbarLeft; LLToolBar* mToolbarRight; LLToolBar* mToolbarBottom; + bool mToolbarsLoaded; bool mDragStarted; LLToolBarButton* mDragToolbarButton; diff --git a/indra/newview/lltranslate.cpp b/indra/newview/lltranslate.cpp index 3692f67a8d..3692f67a8d 100755..100644 --- a/indra/newview/lltranslate.cpp +++ b/indra/newview/lltranslate.cpp diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index c7d6eac33f..c7d6eac33f 100755..100644 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 2345fbfd6a..0909714951 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -968,6 +968,10 @@ U32 info_display_from_string(std::string info_display) { return LLPipeline::RENDER_DEBUG_SCULPTED; } + else if ("wind vectors" == info_display) + { + return LLPipeline::RENDER_DEBUG_WIND_VECTORS; + } else { return 0; @@ -980,6 +984,8 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t { U32 info_display = info_display_from_string( userdata.asString() ); + LL_INFOS("ViewerMenu") << "toggle " << userdata.asString() << LL_ENDL; + if ( info_display != 0 ) { LLPipeline::toggleRenderDebug( (void*)info_display ); @@ -997,6 +1003,8 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t U32 info_display = info_display_from_string( userdata.asString() ); bool new_value = false; + LL_INFOS("ViewerMenu") << "check " << userdata.asString() << LL_ENDL; + if ( info_display != 0 ) { new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display ); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 65b569a190..65b569a190 100755..100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index d81e67bfe2..d81e67bfe2 100644..100755 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 380d63c77b..380d63c77b 100644..100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp diff --git a/indra/newview/llwind.cpp b/indra/newview/llwind.cpp index 69d3090442..4c39fb5b74 100644 --- a/indra/newview/llwind.cpp +++ b/indra/newview/llwind.cpp @@ -46,16 +46,12 @@ #include "llworld.h" -const F32 CLOUD_DIVERGENCE_COEF = 0.5f; - - ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LLWind::LLWind() -: mSize(16), - mCloudDensityp(NULL) +: mSize(16) { init(); } @@ -65,8 +61,6 @@ LLWind::~LLWind() { delete [] mVelX; delete [] mVelY; - delete [] mCloudVelX; - delete [] mCloudVelY; } @@ -77,31 +71,23 @@ LLWind::~LLWind() void LLWind::init() { + LL_DEBUGS("Wind") << "initializing wind size: "<< mSize << LL_ENDL; + // Initialize vector data mVelX = new F32[mSize*mSize]; mVelY = new F32[mSize*mSize]; - mCloudVelX = new F32[mSize*mSize]; - mCloudVelY = new F32[mSize*mSize]; - S32 i; for (i = 0; i < mSize*mSize; i++) { mVelX[i] = 0.5f; mVelY[i] = 0.5f; - mCloudVelX[i] = 0.0f; - mCloudVelY[i] = 0.0f; } } void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) { - if (!mCloudDensityp) - { - return; - } - LLPatchHeader patch_header; S32 buffer[16*16]; @@ -122,22 +108,15 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) decode_patch(bitpack, buffer); decompress_patch(mVelY, buffer, &patch_header); - - S32 i, j, k; - // HACK -- mCloudVelXY is the same as mVelXY, except we add a divergence - // that is proportional to the gradient of the cloud density - // ==> this helps to clump clouds together - // NOTE ASSUMPTION: cloud density has the same dimensions as the wind field - // This needs to be fixed... causes discrepency at region boundaries for (j=1; j<mSize-1; j++) { for (i=1; i<mSize-1; i++) { k = i + j * mSize; - *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 1) - *(mCloudDensityp + k - 1)); - *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + mSize) - *(mCloudDensityp + k - mSize)); + *(mVelX + k) = *(mVelX + k); + *(mVelY + k) = *(mVelY + k); } } @@ -145,29 +124,29 @@ void LLWind::decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp) for (j=1; j<mSize-1; j++) { k = i + j * mSize; - *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k) - *(mCloudDensityp + k - 2)); - *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + mSize) - *(mCloudDensityp + k - mSize)); + *(mVelX + k) = *(mVelX + k); + *(mVelY + k) = *(mVelY + k); } i = 0; for (j=1; j<mSize-1; j++) { k = i + j * mSize; - *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 2) - *(mCloudDensityp + k)); - *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + mSize) - *(mCloudDensityp + k + mSize)); + *(mVelX + k) = *(mVelX + k); + *(mVelY + k) = *(mVelY + k); } j = mSize - 1; for (i=1; i<mSize-1; i++) { k = i + j * mSize; - *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 1) - *(mCloudDensityp + k - 1)); - *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k) - *(mCloudDensityp + k - 2*mSize)); + *(mVelX + k) = *(mVelX + k); + *(mVelY + k) = *(mVelY + k); } j = 0; for (i=1; i<mSize-1; i++) { k = i + j * mSize; - *(mCloudVelX + k) = *(mVelX + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 1) - *(mCloudDensityp + k -1)); - *(mCloudVelY + k) = *(mVelY + k) + CLOUD_DIVERGENCE_COEF * (*(mCloudDensityp + k + 2*mSize) - *(mCloudDensityp + k)); + *(mVelX + k) = *(mVelX + k); + *(mVelY + k) = *(mVelY + k); } } @@ -280,74 +259,6 @@ LLVector3 LLWind::getVelocity(const LLVector3 &pos_region) return r_val * WIND_SCALE_HACK; } - -LLVector3 LLWind::getCloudVelocity(const LLVector3 &pos_region) -{ - llassert(mSize == 16); - // Resolves value of wind at a location relative to SW corner of region - // - // Returns wind magnitude in X,Y components of vector3 - LLVector3 r_val; - F32 dx,dy; - S32 k; - - LLVector3 pos_clamped_region(pos_region); - - F32 region_width_meters = LLWorld::getInstance()->getRegionWidthInMeters(); - - if (pos_clamped_region.mV[VX] < 0.f) - { - pos_clamped_region.mV[VX] = 0.f; - } - else if (pos_clamped_region.mV[VX] >= region_width_meters) - { - pos_clamped_region.mV[VX] = (F32) fmod(pos_clamped_region.mV[VX], region_width_meters); - } - - if (pos_clamped_region.mV[VY] < 0.f) - { - pos_clamped_region.mV[VY] = 0.f; - } - else if (pos_clamped_region.mV[VY] >= region_width_meters) - { - pos_clamped_region.mV[VY] = (F32) fmod(pos_clamped_region.mV[VY], region_width_meters); - } - - - S32 i = llfloor(pos_clamped_region.mV[VX] * mSize / region_width_meters); - S32 j = llfloor(pos_clamped_region.mV[VY] * mSize / region_width_meters); - k = i + j*mSize; - dx = ((pos_clamped_region.mV[VX] * mSize / region_width_meters) - (F32) i); - dy = ((pos_clamped_region.mV[VY] * mSize / region_width_meters) - (F32) j); - - if ((i < mSize-1) && (j < mSize-1)) - { - // Interior points, no edges - r_val.mV[VX] = mCloudVelX[k]*(1.0f - dx)*(1.0f - dy) + - mCloudVelX[k + 1]*dx*(1.0f - dy) + - mCloudVelX[k + mSize]*dy*(1.0f - dx) + - mCloudVelX[k + mSize + 1]*dx*dy; - r_val.mV[VY] = mCloudVelY[k]*(1.0f - dx)*(1.0f - dy) + - mCloudVelY[k + 1]*dx*(1.0f - dy) + - mCloudVelY[k + mSize]*dy*(1.0f - dx) + - mCloudVelY[k + mSize + 1]*dx*dy; - } - else - { - r_val.mV[VX] = mCloudVelX[k]; - r_val.mV[VY] = mCloudVelY[k]; - } - - r_val.mV[VZ] = 0.f; - return r_val * WIND_SCALE_HACK; -} - - -void LLWind::setCloudDensityPointer(F32 *densityp) -{ - mCloudDensityp = densityp; -} - void LLWind::setOriginGlobal(const LLVector3d &origin_global) { mOriginGlobal = origin_global; diff --git a/indra/newview/llwind.h b/indra/newview/llwind.h index 925cb6d642..3b57f07124 100644 --- a/indra/newview/llwind.h +++ b/indra/newview/llwind.h @@ -27,7 +27,6 @@ #ifndef LL_LLWIND_H #define LL_LLWIND_H -//#include "vmath.h" #include "llmath.h" #include "v3math.h" #include "v3dmath.h" @@ -44,25 +43,21 @@ public: ~LLWind(); void renderVectors(); LLVector3 getVelocity(const LLVector3 &location); // "location" is region-local - LLVector3 getCloudVelocity(const LLVector3 &location); // "location" is region-local LLVector3 getVelocityNoisy(const LLVector3 &location, const F32 dim); // "location" is region-local void decompress(LLBitPack &bitpack, LLGroupHeader *group_headerp); LLVector3 getAverage(); - void setCloudDensityPointer(F32 *densityp); void setOriginGlobal(const LLVector3d &origin_global); private: S32 mSize; F32 * mVelX; F32 * mVelY; - F32 * mCloudVelX; - F32 * mCloudVelY; - F32 * mCloudDensityp; LLVector3d mOriginGlobal; void init(); + LOG_CLASS(LLWind); }; #endif diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a50f66f282..93354e6579 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4383,6 +4383,11 @@ void LLPipeline::renderDebug() } } + if (mRenderDebugMask & RENDER_DEBUG_WIND_VECTORS) + { + gAgent.getRegion()->mWind.renderVectors(); + } + if (mRenderDebugMask & RENDER_DEBUG_COMPOSITION) { // Debug composition layers diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 27ee2745b5..0661de8cec 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -438,7 +438,7 @@ public: RENDER_DEBUG_VERIFY = 0x0000002, RENDER_DEBUG_BBOXES = 0x0000004, RENDER_DEBUG_OCTREE = 0x0000008, - RENDER_DEBUG_PICKING = 0x0000010, + RENDER_DEBUG_WIND_VECTORS = 0x0000010, RENDER_DEBUG_OCCLUSION = 0x0000020, RENDER_DEBUG_POINTS = 0x0000040, RENDER_DEBUG_TEXTURE_PRIORITY = 0x0000080, diff --git a/indra/newview/skins/default/xui/da/floater_about.xml b/indra/newview/skins/default/xui/da/floater_about.xml index 0ccaab73ba..fc8bc33096 100644 --- a/indra/newview/skins/default/xui/da/floater_about.xml +++ b/indra/newview/skins/default/xui/da/floater_about.xml @@ -10,7 +10,7 @@ <floater.string name="AboutPosition"> Du er ved [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] i regionen [REGION] lokaliseret ved <nolink>[HOSTNAME]</nolink> ([HOSTIP]) [SERVER_VERSION] -[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]] +[SERVER_RELEASE_NOTES_URL] </floater.string> <floater.string name="AboutSystem"> CPU: [CPU] 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 fbaf4f0a8a..fbaf4f0a8a 100644..100755 --- a/indra/newview/skins/default/xui/en/floater_model_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 63e50b0b9f..01f9c23afd 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2437,6 +2437,16 @@ parameter="raycast" /> </menu_item_check> <menu_item_check + label="Wind Vectors" + name="Wind Vectors"> + <menu_item_check.on_check + function="Advanced.CheckInfoDisplay" + parameter="wind vectors" /> + <menu_item_check.on_click + function="Advanced.ToggleInfoDisplay" + parameter="wind vectors" /> + </menu_item_check> + <menu_item_check label="Render Complexity" name="rendercomplexity"> <menu_item_check.on_check diff --git a/indra/newview/skins/default/xui/pl/floater_about.xml b/indra/newview/skins/default/xui/pl/floater_about.xml index 637325ddd0..409429ffaa 100644 --- a/indra/newview/skins/default/xui/pl/floater_about.xml +++ b/indra/newview/skins/default/xui/pl/floater_about.xml @@ -10,7 +10,7 @@ <floater.string name="AboutPosition"> Położenie [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] w [REGION] zlokalizowanym w <nolink>[HOSTNAME]</nolink> ([HOSTIP]) [SERVER_VERSION] -[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]] +[SERVER_RELEASE_NOTES_URL] </floater.string> <floater.string name="AboutSystem"> Procesor: [CPU] diff --git a/indra/newview/skins/default/xui/ru/strings.xml b/indra/newview/skins/default/xui/ru/strings.xml index d52cee6b0d..0134298166 100644 --- a/indra/newview/skins/default/xui/ru/strings.xml +++ b/indra/newview/skins/default/xui/ru/strings.xml @@ -4252,7 +4252,7 @@ support@secondlife.com. Женщина – ух ты! </string> <string name="/bow"> - /поклониться + /поклон </string> <string name="/clap"> /хлопнуть diff --git a/indra/newview/skins/default/xui/zh/floater_about.xml b/indra/newview/skins/default/xui/zh/floater_about.xml index 0ac85d399e..7e19c124a1 100644 --- a/indra/newview/skins/default/xui/zh/floater_about.xml +++ b/indra/newview/skins/default/xui/zh/floater_about.xml @@ -10,7 +10,7 @@ <floater.string name="AboutPosition"> You are at [POSITION_0,number,1], [POSITION_1,number,1], [POSITION_2,number,1] in [REGION] located at <nolink>[HOSTNAME]</nolink> ([HOSTIP]) [SERVER_VERSION] -[[SERVER_RELEASE_NOTES_URL] [ReleaseNotes]] +[SERVER_RELEASE_NOTES_URL] </floater.string> <floater.string name="AboutSystem"> CPU:[CPU] |