diff options
Diffstat (limited to '')
56 files changed, 292 insertions, 218 deletions
diff --git a/linden/indra/newview/English.lproj/InfoPlist.strings b/linden/indra/newview/English.lproj/InfoPlist.strings index ca392f1..2f68a02 100644 --- a/linden/indra/newview/English.lproj/InfoPlist.strings +++ b/linden/indra/newview/English.lproj/InfoPlist.strings | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Localized versions of Info.plist keys */ | 1 | /* Localized versions of Info.plist keys */ |
2 | 2 | ||
3 | CFBundleName = "Second Life"; | 3 | CFBundleName = "Second Life"; |
4 | CFBundleShortVersionString = "Second Life version 1.13.2.12"; | 4 | CFBundleShortVersionString = "Second Life version 1.13.2.15"; |
5 | CFBundleGetInfoString = "Second Life version 1.13.2.12, Copyright 2004-2006 Linden Research, Inc."; | 5 | CFBundleGetInfoString = "Second Life version 1.13.2.15, Copyright 2004-2006 Linden Research, Inc."; |
diff --git a/linden/indra/newview/Info-SecondLife.plist b/linden/indra/newview/Info-SecondLife.plist index 8e8771d..3e6c65e 100644 --- a/linden/indra/newview/Info-SecondLife.plist +++ b/linden/indra/newview/Info-SecondLife.plist | |||
@@ -32,7 +32,7 @@ | |||
32 | </dict> | 32 | </dict> |
33 | </array> | 33 | </array> |
34 | <key>CFBundleVersion</key> | 34 | <key>CFBundleVersion</key> |
35 | <string>1.13.2.12</string> | 35 | <string>1.13.2.15</string> |
36 | <key>CSResourcesFileMapped</key> | 36 | <key>CSResourcesFileMapped</key> |
37 | <true/> | 37 | <true/> |
38 | </dict> | 38 | </dict> |
diff --git a/linden/indra/newview/linux_tools/exposed-symbols.txt b/linden/indra/newview/linux_tools/exposed-symbols.txt new file mode 100644 index 0000000..98df90a --- /dev/null +++ b/linden/indra/newview/linux_tools/exposed-symbols.txt | |||
@@ -0,0 +1,3 @@ | |||
1 | initllpython | ||
2 | createLLImageJ2CKDU | ||
3 | destroyLLImageJ2CKDU | ||
diff --git a/linden/indra/newview/linux_tools/hidesymbols.ver b/linden/indra/newview/linux_tools/hidesymbols.ver deleted file mode 100644 index 6ce7719..0000000 --- a/linden/indra/newview/linux_tools/hidesymbols.ver +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | LL_PRIVATE { | ||
2 | global: | ||
3 | initllpython; | ||
4 | createLLImageJ2CKDU; | ||
5 | destroyLLImageJ2CKDU; | ||
6 | local: | ||
7 | *; | ||
8 | }; | ||
9 | |||
diff --git a/linden/indra/newview/linux_tools/package-client.sh b/linden/indra/newview/linux_tools/package-client.sh index 1446e78..b054386 100755 --- a/linden/indra/newview/linux_tools/package-client.sh +++ b/linden/indra/newview/linux_tools/package-client.sh | |||
@@ -106,8 +106,15 @@ then | |||
106 | echo 'Default grid - creating empty gridargs.dat' | 106 | echo 'Default grid - creating empty gridargs.dat' |
107 | echo " " > $PACKAGE_NAME/gridargs.dat | 107 | echo " " > $PACKAGE_NAME/gridargs.dat |
108 | else | 108 | else |
109 | echo "Creating gridargs.dat for package, grid $GRID" | 109 | if [ X$GRID == X'firstlook' ] |
110 | echo "--${GRID} -helperuri http://preview-${GRID}.secondlife.com/helpers/" > $PACKAGE_NAME/gridargs.dat | 110 | then |
111 | # firstlook is a special case... it's not really a grid. | ||
112 | echo "Creating gridargs.dat for firstlook" | ||
113 | echo "-settings settings_firstlook.xml" > $PACKAGE_NAME/gridargs.dat | ||
114 | else | ||
115 | echo "Creating gridargs.dat for package, grid $GRID" | ||
116 | echo "-settings settings_beta.xml --${GRID} -helperuri http://preview-${GRID}.secondlife.com/helpers/" > $PACKAGE_NAME/gridargs.dat | ||
117 | fi | ||
111 | fi | 118 | fi |
112 | 119 | ||
113 | TARBALL=$PACKAGE_NAME.tar.bz2 | 120 | TARBALL=$PACKAGE_NAME.tar.bz2 |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 26ef1b0..6d9137d 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -2115,11 +2115,11 @@ void LLAgent::updateWanderTarget() | |||
2115 | F32 rand_x; | 2115 | F32 rand_x; |
2116 | F32 rand_y; | 2116 | F32 rand_y; |
2117 | 2117 | ||
2118 | if (mWanderTimer.checkExpirationAndReset(frand(MAX_WANDER_TIME))) | 2118 | if (mWanderTimer.checkExpirationAndReset(ll_frand(MAX_WANDER_TIME))) |
2119 | { | 2119 | { |
2120 | // Pick a random spot to wander towards | 2120 | // Pick a random spot to wander towards |
2121 | num_regions = gWorldPointer->mActiveRegionList.getLength(); | 2121 | num_regions = gWorldPointer->mActiveRegionList.getLength(); |
2122 | S32 region_num = llround(frand(1.f) * num_regions); | 2122 | S32 region_num = llround(ll_frand() * num_regions); |
2123 | rand_region = gWorldPointer->mActiveRegionList.getFirstData(); | 2123 | rand_region = gWorldPointer->mActiveRegionList.getFirstData(); |
2124 | S32 i = 0; | 2124 | S32 i = 0; |
2125 | while (i < region_num) | 2125 | while (i < region_num) |
@@ -2127,8 +2127,8 @@ void LLAgent::updateWanderTarget() | |||
2127 | rand_region = gWorldPointer->mActiveRegionList.getNextData(); | 2127 | rand_region = gWorldPointer->mActiveRegionList.getNextData(); |
2128 | i++; | 2128 | i++; |
2129 | } | 2129 | } |
2130 | rand_x = frand(rand_region->getWidth()); | 2130 | rand_x = ll_frand(rand_region->getWidth()); |
2131 | rand_y = frand(rand_region->getWidth()); | 2131 | rand_y = ll_frand(rand_region->getWidth()); |
2132 | 2132 | ||
2133 | stopAutoPilot(); | 2133 | stopAutoPilot(); |
2134 | startAutoPilotGlobal(rand_region->getPosGlobalFromRegion(LLVector3(rand_x, rand_y, 0.f))); | 2134 | startAutoPilotGlobal(rand_region->getPosGlobalFromRegion(LLVector3(rand_x, rand_y, 0.f))); |
@@ -5687,7 +5687,7 @@ void LLAgent::fidget() | |||
5687 | // pick a random fidget anim here | 5687 | // pick a random fidget anim here |
5688 | S32 oldFidget = mCurrentFidget; | 5688 | S32 oldFidget = mCurrentFidget; |
5689 | 5689 | ||
5690 | mCurrentFidget = gLindenLabRandomNumber.llrand(NUM_AGENT_STAND_ANIMS); | 5690 | mCurrentFidget = ll_rand(NUM_AGENT_STAND_ANIMS); |
5691 | 5691 | ||
5692 | if (mCurrentFidget != oldFidget) | 5692 | if (mCurrentFidget != oldFidget) |
5693 | { | 5693 | { |
@@ -5719,7 +5719,7 @@ void LLAgent::fidget() | |||
5719 | } | 5719 | } |
5720 | 5720 | ||
5721 | // calculate next fidget time | 5721 | // calculate next fidget time |
5722 | mNextFidgetTime = curTime + gLindenLabRandomNumber.llfrand(MAX_FIDGET_TIME - MIN_FIDGET_TIME) + MIN_FIDGET_TIME; | 5722 | mNextFidgetTime = curTime + ll_frand(MAX_FIDGET_TIME - MIN_FIDGET_TIME) + MIN_FIDGET_TIME; |
5723 | } | 5723 | } |
5724 | } | 5724 | } |
5725 | } | 5725 | } |
diff --git a/linden/indra/newview/llanimalcontrols.cpp b/linden/indra/newview/llanimalcontrols.cpp index 8bafe86..2e047ae 100644 --- a/linden/indra/newview/llanimalcontrols.cpp +++ b/linden/indra/newview/llanimalcontrols.cpp | |||
@@ -103,7 +103,7 @@ void LLAnimalControlsVirtualServer::update() | |||
103 | 103 | ||
104 | F32 leftRightSpan = 5.0f; | 104 | F32 leftRightSpan = 5.0f; |
105 | 105 | ||
106 | F32 randomSpan = gLindenLabRandomNumber.llfrand( leftRightSpan ); | 106 | F32 randomSpan = ll_frand( leftRightSpan ); |
107 | 107 | ||
108 | focusPosition += leftDirection * ( - leftRightSpan * ONE_HALF + randomSpan ); | 108 | focusPosition += leftDirection * ( - leftRightSpan * ONE_HALF + randomSpan ); |
109 | } | 109 | } |
diff --git a/linden/indra/newview/llcloud.cpp b/linden/indra/newview/llcloud.cpp index e1b2281..ca05562 100644 --- a/linden/indra/newview/llcloud.cpp +++ b/linden/indra/newview/llcloud.cpp | |||
@@ -193,9 +193,9 @@ void LLCloudGroup::updatePuffCount() | |||
193 | for (i = current_puff_count; i < target_puff_count; i++) | 193 | for (i = current_puff_count; i < target_puff_count; i++) |
194 | { | 194 | { |
195 | puff_pos_global = mVOCloudsp->getPositionGlobal(); | 195 | puff_pos_global = mVOCloudsp->getPositionGlobal(); |
196 | F32 x = frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE; | 196 | F32 x = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE; |
197 | F32 y = frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE; | 197 | F32 y = ll_frand(256.f/CLOUD_GROUPS_PER_EDGE) - 128.f/CLOUD_GROUPS_PER_EDGE; |
198 | F32 z = frand(CLOUD_HEIGHT_RANGE) - 0.5f*CLOUD_HEIGHT_RANGE; | 198 | F32 z = ll_frand(CLOUD_HEIGHT_RANGE) - 0.5f*CLOUD_HEIGHT_RANGE; |
199 | puff_pos_global += LLVector3d(x, y, z); | 199 | puff_pos_global += LLVector3d(x, y, z); |
200 | mCloudPuffs[i].mPositionGlobal = puff_pos_global; | 200 | mCloudPuffs[i].mPositionGlobal = puff_pos_global; |
201 | mCloudPuffs[i].mAlpha = 0.01f; | 201 | mCloudPuffs[i].mAlpha = 0.01f; |
diff --git a/linden/indra/newview/llcontroldef.cpp b/linden/indra/newview/llcontroldef.cpp index c186f6a..850b5bf 100644 --- a/linden/indra/newview/llcontroldef.cpp +++ b/linden/indra/newview/llcontroldef.cpp | |||
@@ -106,6 +106,7 @@ void declare_settings() | |||
106 | gSavedSettings.declareS32("MenuBarWidth", 410, "", NO_PERSIST ); | 106 | gSavedSettings.declareS32("MenuBarWidth", 410, "", NO_PERSIST ); |
107 | 107 | ||
108 | gSavedSettings.declareF32("MenuAccessKeyTime", 0.25f, "Time (seconds) in which the menu key must be tapped to move focus to the menu bar"); | 108 | gSavedSettings.declareF32("MenuAccessKeyTime", 0.25f, "Time (seconds) in which the menu key must be tapped to move focus to the menu bar"); |
109 | gSavedSettings.declareBOOL("UseAltKeyForMenus", FALSE, "Access menus via keyboard by tapping Alt"); | ||
109 | // Which background overlay to use | 110 | // Which background overlay to use |
110 | gSavedSettings.declareS32("MapOverlayIndex", 0, "Currently selected world map type"); | 111 | gSavedSettings.declareS32("MapOverlayIndex", 0, "Currently selected world map type"); |
111 | 112 | ||
diff --git a/linden/indra/newview/lldrawpoolbump.cpp b/linden/indra/newview/lldrawpoolbump.cpp index 28e60f1..befcc70 100644 --- a/linden/indra/newview/lldrawpoolbump.cpp +++ b/linden/indra/newview/lldrawpoolbump.cpp | |||
@@ -113,9 +113,10 @@ void LLStandardBumpmap::restoreGL() | |||
113 | 113 | ||
114 | while( !feof(file) && (LLStandardBumpmap::sStandardBumpmapCount < (U32)TEM_BUMPMAP_COUNT) ) | 114 | while( !feof(file) && (LLStandardBumpmap::sStandardBumpmapCount < (U32)TEM_BUMPMAP_COUNT) ) |
115 | { | 115 | { |
116 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
116 | char label[2048] = ""; | 117 | char label[2048] = ""; |
117 | char bump_file[2048] = ""; | 118 | char bump_file[2048] = ""; |
118 | fields_read = fscanf( file, "\n%s %s", label, bump_file); | 119 | fields_read = fscanf( file, "\n%2047s %2047s", label, bump_file); |
119 | if( EOF == fields_read ) | 120 | if( EOF == fields_read ) |
120 | { | 121 | { |
121 | break; | 122 | break; |
diff --git a/linden/indra/newview/llfasttimerview.cpp b/linden/indra/newview/llfasttimerview.cpp index 3fddc4b..e147e3f 100644 --- a/linden/indra/newview/llfasttimerview.cpp +++ b/linden/indra/newview/llfasttimerview.cpp | |||
@@ -71,19 +71,21 @@ static LLColor4 green9(0.6f, 1.0f, 0.6f, 1.0f); | |||
71 | // red (5) magenta (4) | 71 | // red (5) magenta (4) |
72 | static struct ft_display_info ft_display_table[] = | 72 | static struct ft_display_info ft_display_table[] = |
73 | { | 73 | { |
74 | { LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 }, | 74 | { LLFastTimer::FTM_FRAME, "Frame", &LLColor4::white, 0 }, |
75 | { LLFastTimer::FTM_MESSAGES, " Messages", &LLColor4::grey1, 0 }, | 75 | { LLFastTimer::FTM_MESSAGES, " Messages", &LLColor4::grey1, 0 }, |
76 | { LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 }, | 76 | { LLFastTimer::FTM_SLEEP, " Sleep", &LLColor4::grey2, 0 }, |
77 | { LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 }, | 77 | { LLFastTimer::FTM_IDLE, " Idle", &blue0, 0 }, |
78 | { LLFastTimer::FTM_INVENTORY, " Inventory Update", &LLColor4::purple6, 1 }, | 78 | { LLFastTimer::FTM_PUMP, " Pump", &LLColor4::magenta2, 1 }, |
79 | { LLFastTimer::FTM_AUTO_SELECT, " Open and Select", &LLColor4::red, 0 }, | 79 | { LLFastTimer::FTM_CURL, " Curl", &LLColor4::magenta3, 0 }, |
80 | { LLFastTimer::FTM_INVENTORY, " Inventory Update", &LLColor4::purple6, 1 }, | ||
81 | { LLFastTimer::FTM_AUTO_SELECT, " Open and Select", &LLColor4::red, 0 }, | ||
80 | { LLFastTimer::FTM_FILTER, " Filter", &LLColor4::red2, 0 }, | 82 | { LLFastTimer::FTM_FILTER, " Filter", &LLColor4::red2, 0 }, |
81 | { LLFastTimer::FTM_ARRANGE, " Arrange", &LLColor4::red3, 0 }, | 83 | { LLFastTimer::FTM_ARRANGE, " Arrange", &LLColor4::red3, 0 }, |
82 | { LLFastTimer::FTM_REFRESH, " Refresh", &LLColor4::red4, 0 }, | 84 | { LLFastTimer::FTM_REFRESH, " Refresh", &LLColor4::red4, 0 }, |
83 | { LLFastTimer::FTM_SORT, " Sort", &LLColor4::red5, 0 }, | 85 | { LLFastTimer::FTM_SORT, " Sort", &LLColor4::red5, 0 }, |
84 | { LLFastTimer::FTM_RESET_DRAWORDER, " ResetDrawOrder", &LLColor4::pink1, 0 }, | 86 | { LLFastTimer::FTM_RESET_DRAWORDER, " ResetDrawOrder", &LLColor4::pink1, 0 }, |
85 | { LLFastTimer::FTM_WORLD_UPDATE, " World Update", &LLColor4::blue1, 1 }, | 87 | { LLFastTimer::FTM_WORLD_UPDATE, " World Update", &LLColor4::blue1, 1 }, |
86 | { LLFastTimer::FTM_UPDATE_MOVE, " Move Objects", &LLColor4::pink2, 0 }, | 88 | { LLFastTimer::FTM_UPDATE_MOVE, " Move Objects", &LLColor4::pink2, 0 }, |
87 | { LLFastTimer::FTM_OCTREE_BALANCE, " Octree Balance", &LLColor4::red3, 0 }, | 89 | { LLFastTimer::FTM_OCTREE_BALANCE, " Octree Balance", &LLColor4::red3, 0 }, |
88 | { LLFastTimer::FTM_CULL, " Object Cull", &LLColor4::blue2, 0 }, | 90 | { LLFastTimer::FTM_CULL, " Object Cull", &LLColor4::blue2, 0 }, |
89 | { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 }, | 91 | { LLFastTimer::FTM_CULL_REBOUND, " Rebound", &LLColor4::blue3, 0 }, |
@@ -281,6 +283,13 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) | |||
281 | } | 283 | } |
282 | } | 284 | } |
283 | } | 285 | } |
286 | else if (mask & MASK_ALT) | ||
287 | { | ||
288 | if (mask & MASK_SHIFT) | ||
289 | mSubtractHidden = !mSubtractHidden; | ||
290 | else | ||
291 | mDisplayCalls = !mDisplayCalls; | ||
292 | } | ||
284 | else if (mask & MASK_SHIFT) | 293 | else if (mask & MASK_SHIFT) |
285 | { | 294 | { |
286 | if (++mDisplayMode > 3) | 295 | if (++mDisplayMode > 3) |
@@ -301,8 +310,8 @@ BOOL LLFastTimerView::handleMouseDown(S32 x, S32 y, MASK mask) | |||
301 | mScrollIndex = 0; | 310 | mScrollIndex = 0; |
302 | } | 311 | } |
303 | } | 312 | } |
304 | // RN: for now, pass all mouse events through | 313 | // SJB: Don't pass mouse clicks through the display |
305 | return FALSE; | 314 | return TRUE; |
306 | } | 315 | } |
307 | 316 | ||
308 | BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask) | 317 | BOOL LLFastTimerView::handleMouseUp(S32 x, S32 y, MASK mask) |
@@ -359,33 +368,6 @@ BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) | |||
359 | return FALSE; | 368 | return FALSE; |
360 | } | 369 | } |
361 | 370 | ||
362 | BOOL LLFastTimerView::handleKey(KEY key, MASK mask, BOOL called_from_parent) | ||
363 | { | ||
364 | // Otherwise space key gets eaten from the rest of the UI. JC | ||
365 | if (getVisible()) | ||
366 | { | ||
367 | switch (key) | ||
368 | { | ||
369 | case '=': | ||
370 | mDisplayCalls = !mDisplayCalls; | ||
371 | return TRUE; | ||
372 | case '-': | ||
373 | mSubtractHidden = !mSubtractHidden; | ||
374 | return TRUE; | ||
375 | case ' ': | ||
376 | // pause/unpause | ||
377 | LLFastTimer::sPauseHistory = !LLFastTimer::sPauseHistory; | ||
378 | // reset scroll to bottom when unpausing | ||
379 | if (!LLFastTimer::sPauseHistory) | ||
380 | { | ||
381 | mScrollIndex = 0; | ||
382 | } | ||
383 | return TRUE; | ||
384 | } | ||
385 | } | ||
386 | return FALSE; | ||
387 | } | ||
388 | |||
389 | void LLFastTimerView::draw() | 371 | void LLFastTimerView::draw() |
390 | { | 372 | { |
391 | LLFastTimer t(LLFastTimer::FTM_RENDER_TIMER); | 373 | LLFastTimer t(LLFastTimer::FTM_RENDER_TIMER); |
@@ -480,7 +462,7 @@ void LLFastTimerView::draw() | |||
480 | LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); | 462 | LLFontGL::sMonospace->renderUTF8(tdesc, 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); |
481 | y -= (texth + 2); | 463 | y -= (texth + 2); |
482 | 464 | ||
483 | LLFontGL::sMonospace->renderUTF8("[Right-click to log selected] [= to toggle counts] [- to subtract hidden]", | 465 | LLFontGL::sMonospace->renderUTF8("[Right-Click log selected] [ALT-Click toggle counts] [ALT-SHIFT-Click sub hidden]", |
484 | 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); | 466 | 0, x, y, LLColor4::white, LLFontGL::LEFT, LLFontGL::TOP); |
485 | y -= (texth + 2); | 467 | y -= (texth + 2); |
486 | } | 468 | } |
@@ -566,7 +548,7 @@ void LLFastTimerView::draw() | |||
566 | } | 548 | } |
567 | else | 549 | else |
568 | { | 550 | { |
569 | U64 ticks = disabled >= 1 ? ticks_sum[0][i] : LLFastTimer::sCountAverage[tidx]; | 551 | U64 ticks = ticks_sum[0][i]; |
570 | ms = (F32)((F64)ticks * iclock_freq); | 552 | ms = (F32)((F64)ticks * iclock_freq); |
571 | calls = (S32)LLFastTimer::sCallAverage[tidx]; | 553 | calls = (S32)LLFastTimer::sCallAverage[tidx]; |
572 | } | 554 | } |
diff --git a/linden/indra/newview/llfasttimerview.h b/linden/indra/newview/llfasttimerview.h index eb160e8..b20c8eb 100644 --- a/linden/indra/newview/llfasttimerview.h +++ b/linden/indra/newview/llfasttimerview.h | |||
@@ -45,7 +45,6 @@ public: | |||
45 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); | 45 | virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); |
46 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); | 46 | virtual BOOL handleHover(S32 x, S32 y, MASK mask); |
47 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); | 47 | virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); |
48 | virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); | ||
49 | virtual void draw(); | 48 | virtual void draw(); |
50 | 49 | ||
51 | S32 getLegendIndex(S32 y); | 50 | S32 getLegendIndex(S32 y); |
diff --git a/linden/indra/newview/llfeaturemanager.cpp b/linden/indra/newview/llfeaturemanager.cpp index d3b0dbb..061b343 100644 --- a/linden/indra/newview/llfeaturemanager.cpp +++ b/linden/indra/newview/llfeaturemanager.cpp | |||
@@ -300,12 +300,7 @@ BOOL LLFeatureManager::loadFeatureTables() | |||
300 | return TRUE; | 300 | return TRUE; |
301 | } | 301 | } |
302 | 302 | ||
303 | S32 LLFeatureManager::getGPUClass() | 303 | void LLFeatureManager::loadGPUClass() |
304 | { | ||
305 | return mGPUClass; | ||
306 | } | ||
307 | |||
308 | S32 LLFeatureManager::loadGPUClass() | ||
309 | { | 304 | { |
310 | std::string data_path = gDirUtilp->getAppRODataDir(); | 305 | std::string data_path = gDirUtilp->getAppRODataDir(); |
311 | 306 | ||
@@ -313,6 +308,10 @@ S32 LLFeatureManager::loadGPUClass() | |||
313 | 308 | ||
314 | data_path += GPU_TABLE_FILENAME; | 309 | data_path += GPU_TABLE_FILENAME; |
315 | 310 | ||
311 | // defaults | ||
312 | mGPUClass = 0; | ||
313 | mGPUString = gGLManager.getRawGLString(); | ||
314 | |||
316 | llifstream file; | 315 | llifstream file; |
317 | 316 | ||
318 | file.open(data_path.c_str()); | 317 | file.open(data_path.c_str()); |
@@ -320,7 +319,7 @@ S32 LLFeatureManager::loadGPUClass() | |||
320 | if (!file) | 319 | if (!file) |
321 | { | 320 | { |
322 | llwarns << "Unable to open GPU table: " << data_path << "!" << llendl; | 321 | llwarns << "Unable to open GPU table: " << data_path << "!" << llendl; |
323 | return 0; | 322 | return; |
324 | } | 323 | } |
325 | 324 | ||
326 | std::string renderer = gGLManager.getRawGLString(); | 325 | std::string renderer = gGLManager.getRawGLString(); |
@@ -379,14 +378,14 @@ S32 LLFeatureManager::loadGPUClass() | |||
379 | { | 378 | { |
380 | file.close(); | 379 | file.close(); |
381 | llinfos << "GPU is " << label << llendl; | 380 | llinfos << "GPU is " << label << llendl; |
382 | return (S32) strtol(cls, NULL, 10); | 381 | mGPUString = label; |
382 | mGPUClass = (S32) strtol(cls, NULL, 10); | ||
383 | } | 383 | } |
384 | } | 384 | } |
385 | file.close(); | 385 | file.close(); |
386 | //flp->dump(); | 386 | //flp->dump(); |
387 | 387 | ||
388 | llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl; | 388 | llwarns << "Couldn't match GPU to a class: " << gGLManager.getRawGLString() << llendl; |
389 | return 0; | ||
390 | } | 389 | } |
391 | 390 | ||
392 | void LLFeatureManager::cleanupFeatureTables() | 391 | void LLFeatureManager::cleanupFeatureTables() |
@@ -419,7 +418,7 @@ void LLFeatureManager::initCPUFeatureMasks() | |||
419 | 418 | ||
420 | void LLFeatureManager::initGraphicsFeatureMasks() | 419 | void LLFeatureManager::initGraphicsFeatureMasks() |
421 | { | 420 | { |
422 | mGPUClass = loadGPUClass(); | 421 | loadGPUClass(); |
423 | 422 | ||
424 | if (mGPUClass >= 0 && mGPUClass < 4) | 423 | if (mGPUClass >= 0 && mGPUClass < 4) |
425 | { | 424 | { |
diff --git a/linden/indra/newview/llfeaturemanager.h b/linden/indra/newview/llfeaturemanager.h index d38e5b7..a24f06f 100644 --- a/linden/indra/newview/llfeaturemanager.h +++ b/linden/indra/newview/llfeaturemanager.h | |||
@@ -84,9 +84,10 @@ public: | |||
84 | void maskCurrentList(const char *name); // Mask the current feature list with the named list | 84 | void maskCurrentList(const char *name); // Mask the current feature list with the named list |
85 | 85 | ||
86 | BOOL loadFeatureTables(); | 86 | BOOL loadFeatureTables(); |
87 | S32 getGPUClass(); | ||
88 | S32 loadGPUClass(); | ||
89 | 87 | ||
88 | S32 getGPUClass() { return mGPUClass; } | ||
89 | std::string& getGPUString() { return mGPUString; } | ||
90 | |||
90 | void cleanupFeatureTables(); | 91 | void cleanupFeatureTables(); |
91 | 92 | ||
92 | S32 getVersion() const { return mTableVersion; } | 93 | S32 getVersion() const { return mTableVersion; } |
@@ -102,7 +103,9 @@ public: | |||
102 | BOOL initPCIFeatureMasks(); | 103 | BOOL initPCIFeatureMasks(); |
103 | 104 | ||
104 | void applyRecommendedFeatures(); | 105 | void applyRecommendedFeatures(); |
106 | |||
105 | protected: | 107 | protected: |
108 | void loadGPUClass(); | ||
106 | void initBaseMask(); | 109 | void initBaseMask(); |
107 | 110 | ||
108 | std::map<LLString, LLFeatureList *> mMaskList; | 111 | std::map<LLString, LLFeatureList *> mMaskList; |
@@ -110,6 +113,7 @@ protected: | |||
110 | S32 mTableVersion; | 113 | S32 mTableVersion; |
111 | BOOL mSafe; // Reinitialize everything to the "safe" mask | 114 | BOOL mSafe; // Reinitialize everything to the "safe" mask |
112 | S32 mGPUClass; | 115 | S32 mGPUClass; |
116 | std::string mGPUString; | ||
113 | }; | 117 | }; |
114 | 118 | ||
115 | extern LLFeatureManager *gFeatureManagerp; | 119 | extern LLFeatureManager *gFeatureManagerp; |
diff --git a/linden/indra/newview/llflexibleobject.cpp b/linden/indra/newview/llflexibleobject.cpp index 7e748f6..7e37c4c 100644 --- a/linden/indra/newview/llflexibleobject.cpp +++ b/linden/indra/newview/llflexibleobject.cpp | |||
@@ -204,9 +204,13 @@ void LLVolumeImplFlexible::setAttributesOfAllSections() | |||
204 | end_rot = F_PI * params.getTwist(); | 204 | end_rot = F_PI * params.getTwist(); |
205 | } | 205 | } |
206 | 206 | ||
207 | if (!mVO->mDrawable) | ||
208 | { | ||
209 | return; | ||
210 | } | ||
211 | |||
207 | S32 num_sections = 1 << mSimulateRes; | 212 | S32 num_sections = 1 << mSimulateRes; |
208 | 213 | ||
209 | |||
210 | LLVector3 scale = mVO->mDrawable->getScale(); | 214 | LLVector3 scale = mVO->mDrawable->getScale(); |
211 | 215 | ||
212 | mSection[0].mPosition = getAnchorPosition(); | 216 | mSection[0].mPosition = getAnchorPosition(); |
diff --git a/linden/indra/newview/llfloatereditui.cpp b/linden/indra/newview/llfloatereditui.cpp index d6a61d7..21580d3 100644 --- a/linden/indra/newview/llfloatereditui.cpp +++ b/linden/indra/newview/llfloatereditui.cpp | |||
@@ -53,7 +53,7 @@ void LLFloaterEditUI::navigateHierarchyButtonPressed(void* data) | |||
53 | for(idx = 0,itor = parentChildren->begin();itor!=parentChildren->end();itor++,idx++){ | 53 | for(idx = 0,itor = parentChildren->begin();itor!=parentChildren->end();itor++,idx++){ |
54 | if((*itor)==view)break; | 54 | if((*itor)==view)break; |
55 | } | 55 | } |
56 | switch((int)data) | 56 | switch((intptr_t)data) |
57 | { | 57 | { |
58 | case 0 ://up | 58 | case 0 ://up |
59 | view = view->getParent(); | 59 | view = view->getParent(); |
diff --git a/linden/indra/newview/llfloatertools.cpp b/linden/indra/newview/llfloatertools.cpp index c9edf98..05dd70b 100644 --- a/linden/indra/newview/llfloatertools.cpp +++ b/linden/indra/newview/llfloatertools.cpp | |||
@@ -383,8 +383,7 @@ LLFloaterTools::LLFloaterTools() | |||
383 | mPanelLandInfo(NULL), | 383 | mPanelLandInfo(NULL), |
384 | 384 | ||
385 | mTabLand(NULL), | 385 | mTabLand(NULL), |
386 | mDirty(TRUE), | 386 | mDirty(TRUE) |
387 | mLastTool(gToolNull) | ||
388 | { | 387 | { |
389 | mAutoFocus = FALSE; | 388 | mAutoFocus = FALSE; |
390 | LLCallbackMap::map_t factory_map; | 389 | LLCallbackMap::map_t factory_map; |
@@ -949,21 +948,13 @@ void LLFloaterTools::onClickGridOptions(void* data) | |||
949 | //floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE); | 948 | //floaterp->addDependentFloater(LLFloaterBuildOptions::getInstance(), FALSE); |
950 | } | 949 | } |
951 | 950 | ||
952 | void LLFloaterTools::saveLastTool() | ||
953 | { | ||
954 | mLastTool = gToolMgr->getCurrentTool( MASK_NONE ); | ||
955 | } | ||
956 | |||
957 | void LLFloaterTools::setEditTool(void* tool_pointer) | 951 | void LLFloaterTools::setEditTool(void* tool_pointer) |
958 | { | 952 | { |
959 | select_tool(tool_pointer); | 953 | select_tool(tool_pointer); |
960 | if(gFloaterTools && tool_pointer != gToolNull) | ||
961 | { | ||
962 | gFloaterTools->saveLastTool(); | ||
963 | } | ||
964 | } | 954 | } |
965 | 955 | ||
966 | void LLFloaterTools::onFocusReceived() | 956 | void LLFloaterTools::onFocusReceived() |
967 | { | 957 | { |
968 | select_tool(mLastTool); | 958 | gCurrentToolset = gBasicToolset; |
959 | gCurrentToolset->selectTool(gCurrentToolset->getSelectedTool()); | ||
969 | } \ No newline at end of file | 960 | } \ No newline at end of file |
diff --git a/linden/indra/newview/llfloatertools.h b/linden/indra/newview/llfloatertools.h index 343a898..a6c4ceb 100644 --- a/linden/indra/newview/llfloatertools.h +++ b/linden/indra/newview/llfloatertools.h | |||
@@ -175,7 +175,6 @@ public: | |||
175 | LLPanelLandInfo *mPanelLandInfo; | 175 | LLPanelLandInfo *mPanelLandInfo; |
176 | 176 | ||
177 | LLTabContainer* mTabLand; | 177 | LLTabContainer* mTabLand; |
178 | LLTool* mLastTool; | ||
179 | 178 | ||
180 | private: | 179 | private: |
181 | BOOL mDirty; | 180 | BOOL mDirty; |
diff --git a/linden/indra/newview/llhippo.cpp b/linden/indra/newview/llhippo.cpp index bcaf498..b2dd20f 100644 --- a/linden/indra/newview/llhippo.cpp +++ b/linden/indra/newview/llhippo.cpp | |||
@@ -51,7 +51,7 @@ void trigger_hippo_bug(void*) | |||
51 | { | 51 | { |
52 | chat = TRUE; | 52 | chat = TRUE; |
53 | } | 53 | } |
54 | else if (frand(1.f) > 0.5f) | 54 | else if (ll_frand() > 0.5f) |
55 | { | 55 | { |
56 | chat = TRUE; | 56 | chat = TRUE; |
57 | } | 57 | } |
diff --git a/linden/indra/newview/llhudeffectbeam.cpp b/linden/indra/newview/llhudeffectbeam.cpp index a7e7a5e..db24875 100644 --- a/linden/indra/newview/llhudeffectbeam.cpp +++ b/linden/indra/newview/llhudeffectbeam.cpp | |||
@@ -369,9 +369,9 @@ void LLHUDEffectBeam::setupParticle(const S32 i) | |||
369 | // Generate a random offset for the target point. | 369 | // Generate a random offset for the target point. |
370 | const F32 SCALE = 0.5f; | 370 | const F32 SCALE = 0.5f; |
371 | F32 x, y, z; | 371 | F32 x, y, z; |
372 | x = frand(SCALE) - 0.5f*SCALE; | 372 | x = ll_frand(SCALE) - 0.5f*SCALE; |
373 | y = frand(SCALE) - 0.5f*SCALE; | 373 | y = ll_frand(SCALE) - 0.5f*SCALE; |
374 | z = frand(SCALE) - 0.5f*SCALE; | 374 | z = ll_frand(SCALE) - 0.5f*SCALE; |
375 | 375 | ||
376 | LLVector3d target_pos_global(mTargetPos); | 376 | LLVector3d target_pos_global(mTargetPos); |
377 | target_pos_global += LLVector3d(x, y, z); | 377 | target_pos_global += LLVector3d(x, y, z); |
diff --git a/linden/indra/newview/llinventorymodel.cpp b/linden/indra/newview/llinventorymodel.cpp index 04506c8..7864aa8 100644 --- a/linden/indra/newview/llinventorymodel.cpp +++ b/linden/indra/newview/llinventorymodel.cpp | |||
@@ -1966,11 +1966,12 @@ bool LLInventoryModel::loadFromFile( | |||
1966 | llinfos << "unable to load inventory from: " << filename << llendl; | 1966 | llinfos << "unable to load inventory from: " << filename << llendl; |
1967 | return false; | 1967 | return false; |
1968 | } | 1968 | } |
1969 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
1969 | char buffer[MAX_STRING]; | 1970 | char buffer[MAX_STRING]; |
1970 | char keyword[MAX_STRING]; | 1971 | char keyword[MAX_STRING]; |
1971 | while(!feof(file) && fgets(buffer, MAX_STRING, file)) | 1972 | while(!feof(file) && fgets(buffer, MAX_STRING, file)) |
1972 | { | 1973 | { |
1973 | sscanf(buffer, " %s", keyword); | 1974 | sscanf(buffer, " %254s", keyword); |
1974 | if(0 == strcmp("inv_category", keyword)) | 1975 | if(0 == strcmp("inv_category", keyword)) |
1975 | { | 1976 | { |
1976 | LLPointer<LLViewerInventoryCategory> inv_cat = new LLViewerInventoryCategory(LLUUID::null); | 1977 | LLPointer<LLViewerInventoryCategory> inv_cat = new LLViewerInventoryCategory(LLUUID::null); |
diff --git a/linden/indra/newview/llmanip.cpp b/linden/indra/newview/llmanip.cpp index 538e6df..20d77e0 100644 --- a/linden/indra/newview/llmanip.cpp +++ b/linden/indra/newview/llmanip.cpp | |||
@@ -107,9 +107,7 @@ void LLManip::getManipNormal(LLViewerObject* object, EManipPart manip, LLVector3 | |||
107 | LLVector3 arrow_axis; | 107 | LLVector3 arrow_axis; |
108 | getManipAxis(object, manip, arrow_axis); | 108 | getManipAxis(object, manip, arrow_axis); |
109 | 109 | ||
110 | LLVector3 origin_dir = grid_origin - gCamera->getOrigin(); | 110 | LLVector3 cross = arrow_axis % gCamera->getAtAxis(); |
111 | origin_dir.normVec(); | ||
112 | LLVector3 cross = arrow_axis % origin_dir; | ||
113 | normal = cross % arrow_axis; | 111 | normal = cross % arrow_axis; |
114 | normal.normVec(); | 112 | normal.normVec(); |
115 | } | 113 | } |
diff --git a/linden/indra/newview/llmutelist.cpp b/linden/indra/newview/llmutelist.cpp index 2101e87..fc0046a 100644 --- a/linden/indra/newview/llmutelist.cpp +++ b/linden/indra/newview/llmutelist.cpp | |||
@@ -363,6 +363,8 @@ BOOL LLMuteList::loadFromFile(const LLString& filename) | |||
363 | return FALSE; | 363 | return FALSE; |
364 | } | 364 | } |
365 | 365 | ||
366 | // *NOTE: Changing the size of these buffers will require changes | ||
367 | // in the scanf below. | ||
366 | char id_buffer[MAX_STRING]; | 368 | char id_buffer[MAX_STRING]; |
367 | char name_buffer[MAX_STRING]; | 369 | char name_buffer[MAX_STRING]; |
368 | char buffer[MAX_STRING]; | 370 | char buffer[MAX_STRING]; |
@@ -372,7 +374,7 @@ BOOL LLMuteList::loadFromFile(const LLString& filename) | |||
372 | id_buffer[0] = '\0'; | 374 | id_buffer[0] = '\0'; |
373 | name_buffer[0] = '\0'; | 375 | name_buffer[0] = '\0'; |
374 | S32 type = 0; | 376 | S32 type = 0; |
375 | sscanf(buffer, " %d %s %[^|]", &type, id_buffer, name_buffer); | 377 | sscanf(buffer, " %d %254s %254[^|]", &type, id_buffer, name_buffer); |
376 | LLUUID id = LLUUID(id_buffer); | 378 | LLUUID id = LLUUID(id_buffer); |
377 | LLMute mute(id, name_buffer, (LLMute::EType)type); | 379 | LLMute mute(id, name_buffer, (LLMute::EType)type); |
378 | if (mute.mID.isNull() | 380 | if (mute.mID.isNull() |
diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index d54f16b..8ba33a9 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp | |||
@@ -848,14 +848,17 @@ void LLPanelAvatarClassified::enableControls(BOOL self) | |||
848 | BOOL LLPanelAvatarClassified::titleIsValid() | 848 | BOOL LLPanelAvatarClassified::titleIsValid() |
849 | { | 849 | { |
850 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); | 850 | LLTabContainerCommon* tabs = LLViewerUICtrlFactory::getTabContainerByName(this, "classified tab"); |
851 | for (S32 i = 0; i < tabs->getTabCount(); i++) | 851 | if ( tabs ) |
852 | { | 852 | { |
853 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getPanelByIndex(i); | 853 | LLPanelClassified* panel = (LLPanelClassified*)tabs->getCurrentPanel(); |
854 | if ( ! panel->titleIsValid() ) | 854 | if ( panel ) |
855 | { | 855 | { |
856 | return FALSE; | 856 | if ( ! panel->titleIsValid() ) |
857 | } | 857 | { |
858 | } | 858 | return FALSE; |
859 | }; | ||
860 | }; | ||
861 | }; | ||
859 | 862 | ||
860 | return TRUE; | 863 | return TRUE; |
861 | } | 864 | } |
@@ -1659,7 +1662,8 @@ void LLPanelAvatar::onClickOK(void *userdata) | |||
1659 | { | 1662 | { |
1660 | self->sendAvatarPropertiesUpdate(); | 1663 | self->sendAvatarPropertiesUpdate(); |
1661 | 1664 | ||
1662 | if ( self->mPanelClassified->titleIsValid() ) | 1665 | LLTabContainerCommon* tabs = LLUICtrlFactory::getTabContainerByName(self,"tab"); |
1666 | if ( tabs->getCurrentPanel() != self->mPanelClassified ) | ||
1663 | { | 1667 | { |
1664 | self->mPanelClassified->apply(); | 1668 | self->mPanelClassified->apply(); |
1665 | 1669 | ||
@@ -1669,6 +1673,19 @@ void LLPanelAvatar::onClickOK(void *userdata) | |||
1669 | infop->close(); | 1673 | infop->close(); |
1670 | } | 1674 | } |
1671 | } | 1675 | } |
1676 | else | ||
1677 | { | ||
1678 | if ( self->mPanelClassified->titleIsValid() ) | ||
1679 | { | ||
1680 | self->mPanelClassified->apply(); | ||
1681 | |||
1682 | LLFloaterAvatarInfo *infop = LLFloaterAvatarInfo::getInstance(self->mAvatarID); | ||
1683 | if (infop) | ||
1684 | { | ||
1685 | infop->close(); | ||
1686 | } | ||
1687 | } | ||
1688 | } | ||
1672 | } | 1689 | } |
1673 | } | 1690 | } |
1674 | 1691 | ||
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 5eabad3..916db16 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -685,7 +685,7 @@ BOOL idle_startup() | |||
685 | gSavedSettings.loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml")); | 685 | gSavedSettings.loadFromFile(gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,"overrides.xml")); |
686 | 686 | ||
687 | // handle the per account settings setup | 687 | // handle the per account settings setup |
688 | strcpy(gPerAccountSettingsFileName, gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, DEFAULT_SETTINGS_FILE).c_str()); | 688 | gPerAccountSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT, DEFAULT_SETTINGS_FILE); |
689 | 689 | ||
690 | // per account settings. Set defaults here if not found. If we get a bunch of these, eventually move to a function. | 690 | // per account settings. Set defaults here if not found. If we get a bunch of these, eventually move to a function. |
691 | gSavedPerAccountSettings.loadFromFile(gPerAccountSettingsFileName); | 691 | gSavedPerAccountSettings.loadFromFile(gPerAccountSettingsFileName); |
diff --git a/linden/indra/newview/lltexlayer.cpp b/linden/indra/newview/lltexlayer.cpp index 0292417..63d167d 100644 --- a/linden/indra/newview/lltexlayer.cpp +++ b/linden/indra/newview/lltexlayer.cpp | |||
@@ -487,7 +487,7 @@ void LLTexLayerSetBuffer::readBackAndUpload(U8* baked_bump_data) | |||
487 | // static | 487 | // static |
488 | void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result) // StoreAssetData callback (not fixed) | 488 | void LLTexLayerSetBuffer::onTextureUploadComplete(const LLUUID& uuid, void* userdata, S32 result) // StoreAssetData callback (not fixed) |
489 | { | 489 | { |
490 | LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)(U32)userdata; | 490 | LLBakedUploadData* baked_upload_data = (LLBakedUploadData*)userdata; |
491 | 491 | ||
492 | LLVOAvatar* avatar = gAgent.getAvatarObject(); | 492 | LLVOAvatar* avatar = gAgent.getAvatarObject(); |
493 | 493 | ||
diff --git a/linden/indra/newview/llviewercontrol.cpp b/linden/indra/newview/llviewercontrol.cpp index de89965..86e58d1 100644 --- a/linden/indra/newview/llviewercontrol.cpp +++ b/linden/indra/newview/llviewercontrol.cpp | |||
@@ -57,8 +57,8 @@ LLControlGroup gCrashSettings; // saved at end of session | |||
57 | LLString gLastRunVersion; | 57 | LLString gLastRunVersion; |
58 | LLString gCurrentVersion; | 58 | LLString gCurrentVersion; |
59 | 59 | ||
60 | char gSettingsFileName[LL_MAX_PATH]; | 60 | LLString gSettingsFileName; |
61 | char gPerAccountSettingsFileName[LL_MAX_PATH] = ""; | 61 | LLString gPerAccountSettingsFileName; |
62 | 62 | ||
63 | LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater("Configuration Editor") | 63 | LLFloaterSettingsDebug::LLFloaterSettingsDebug() : LLFloater("Configuration Editor") |
64 | { | 64 | { |
diff --git a/linden/indra/newview/llviewercontrol.h b/linden/indra/newview/llviewercontrol.h index 06d666e..4be4313 100644 --- a/linden/indra/newview/llviewercontrol.h +++ b/linden/indra/newview/llviewercontrol.h | |||
@@ -72,8 +72,7 @@ extern LLControlGroup gCrashSettings; | |||
72 | extern LLString gLastRunVersion; | 72 | extern LLString gLastRunVersion; |
73 | extern LLString gCurrentVersion; | 73 | extern LLString gCurrentVersion; |
74 | 74 | ||
75 | extern char gSettingsFileName[LL_MAX_PATH]; | 75 | extern LLString gSettingsFileName; |
76 | extern char gPerAccountSettingsFileName[LL_MAX_PATH]; | 76 | extern LLString gPerAccountSettingsFileName; |
77 | extern const char *DEFAULT_SETTINGS_FILE; | ||
78 | 77 | ||
79 | #endif // LL_LLVIEWERCONTROL_H | 78 | #endif // LL_LLVIEWERCONTROL_H |
diff --git a/linden/indra/newview/llviewerimage.cpp b/linden/indra/newview/llviewerimage.cpp index ad1604e..7500ada 100644 --- a/linden/indra/newview/llviewerimage.cpp +++ b/linden/indra/newview/llviewerimage.cpp | |||
@@ -45,7 +45,6 @@ | |||
45 | #include "llvfs.h" | 45 | #include "llvfs.h" |
46 | #include "message.h" | 46 | #include "message.h" |
47 | #include "lltimer.h" | 47 | #include "lltimer.h" |
48 | //#include "vmath.h" // For frand | ||
49 | 48 | ||
50 | // viewer includes | 49 | // viewer includes |
51 | #include "llviewerimagelist.h" | 50 | #include "llviewerimagelist.h" |
diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index 1ed6525..487a9f8 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp | |||
@@ -449,6 +449,7 @@ bool LLViewerInventoryCategory::fetchDescendents() | |||
449 | 449 | ||
450 | bool LLViewerInventoryCategory::importFileLocal(FILE* fp) | 450 | bool LLViewerInventoryCategory::importFileLocal(FILE* fp) |
451 | { | 451 | { |
452 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
452 | char buffer[MAX_STRING]; | 453 | char buffer[MAX_STRING]; |
453 | char keyword[MAX_STRING]; | 454 | char keyword[MAX_STRING]; |
454 | char valuestr[MAX_STRING]; | 455 | char valuestr[MAX_STRING]; |
@@ -458,7 +459,7 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp) | |||
458 | while(!feof(fp)) | 459 | while(!feof(fp)) |
459 | { | 460 | { |
460 | fgets(buffer, MAX_STRING, fp); | 461 | fgets(buffer, MAX_STRING, fp); |
461 | sscanf(buffer, " %s %s", keyword, valuestr); | 462 | sscanf(buffer, " %254s %254s", keyword, valuestr); |
462 | if(!keyword) | 463 | if(!keyword) |
463 | { | 464 | { |
464 | continue; | 465 | continue; |
@@ -491,7 +492,7 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp) | |||
491 | { | 492 | { |
492 | //strcpy(valuestr, buffer + strlen(keyword) + 3); | 493 | //strcpy(valuestr, buffer + strlen(keyword) + 3); |
493 | // *NOTE: Not ANSI C, but widely supported. | 494 | // *NOTE: Not ANSI C, but widely supported. |
494 | sscanf(buffer, " %s %[^|]", keyword, valuestr); | 495 | sscanf(buffer, " %254s %254[^|]", keyword, valuestr); |
495 | mName.assign(valuestr); | 496 | mName.assign(valuestr); |
496 | LLString::replaceNonstandardASCII(mName, ' '); | 497 | LLString::replaceNonstandardASCII(mName, ' '); |
497 | LLString::replaceChar(mName, '|', ' '); | 498 | LLString::replaceChar(mName, '|', ' '); |
diff --git a/linden/indra/newview/llviewerkeyboard.cpp b/linden/indra/newview/llviewerkeyboard.cpp index 531cb89..c5ada54 100644 --- a/linden/indra/newview/llviewerkeyboard.cpp +++ b/linden/indra/newview/llviewerkeyboard.cpp | |||
@@ -704,6 +704,7 @@ S32 LLViewerKeyboard::loadBindings(const char *filename) | |||
704 | FILE *fp; | 704 | FILE *fp; |
705 | const S32 BUFFER_SIZE = 2048; | 705 | const S32 BUFFER_SIZE = 2048; |
706 | char buffer[BUFFER_SIZE]; | 706 | char buffer[BUFFER_SIZE]; |
707 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
707 | char mode_string[MAX_STRING]; | 708 | char mode_string[MAX_STRING]; |
708 | char key_string[MAX_STRING]; | 709 | char key_string[MAX_STRING]; |
709 | char mask_string[MAX_STRING]; | 710 | char mask_string[MAX_STRING]; |
@@ -733,7 +734,7 @@ S32 LLViewerKeyboard::loadBindings(const char *filename) | |||
733 | if (buffer[0] == '#' || buffer[0] == '\n') continue; | 734 | if (buffer[0] == '#' || buffer[0] == '\n') continue; |
734 | 735 | ||
735 | // grab the binding strings | 736 | // grab the binding strings |
736 | tokens_read = sscanf(buffer, "%s %s %s %s", mode_string, key_string, mask_string, function_string); | 737 | tokens_read = sscanf(buffer, "%254s %254s %254s %254s", mode_string, key_string, mask_string, function_string); |
737 | 738 | ||
738 | if (tokens_read == EOF) | 739 | if (tokens_read == EOF) |
739 | { | 740 | { |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 921e650..3e5063e 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -3965,6 +3965,7 @@ void force_import_geometry(void*) | |||
3965 | child = root->getNextNamedChild()) | 3965 | child = root->getNextNamedChild()) |
3966 | { | 3966 | { |
3967 | // get object data | 3967 | // get object data |
3968 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
3968 | char name[255]; // Shape | 3969 | char name[255]; // Shape |
3969 | char description[255]; // Description | 3970 | char description[255]; // Description |
3970 | U32 material; // Material | 3971 | U32 material; // Material |
@@ -3997,9 +3998,9 @@ void force_import_geometry(void*) | |||
3997 | child->getAttributeString("PCode", &attribute); | 3998 | child->getAttributeString("PCode", &attribute); |
3998 | pcode = atoi(attribute.c_str()); | 3999 | pcode = atoi(attribute.c_str()); |
3999 | child->getAttributeString("Shape", &attribute); | 4000 | child->getAttributeString("Shape", &attribute); |
4000 | sscanf(attribute.c_str(), "%s", name); | 4001 | sscanf(attribute.c_str(), "%254s", name); |
4001 | child->getAttributeString("Description", &attribute); | 4002 | child->getAttributeString("Description", &attribute); |
4002 | sscanf(attribute.c_str(), "%s", description); | 4003 | sscanf(attribute.c_str(), "%254s", description); |
4003 | child->getAttributeString("Material", &attribute); | 4004 | child->getAttributeString("Material", &attribute); |
4004 | material = atoi(attribute.c_str()); | 4005 | material = atoi(attribute.c_str()); |
4005 | child->getAttributeString("Scale", &attribute); | 4006 | child->getAttributeString("Scale", &attribute); |
@@ -4079,6 +4080,7 @@ void force_import_geometry(void*) | |||
4079 | // read the faces | 4080 | // read the faces |
4080 | U32 facenumber; | 4081 | U32 facenumber; |
4081 | LLColor4 color; | 4082 | LLColor4 color; |
4083 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
4082 | char texture[UUID_STR_LENGTH]; | 4084 | char texture[UUID_STR_LENGTH]; |
4083 | LLUUID texid; | 4085 | LLUUID texid; |
4084 | texid.toString(texture); | 4086 | texid.toString(texture); |
@@ -4089,7 +4091,7 @@ void force_import_geometry(void*) | |||
4089 | face->getAttributeString("FaceColor", &attribute); | 4091 | face->getAttributeString("FaceColor", &attribute); |
4090 | sscanf(attribute, "%d %f %f %f %f", &facenumber, &color.mV[VX], &color.mV[VY], &color.mV[VZ], &color.mV[VW]); | 4092 | sscanf(attribute, "%d %f %f %f %f", &facenumber, &color.mV[VX], &color.mV[VY], &color.mV[VZ], &color.mV[VW]); |
4091 | face->getAttributeString("Face", &attribute); | 4093 | face->getAttributeString("Face", &attribute); |
4092 | sscanf(attribute, "%d %f %f %f %f %f %d %s", &facenumber, &sx, &sy, &ox, &oy, &rot, &bump, texture); | 4094 | sscanf(attribute, "%d %f %f %f %f %f %d %36s", &facenumber, &sx, &sy, &ox, &oy, &rot, &bump, texture); |
4093 | texid.set(texture); | 4095 | texid.set(texture); |
4094 | te.setColor(color); | 4096 | te.setColor(color); |
4095 | te.setBumpShinyFullbright(bump); | 4097 | te.setBumpShinyFullbright(bump); |
@@ -5025,7 +5027,7 @@ const char* upload_pick(void* data) | |||
5025 | LLFilePicker::ELoadFilter type; | 5027 | LLFilePicker::ELoadFilter type; |
5026 | if(data) | 5028 | if(data) |
5027 | { | 5029 | { |
5028 | type = (LLFilePicker::ELoadFilter)((S32)data); | 5030 | type = (LLFilePicker::ELoadFilter)((intptr_t)data); |
5029 | } | 5031 | } |
5030 | else | 5032 | else |
5031 | { | 5033 | { |
@@ -5506,7 +5508,8 @@ void upload_new_resource(const LLString& src_filename, std::string name, | |||
5506 | if (fscanf(in, "LindenResource\nversion %d\n", &version)) | 5508 | if (fscanf(in, "LindenResource\nversion %d\n", &version)) |
5507 | { | 5509 | { |
5508 | if (2 == version) | 5510 | if (2 == version) |
5509 | { | 5511 | { |
5512 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
5510 | char label[MAX_STRING]; | 5513 | char label[MAX_STRING]; |
5511 | char value[MAX_STRING]; | 5514 | char value[MAX_STRING]; |
5512 | S32 tokens_read; | 5515 | S32 tokens_read; |
@@ -5514,7 +5517,7 @@ void upload_new_resource(const LLString& src_filename, std::string name, | |||
5514 | { | 5517 | { |
5515 | label[0] = '\0'; | 5518 | label[0] = '\0'; |
5516 | value[0] = '\0'; | 5519 | value[0] = '\0'; |
5517 | tokens_read = sscanf(buf, "%s %s\n", label, value); | 5520 | tokens_read = sscanf(buf, "%254s %254s\n", label, value); |
5518 | 5521 | ||
5519 | llinfos << "got: " << label << " = " << value | 5522 | llinfos << "got: " << label << " = " << value |
5520 | << llendl; | 5523 | << llendl; |
@@ -5930,7 +5933,7 @@ void handle_export_selected( void * ) | |||
5930 | 5933 | ||
5931 | BOOL menu_check_build_tool( void* user_data ) | 5934 | BOOL menu_check_build_tool( void* user_data ) |
5932 | { | 5935 | { |
5933 | S32 index = (S32) user_data; | 5936 | S32 index = (intptr_t) user_data; |
5934 | return gCurrentToolset->isToolSelected( index ); | 5937 | return gCurrentToolset->isToolSelected( index ); |
5935 | } | 5938 | } |
5936 | 5939 | ||
@@ -6223,7 +6226,7 @@ class LLObjectEnableSitOrStand : public view_listener_t | |||
6223 | { | 6226 | { |
6224 | bool new_value = false; | 6227 | bool new_value = false; |
6225 | LLViewerObject* dest_object = NULL; | 6228 | LLViewerObject* dest_object = NULL; |
6226 | if(dest_object = gObjectList.findObject(gLastHitObjectID)) | 6229 | if((dest_object = gObjectList.findObject(gLastHitObjectID))) |
6227 | { | 6230 | { |
6228 | if(dest_object->getPCode() == LL_PCODE_VOLUME) | 6231 | if(dest_object->getPCode() == LL_PCODE_VOLUME) |
6229 | { | 6232 | { |
@@ -8075,7 +8078,7 @@ void handle_debug_avatar_textures(void*) | |||
8075 | 8078 | ||
8076 | void handle_grab_texture(void* data) | 8079 | void handle_grab_texture(void* data) |
8077 | { | 8080 | { |
8078 | LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex) ((U32) data); | 8081 | LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex)((intptr_t)data); |
8079 | LLVOAvatar* avatar = gAgent.getAvatarObject(); | 8082 | LLVOAvatar* avatar = gAgent.getAvatarObject(); |
8080 | if ( avatar ) | 8083 | if ( avatar ) |
8081 | { | 8084 | { |
@@ -8166,7 +8169,7 @@ void handle_grab_texture(void* data) | |||
8166 | 8169 | ||
8167 | BOOL enable_grab_texture(void* data) | 8170 | BOOL enable_grab_texture(void* data) |
8168 | { | 8171 | { |
8169 | LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex) ((U32) data); | 8172 | LLVOAvatar::ETextureIndex index = (LLVOAvatar::ETextureIndex)((intptr_t)data); |
8170 | LLVOAvatar* avatar = gAgent.getAvatarObject(); | 8173 | LLVOAvatar* avatar = gAgent.getAvatarObject(); |
8171 | if ( avatar ) | 8174 | if ( avatar ) |
8172 | { | 8175 | { |
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index ba5be0a..124ae13 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -1999,7 +1999,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) | |||
1999 | && chatter != gAgent.getAvatarObject()) | 1999 | && chatter != gAgent.getAvatarObject()) |
2000 | { | 2000 | { |
2001 | gAgent.heardChat(chat); | 2001 | gAgent.heardChat(chat); |
2002 | if (gLindenLabRandomNumber.llrand(2) == 0) | 2002 | if (ll_rand(2) == 0) |
2003 | { | 2003 | { |
2004 | gAgent.setLookAt(LOOKAT_TARGET_AUTO_LISTEN, chatter, LLVector3::zero); | 2004 | gAgent.setLookAt(LOOKAT_TARGET_AUTO_LISTEN, chatter, LLVector3::zero); |
2005 | } | 2005 | } |
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp index d034aa7..40930e6 100644 --- a/linden/indra/newview/llviewerobject.cpp +++ b/linden/indra/newview/llviewerobject.cpp | |||
@@ -2396,6 +2396,7 @@ void LLViewerObject::loadTaskInvFile(const char* filename) | |||
2396 | if(ifs.good()) | 2396 | if(ifs.good()) |
2397 | { | 2397 | { |
2398 | char buffer[MAX_STRING]; | 2398 | char buffer[MAX_STRING]; |
2399 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
2399 | char keyword[MAX_STRING]; | 2400 | char keyword[MAX_STRING]; |
2400 | if(mInventory) | 2401 | if(mInventory) |
2401 | { | 2402 | { |
@@ -2408,7 +2409,7 @@ void LLViewerObject::loadTaskInvFile(const char* filename) | |||
2408 | while(ifs.good()) | 2409 | while(ifs.good()) |
2409 | { | 2410 | { |
2410 | ifs.getline(buffer, MAX_STRING); | 2411 | ifs.getline(buffer, MAX_STRING); |
2411 | sscanf(buffer, " %s", keyword); | 2412 | sscanf(buffer, " %254s", keyword); |
2412 | if(0 == strcmp("inv_item", keyword)) | 2413 | if(0 == strcmp("inv_item", keyword)) |
2413 | { | 2414 | { |
2414 | LLPointer<LLInventoryObject> inv = new LLViewerInventoryItem; | 2415 | LLPointer<LLInventoryObject> inv = new LLViewerInventoryItem; |
diff --git a/linden/indra/newview/llviewerpartsim.cpp b/linden/indra/newview/llviewerpartsim.cpp index 1175553..be2c90f 100644 --- a/linden/indra/newview/llviewerpartsim.cpp +++ b/linden/indra/newview/llviewerpartsim.cpp | |||
@@ -418,7 +418,7 @@ BOOL LLViewerPartSim::shouldAddPart() | |||
418 | F32 frac = (F32)sParticleCount/(F32)sMaxParticleCount; | 418 | F32 frac = (F32)sParticleCount/(F32)sMaxParticleCount; |
419 | frac -= 0.75; | 419 | frac -= 0.75; |
420 | frac *= 3.f; | 420 | frac *= 3.f; |
421 | if (frand(1.f) < frac) | 421 | if (ll_frand() < frac) |
422 | { | 422 | { |
423 | // Skip... | 423 | // Skip... |
424 | return FALSE; | 424 | return FALSE; |
@@ -549,9 +549,9 @@ void LLViewerPartSim::updateSimulation() | |||
549 | // pain. | 549 | // pain. |
550 | S32 i; | 550 | S32 i; |
551 | S32 count = mViewerPartSources.count(); | 551 | S32 count = mViewerPartSources.count(); |
552 | S32 start = (S32)frand((F32)count); | 552 | S32 start = (S32)ll_frand((F32)count); |
553 | S32 dir = 1; | 553 | S32 dir = 1; |
554 | if (frand(1.0) > 0.5f) | 554 | if (ll_frand() > 0.5f) |
555 | { | 555 | { |
556 | dir = -1; | 556 | dir = -1; |
557 | } | 557 | } |
diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp index ceb6761..39869e2 100644 --- a/linden/indra/newview/llviewerpartsource.cpp +++ b/linden/indra/newview/llviewerpartsource.cpp | |||
@@ -213,9 +213,9 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
213 | F32 mvs; | 213 | F32 mvs; |
214 | do | 214 | do |
215 | { | 215 | { |
216 | part_dir_vector.mV[VX] = frand(2.f) - 1.f; | 216 | part_dir_vector.mV[VX] = ll_frand(2.f) - 1.f; |
217 | part_dir_vector.mV[VY] = frand(2.f) - 1.f; | 217 | part_dir_vector.mV[VY] = ll_frand(2.f) - 1.f; |
218 | part_dir_vector.mV[VZ] = frand(2.f) - 1.f; | 218 | part_dir_vector.mV[VZ] = ll_frand(2.f) - 1.f; |
219 | mvs = part_dir_vector.magVecSquared(); | 219 | mvs = part_dir_vector.magVecSquared(); |
220 | } | 220 | } |
221 | while ((mvs > 1.f) || (mvs < 0.01f)); | 221 | while ((mvs > 1.f) || (mvs < 0.01f)); |
@@ -223,7 +223,7 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
223 | part_dir_vector.normVec(); | 223 | part_dir_vector.normVec(); |
224 | part.mPosAgent += mPartSysData.mBurstRadius*part_dir_vector; | 224 | part.mPosAgent += mPartSysData.mBurstRadius*part_dir_vector; |
225 | part.mVelocity = part_dir_vector; | 225 | part.mVelocity = part_dir_vector; |
226 | F32 speed = mPartSysData.mBurstSpeedMin + frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); | 226 | F32 speed = mPartSysData.mBurstSpeedMin + ll_frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); |
227 | part.mVelocity *= speed; | 227 | part.mVelocity *= speed; |
228 | } | 228 | } |
229 | else if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE | 229 | else if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE |
@@ -242,10 +242,10 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
242 | F32 outerAngle = mPartSysData.mOuterAngle; | 242 | F32 outerAngle = mPartSysData.mOuterAngle; |
243 | 243 | ||
244 | // generate a random angle within the given space... | 244 | // generate a random angle within the given space... |
245 | F32 angle = innerAngle + frand(outerAngle - innerAngle); | 245 | F32 angle = innerAngle + ll_frand(outerAngle - innerAngle); |
246 | 246 | ||
247 | // split which side it will go on randomly... | 247 | // split which side it will go on randomly... |
248 | if (frand(1.0) < 0.5) | 248 | if (ll_frand() < 0.5) |
249 | { | 249 | { |
250 | angle = -angle; | 250 | angle = -angle; |
251 | } | 251 | } |
@@ -256,7 +256,7 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
256 | // If this is a cone pattern, rotate again to create the cone. | 256 | // If this is a cone pattern, rotate again to create the cone. |
257 | if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE) | 257 | if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE) |
258 | { | 258 | { |
259 | part_dir_vector.rotVec(frand(4*F_PI), 0.0, 0.0, 1.0); | 259 | part_dir_vector.rotVec(ll_frand(4*F_PI), 0.0, 0.0, 1.0); |
260 | } | 260 | } |
261 | 261 | ||
262 | // Only apply this rotation if using the deprecated angles. | 262 | // Only apply this rotation if using the deprecated angles. |
@@ -276,7 +276,7 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
276 | 276 | ||
277 | part.mVelocity = part_dir_vector; | 277 | part.mVelocity = part_dir_vector; |
278 | 278 | ||
279 | F32 speed = mPartSysData.mBurstSpeedMin + frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); | 279 | F32 speed = mPartSysData.mBurstSpeedMin + ll_frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); |
280 | part.mVelocity *= speed; | 280 | part.mVelocity *= speed; |
281 | } | 281 | } |
282 | else | 282 | else |
@@ -459,7 +459,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt) | |||
459 | part.mLastUpdateTime = 0.f; | 459 | part.mLastUpdateTime = 0.f; |
460 | part.mScale.mV[0] = 0.25f; | 460 | part.mScale.mV[0] = 0.25f; |
461 | part.mScale.mV[1] = 0.25f; | 461 | part.mScale.mV[1] = 0.25f; |
462 | part.mParameter = frand(F_TWO_PI); | 462 | part.mParameter = ll_frand(F_TWO_PI); |
463 | 463 | ||
464 | gWorldPointer->mPartSim.addPart(part); | 464 | gWorldPointer->mPartSim.addPart(part); |
465 | } | 465 | } |
@@ -720,7 +720,7 @@ void LLViewerPartSourceChat::update(const F32 dt) | |||
720 | part.mLastUpdateTime = 0.f; | 720 | part.mLastUpdateTime = 0.f; |
721 | part.mScale.mV[0] = 0.25f; | 721 | part.mScale.mV[0] = 0.25f; |
722 | part.mScale.mV[1] = 0.25f; | 722 | part.mScale.mV[1] = 0.25f; |
723 | part.mParameter = frand(F_TWO_PI); | 723 | part.mParameter = ll_frand(F_TWO_PI); |
724 | 724 | ||
725 | gWorldPointer->mPartSim.addPart(part); | 725 | gWorldPointer->mPartSim.addPart(part); |
726 | } | 726 | } |
diff --git a/linden/indra/newview/llviewerstats.cpp b/linden/indra/newview/llviewerstats.cpp index e1e783c..e04918e 100644 --- a/linden/indra/newview/llviewerstats.cpp +++ b/linden/indra/newview/llviewerstats.cpp | |||
@@ -57,8 +57,8 @@ public: | |||
57 | 57 | ||
58 | const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = | 58 | const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = |
59 | { | 59 | { |
60 | // ST_MOUSELOOK_SECONDS | 60 | // ST_VERSION |
61 | StatAttributes("Seconds in Mouselook", FALSE, TRUE), | 61 | StatAttributes("Version", TRUE, FALSE), |
62 | // ST_AVATAR_EDIT_SECONDS | 62 | // ST_AVATAR_EDIT_SECONDS |
63 | StatAttributes("Seconds in Edit Appearence", FALSE, TRUE), | 63 | StatAttributes("Seconds in Edit Appearence", FALSE, TRUE), |
64 | // ST_TOOLBOX_SECONDS | 64 | // ST_TOOLBOX_SECONDS |
@@ -77,10 +77,10 @@ const StatAttributes STAT_INFO[LLViewerStats::ST_COUNT] = | |||
77 | StatAttributes("Object rez count", FALSE, FALSE), | 77 | StatAttributes("Object rez count", FALSE, FALSE), |
78 | // ST_FPS_10_SECONDS | 78 | // ST_FPS_10_SECONDS |
79 | StatAttributes("Seconds below 10 FPS", FALSE, TRUE), | 79 | StatAttributes("Seconds below 10 FPS", FALSE, TRUE), |
80 | // ST_FPS_5_SECONDS | ||
81 | StatAttributes("Seconds below 5 FPS", FALSE, TRUE), | ||
82 | // ST_FPS_2_SECONDS | 80 | // ST_FPS_2_SECONDS |
83 | StatAttributes("Seconds below 2 FPS", FALSE, TRUE), | 81 | StatAttributes("Seconds below 2 FPS", FALSE, TRUE), |
82 | // ST_MOUSELOOK_SECONDS | ||
83 | StatAttributes("Seconds in Mouselook", FALSE, TRUE), | ||
84 | // ST_FLY_COUNT | 84 | // ST_FLY_COUNT |
85 | StatAttributes("Fly count", FALSE, FALSE), | 85 | StatAttributes("Fly count", FALSE, FALSE), |
86 | // ST_TELEPORT_COUNT | 86 | // ST_TELEPORT_COUNT |
@@ -248,10 +248,6 @@ void LLViewerStats::updateFrameStats(const F64 time_diff) | |||
248 | { | 248 | { |
249 | incStat(LLViewerStats::ST_FPS_2_SECONDS, time_diff); | 249 | incStat(LLViewerStats::ST_FPS_2_SECONDS, time_diff); |
250 | } | 250 | } |
251 | if (time_diff >= 0.2) | ||
252 | { | ||
253 | incStat(LLViewerStats::ST_FPS_5_SECONDS, time_diff); | ||
254 | } | ||
255 | if (time_diff >= 0.125) | 251 | if (time_diff >= 0.125) |
256 | { | 252 | { |
257 | incStat(LLViewerStats::ST_FPS_8_SECONDS, time_diff); | 253 | incStat(LLViewerStats::ST_FPS_8_SECONDS, time_diff); |
diff --git a/linden/indra/newview/llviewerstats.h b/linden/indra/newview/llviewerstats.h index 9b446ec..a3eb4c1 100644 --- a/linden/indra/newview/llviewerstats.h +++ b/linden/indra/newview/llviewerstats.h | |||
@@ -98,7 +98,7 @@ public: | |||
98 | // in statTypeToText in llviewerstats.cpp | 98 | // in statTypeToText in llviewerstats.cpp |
99 | enum EStatType | 99 | enum EStatType |
100 | { | 100 | { |
101 | ST_MOUSELOOK_SECONDS = 0, | 101 | ST_VERSION = 0, |
102 | ST_AVATAR_EDIT_SECONDS = 1, | 102 | ST_AVATAR_EDIT_SECONDS = 1, |
103 | ST_TOOLBOX_SECONDS = 2, | 103 | ST_TOOLBOX_SECONDS = 2, |
104 | ST_CHAT_COUNT = 3, | 104 | ST_CHAT_COUNT = 3, |
@@ -108,8 +108,8 @@ public: | |||
108 | ST_CREATE_COUNT = 7, | 108 | ST_CREATE_COUNT = 7, |
109 | ST_REZ_COUNT = 8, | 109 | ST_REZ_COUNT = 8, |
110 | ST_FPS_10_SECONDS = 9, | 110 | ST_FPS_10_SECONDS = 9, |
111 | ST_FPS_5_SECONDS = 10, | 111 | ST_FPS_2_SECONDS = 10, |
112 | ST_FPS_2_SECONDS = 11, | 112 | ST_MOUSELOOK_SECONDS = 11, |
113 | ST_FLY_COUNT = 12, | 113 | ST_FLY_COUNT = 12, |
114 | ST_TELEPORT_COUNT = 13, | 114 | ST_TELEPORT_COUNT = 13, |
115 | ST_OBJECT_DELETE_COUNT = 14, | 115 | ST_OBJECT_DELETE_COUNT = 14, |
diff --git a/linden/indra/newview/llvoavatar.cpp b/linden/indra/newview/llvoavatar.cpp index 3d4f1c0..ece24e0 100644 --- a/linden/indra/newview/llvoavatar.cpp +++ b/linden/indra/newview/llvoavatar.cpp | |||
@@ -2382,7 +2382,7 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) | |||
2382 | static const F32 UPDATE_TIME = .5f; | 2382 | static const F32 UPDATE_TIME = .5f; |
2383 | if (mUpdateLODTimer.hasExpired()) | 2383 | if (mUpdateLODTimer.hasExpired()) |
2384 | { | 2384 | { |
2385 | mUpdateLODTimer.setTimerExpirySec(UPDATE_TIME * (.75f + frand(0.5f))); | 2385 | mUpdateLODTimer.setTimerExpirySec(UPDATE_TIME * (.75f + ll_frand(0.5f))); |
2386 | updateJointLODs(); | 2386 | updateJointLODs(); |
2387 | } | 2387 | } |
2388 | 2388 | ||
diff --git a/linden/indra/newview/llvograss.cpp b/linden/indra/newview/llvograss.cpp index 048ae61..58e5378 100644 --- a/linden/indra/newview/llvograss.cpp +++ b/linden/indra/newview/llvograss.cpp | |||
@@ -229,26 +229,26 @@ void LLVOGrass::initClass() | |||
229 | { | 229 | { |
230 | if (1) //(i%2 == 0) Uncomment for X blading | 230 | if (1) //(i%2 == 0) Uncomment for X blading |
231 | { | 231 | { |
232 | F32 u = sqrt(-2.0f * log(frand(1.0))); | 232 | F32 u = sqrt(-2.0f * log(ll_frand())); |
233 | F32 v = 2.0f * F_PI * frand(1.0); | 233 | F32 v = 2.0f * F_PI * ll_frand(); |
234 | 234 | ||
235 | x = u * sin(v) * GRASS_DISTRIBUTION_SD; | 235 | x = u * sin(v) * GRASS_DISTRIBUTION_SD; |
236 | y = u * cos(v) * GRASS_DISTRIBUTION_SD; | 236 | y = u * cos(v) * GRASS_DISTRIBUTION_SD; |
237 | 237 | ||
238 | rot = frand(F_PI); | 238 | rot = ll_frand(F_PI); |
239 | } | 239 | } |
240 | else | 240 | else |
241 | { | 241 | { |
242 | rot += (F_PI*0.4f + frand(0.2f*F_PI)); | 242 | rot += (F_PI*0.4f + ll_frand(0.2f*F_PI)); |
243 | } | 243 | } |
244 | 244 | ||
245 | exp_x[i] = x; | 245 | exp_x[i] = x; |
246 | exp_y[i] = y; | 246 | exp_y[i] = y; |
247 | rot_x[i] = sin(rot); | 247 | rot_x[i] = sin(rot); |
248 | rot_y[i] = cos(rot); | 248 | rot_y[i] = cos(rot); |
249 | dz_x[i] = frand(GRASS_BLADE_BASE * 0.25f); | 249 | dz_x[i] = ll_frand(GRASS_BLADE_BASE * 0.25f); |
250 | dz_y[i] = frand(GRASS_BLADE_BASE * 0.25f); | 250 | dz_y[i] = ll_frand(GRASS_BLADE_BASE * 0.25f); |
251 | w_mod[i] = 0.5f + frand(1.f); // Degree to which blade is moved by wind | 251 | w_mod[i] = 0.5f + ll_frand(); // Degree to which blade is moved by wind |
252 | 252 | ||
253 | } | 253 | } |
254 | } | 254 | } |
diff --git a/linden/indra/newview/llvopart.cpp b/linden/indra/newview/llvopart.cpp index 5e471be..6b38cf9 100644 --- a/linden/indra/newview/llvopart.cpp +++ b/linden/indra/newview/llvopart.cpp | |||
@@ -654,7 +654,7 @@ void LLVOPart::setParticleCountdownStateWaitingDead(const U32 particleNumber) | |||
654 | 654 | ||
655 | frequency = mSpawnFrequency; | 655 | frequency = mSpawnFrequency; |
656 | // **** Hack! remainingLifetime counts up from negative, to avoid subtracts! - djs | 656 | // **** Hack! remainingLifetime counts up from negative, to avoid subtracts! - djs |
657 | mParticleState[particleNumber].remainingLifetime = -(((mSpawnFrequencyRange * 2.0f)*frand(1.f)) + frequency - mSpawnFrequencyRange); | 657 | mParticleState[particleNumber].remainingLifetime = -(((mSpawnFrequencyRange * 2.0f)*ll_frand()) + frequency - mSpawnFrequencyRange); |
658 | } | 658 | } |
659 | 659 | ||
660 | //Can override later | 660 | //Can override later |
@@ -672,9 +672,9 @@ void LLVOPart::spawnParticle(const U32 particleNumber) | |||
672 | mDeadArr[particleNumber] = 0; // not dead yet! | 672 | mDeadArr[particleNumber] = 0; // not dead yet! |
673 | 673 | ||
674 | //j = pos_offset_i(particleNumber); | 674 | //j = pos_offset_i(particleNumber); |
675 | mParticleState[particleNumber].position[0] = 2.f*mSpawnRange*(frand(1.f)) - mSpawnRange; | 675 | mParticleState[particleNumber].position[0] = 2.f*mSpawnRange*(ll_frand()) - mSpawnRange; |
676 | mParticleState[particleNumber].position[1] = 2.f*mSpawnRange*(frand(1.f)) - mSpawnRange; | 676 | mParticleState[particleNumber].position[1] = 2.f*mSpawnRange*(ll_frand()) - mSpawnRange; |
677 | mParticleState[particleNumber].position[2] = 2.f*mSpawnRange*(frand(1.f)) - mSpawnRange; | 677 | mParticleState[particleNumber].position[2] = 2.f*mSpawnRange*(ll_frand()) - mSpawnRange; |
678 | 678 | ||
679 | //mParticleStateArray[j] = (pos_ranges[1] - pos_ranges[0])*(F32)rand()/((F32)RAND_MAX) + pos_ranges[0]; | 679 | //mParticleStateArray[j] = (pos_ranges[1] - pos_ranges[0])*(F32)rand()/((F32)RAND_MAX) + pos_ranges[0]; |
680 | //j++; | 680 | //j++; |
@@ -687,12 +687,12 @@ void LLVOPart::spawnParticle(const U32 particleNumber) | |||
687 | //Create the ranged direction vector first - then rotate by the actual direction and then scale | 687 | //Create the ranged direction vector first - then rotate by the actual direction and then scale |
688 | //Creating a random value about 1,0,0 | 688 | //Creating a random value about 1,0,0 |
689 | //1. pick a random angle YZ orientation through full circle. | 689 | //1. pick a random angle YZ orientation through full circle. |
690 | randomUnitValue = (frand(1.f)); | 690 | randomUnitValue = (ll_frand()); |
691 | direction.mV[VY] = sinf(randomUnitValue * 2.0 * F_PI); | 691 | direction.mV[VY] = sinf(randomUnitValue * 2.0 * F_PI); |
692 | direction.mV[VZ] = cosf(randomUnitValue * 2.0 * F_PI); | 692 | direction.mV[VZ] = cosf(randomUnitValue * 2.0 * F_PI); |
693 | 693 | ||
694 | //2. pick a rotation to this angle to project into z which is scaled by mSpawnDirectionRange | 694 | //2. pick a rotation to this angle to project into z which is scaled by mSpawnDirectionRange |
695 | randomUnitValue = (frand(1.f)); | 695 | randomUnitValue = (ll_frand()); |
696 | randomUnitValue *= mSpawnDirectionRange; | 696 | randomUnitValue *= mSpawnDirectionRange; |
697 | direction.mV[VY] = direction.mV[VY] * sinf(randomUnitValue * F_PI); | 697 | direction.mV[VY] = direction.mV[VY] * sinf(randomUnitValue * F_PI); |
698 | direction.mV[VZ] = direction.mV[VZ] * sinf(randomUnitValue * F_PI); | 698 | direction.mV[VZ] = direction.mV[VZ] * sinf(randomUnitValue * F_PI); |
@@ -804,7 +804,7 @@ void LLVOPart::spawnParticle(const U32 particleNumber) | |||
804 | 804 | ||
805 | 805 | ||
806 | //4. scale the vector by a random scale by mSpawnVelocityRange and offset by mSpawnVelocity | 806 | //4. scale the vector by a random scale by mSpawnVelocityRange and offset by mSpawnVelocity |
807 | randomUnitValue = (frand(1.f)); | 807 | randomUnitValue = (ll_frand()); |
808 | randomUnitValue = (randomUnitValue * mSpawnVelocityRange) + mSpawnVelocity; | 808 | randomUnitValue = (randomUnitValue * mSpawnVelocityRange) + mSpawnVelocity; |
809 | 809 | ||
810 | mParticleState[particleNumber].velocity[0] = direction.mV[VX] * randomUnitValue; | 810 | mParticleState[particleNumber].velocity[0] = direction.mV[VX] * randomUnitValue; |
@@ -822,16 +822,16 @@ void LLVOPart::spawnParticle(const U32 particleNumber) | |||
822 | 822 | ||
823 | mParticleState[particleNumber].acceleration[2] = 0.0f; | 823 | mParticleState[particleNumber].acceleration[2] = 0.0f; |
824 | 824 | ||
825 | mParticleState[particleNumber].scale[0] = (mScale_range[1] - mScale_range[0])*frand(1.f) + mScale_range[0]; | 825 | mParticleState[particleNumber].scale[0] = (mScale_range[1] - mScale_range[0])*ll_frand() + mScale_range[0]; |
826 | mParticleState[particleNumber].scale[1] = (mScale_range[3] - mScale_range[2])*frand(1.f) + mScale_range[2]; | 826 | mParticleState[particleNumber].scale[1] = (mScale_range[3] - mScale_range[2])*ll_frand() + mScale_range[2]; |
827 | mParticleState[particleNumber].scale[2] = 0.0f; | 827 | mParticleState[particleNumber].scale[2] = 0.0f; |
828 | 828 | ||
829 | mParticleState[particleNumber].alpha[0] = (mAlpha_range[1] - mAlpha_range[0])*frand(1.f) + mAlpha_range[0]; | 829 | mParticleState[particleNumber].alpha[0] = (mAlpha_range[1] - mAlpha_range[0])*ll_frand() + mAlpha_range[0]; |
830 | mParticleState[particleNumber].alpha[1] = (mAlpha_range[3] - mAlpha_range[2])*frand(1.f) + mAlpha_range[2]; | 830 | mParticleState[particleNumber].alpha[1] = (mAlpha_range[3] - mAlpha_range[2])*ll_frand() + mAlpha_range[2]; |
831 | mParticleState[particleNumber].alpha[2] = 0.0f; | 831 | mParticleState[particleNumber].alpha[2] = 0.0f; |
832 | 832 | ||
833 | // **** Hack! remainingLifetime counts up from negative, to avoid subtracts! - djs | 833 | // **** Hack! remainingLifetime counts up from negative, to avoid subtracts! - djs |
834 | mParticleState[particleNumber].remainingLifetime = -((mIndividualLifetimeRange*2.0f)*frand(1.f) + mIndividualLifetime - mIndividualLifetimeRange); | 834 | mParticleState[particleNumber].remainingLifetime = -((mIndividualLifetimeRange*2.0f)*ll_frand() + mIndividualLifetime - mIndividualLifetimeRange); |
835 | 835 | ||
836 | //rest of the state - 0 for now | 836 | //rest of the state - 0 for now |
837 | mParticleState[particleNumber].deathOffset = 0.0f; | 837 | mParticleState[particleNumber].deathOffset = 0.0f; |
diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp index 10a765d..150f5cd 100644 --- a/linden/indra/newview/llvopartgroup.cpp +++ b/linden/indra/newview/llvopartgroup.cpp | |||
@@ -53,7 +53,7 @@ LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegi | |||
53 | setNumTEs(1); | 53 | setNumTEs(1); |
54 | setTETexture(0, LLUUID::null); | 54 | setTETexture(0, LLUUID::null); |
55 | mbCanSelect = FALSE; // users can't select particle systems | 55 | mbCanSelect = FALSE; // users can't select particle systems |
56 | mDebugColor = LLColor4(frand(1.f), frand(1.f), frand(1.f), 1.f); | 56 | mDebugColor = LLColor4(ll_frand(), ll_frand(), ll_frand(), 1.f); |
57 | } | 57 | } |
58 | 58 | ||
59 | 59 | ||
diff --git a/linden/indra/newview/llvosky.cpp b/linden/indra/newview/llvosky.cpp index 927b784..559e846 100644 --- a/linden/indra/newview/llvosky.cpp +++ b/linden/indra/newview/llvosky.cpp | |||
@@ -664,20 +664,18 @@ void LLVOSky::restoreGL() | |||
664 | 664 | ||
665 | void LLVOSky::updateHaze() | 665 | void LLVOSky::updateHaze() |
666 | { | 666 | { |
667 | time_t timer; | 667 | static LLRandLagFib607 weather_generator(LLUUID::getRandomSeed()); |
668 | time(&timer); | ||
669 | static LLRand WeatherRandomNumber(gmtime(&timer)->tm_mday); | ||
670 | if (gSavedSettings.getBOOL("FixedWeather")) | 668 | if (gSavedSettings.getBOOL("FixedWeather")) |
671 | { | 669 | { |
672 | WeatherRandomNumber.seed(8008135); | 670 | weather_generator.seed(8008135); |
673 | } | 671 | } |
674 | 672 | ||
675 | const F32 fo_upper_bound = 5; | 673 | const F32 fo_upper_bound = 5; |
676 | const F32 sca_upper_bound = 6; | 674 | const F32 sca_upper_bound = 6; |
677 | const F32 fo = 1 + WeatherRandomNumber.llfrand(fo_upper_bound - 1); | 675 | const F32 fo = 1 + (F32)weather_generator() *(fo_upper_bound - 1); |
678 | const static F32 upper = 0.5f / gFastLn.ln(fo_upper_bound); | 676 | const static F32 upper = 0.5f / gFastLn.ln(fo_upper_bound); |
679 | mHaze.setFalloff(fo); | 677 | mHaze.setFalloff(fo); |
680 | mHaze.setG(WeatherRandomNumber.llfrand(0.0f + upper * gFastLn.ln(fo))); | 678 | mHaze.setG((F32)weather_generator() * (0.0f + upper * gFastLn.ln(fo))); |
681 | LLColor3 sca; | 679 | LLColor3 sca; |
682 | const F32 cd = mCloudDensity * 3; | 680 | const F32 cd = mCloudDensity * 3; |
683 | F32 min_r = cd - 1; | 681 | F32 min_r = cd - 1; |
@@ -691,7 +689,7 @@ void LLVOSky::updateHaze() | |||
691 | max_r = sca_upper_bound; | 689 | max_r = sca_upper_bound; |
692 | } | 690 | } |
693 | 691 | ||
694 | sca.mV[0] = min_r + WeatherRandomNumber.llfrand(max_r - min_r);//frand(6); | 692 | sca.mV[0] = min_r + (F32)weather_generator() * (max_r - min_r); |
695 | 693 | ||
696 | min_r = sca.mV[0] - 0.1f; | 694 | min_r = sca.mV[0] - 0.1f; |
697 | if (min_r < 0) | 695 | if (min_r < 0) |
@@ -704,7 +702,7 @@ void LLVOSky::updateHaze() | |||
704 | max_r = sca_upper_bound; | 702 | max_r = sca_upper_bound; |
705 | } | 703 | } |
706 | 704 | ||
707 | sca.mV[1] = min_r + WeatherRandomNumber.llfrand(max_r - min_r); | 705 | sca.mV[1] = min_r + (F32)weather_generator() * (max_r - min_r); |
708 | 706 | ||
709 | min_r = sca.mV[1]; | 707 | min_r = sca.mV[1]; |
710 | if (min_r < 0) | 708 | if (min_r < 0) |
@@ -717,7 +715,7 @@ void LLVOSky::updateHaze() | |||
717 | max_r = sca_upper_bound; | 715 | max_r = sca_upper_bound; |
718 | } | 716 | } |
719 | 717 | ||
720 | sca.mV[2] = min_r + WeatherRandomNumber.llfrand(max_r - min_r); | 718 | sca.mV[2] = min_r + (F32)weather_generator() * (max_r - min_r); |
721 | 719 | ||
722 | sca = AIR_SCA_AVG * sca; | 720 | sca = AIR_SCA_AVG * sca; |
723 | 721 | ||
diff --git a/linden/indra/newview/llvostars.cpp b/linden/indra/newview/llvostars.cpp index d20c5da..3fd3b91 100644 --- a/linden/indra/newview/llvostars.cpp +++ b/linden/indra/newview/llvostars.cpp | |||
@@ -125,19 +125,19 @@ void LLVOStars::initStars() | |||
125 | U32 i; | 125 | U32 i; |
126 | for (i = 0; i < NUMBER_OF_STARS; i++ ) | 126 | for (i = 0; i < NUMBER_OF_STARS; i++ ) |
127 | { | 127 | { |
128 | v_p->mV[VX] = frand(1.f) - 0.5f; | 128 | v_p->mV[VX] = ll_frand() - 0.5f; |
129 | v_p->mV[VY] = frand(1.f) - 0.5f; | 129 | v_p->mV[VY] = ll_frand() - 0.5f; |
130 | 130 | ||
131 | // we only want stars on the top half of the dome! | 131 | // we only want stars on the top half of the dome! |
132 | 132 | ||
133 | v_p->mV[VZ] = frand(1.f)/2.f; | 133 | v_p->mV[VZ] = ll_frand()/2.f; |
134 | 134 | ||
135 | v_p->normVec(); | 135 | v_p->normVec(); |
136 | *v_p *= DISTANCE_TO_STARS; | 136 | *v_p *= DISTANCE_TO_STARS; |
137 | *v_i = llmin((F32)pow(frand(1.f),2.f) + 0.1f, 1.f); | 137 | *v_i = llmin((F32)pow(ll_frand(),2.f) + 0.1f, 1.f); |
138 | v_c->mV[VRED] = 0.75f + frand(1.f) * 0.25f ; | 138 | v_c->mV[VRED] = 0.75f + ll_frand() * 0.25f ; |
139 | v_c->mV[VGREEN] = 1.f ; | 139 | v_c->mV[VGREEN] = 1.f ; |
140 | v_c->mV[VBLUE] = 0.75f + frand(1.f) * 0.25f ; | 140 | v_c->mV[VBLUE] = 0.75f + ll_frand() * 0.25f ; |
141 | v_c->mV[VALPHA] = 1.f; | 141 | v_c->mV[VALPHA] = 1.f; |
142 | v_c->clamp(); | 142 | v_c->clamp(); |
143 | v_p++; | 143 | v_p++; |
@@ -179,7 +179,7 @@ void LLVOStars::updateStarColors() | |||
179 | sundir_factor = (1 - how_close_to_sun) / sunclose_range; | 179 | sundir_factor = (1 - how_close_to_sun) / sunclose_range; |
180 | } | 180 | } |
181 | intensity = *(v_i); | 181 | intensity = *(v_i); |
182 | F32 alpha = v_c->mV[VALPHA] + (frand(1.f) - 0.5f) * var * intensity; | 182 | F32 alpha = v_c->mV[VALPHA] + (ll_frand() - 0.5f) * var * intensity; |
183 | if (alpha < min * intensity) | 183 | if (alpha < min * intensity) |
184 | { | 184 | { |
185 | alpha = min * intensity; | 185 | alpha = min * intensity; |
diff --git a/linden/indra/newview/llvotreenew.cpp b/linden/indra/newview/llvotreenew.cpp index 40b0c58..d7fc635 100644 --- a/linden/indra/newview/llvotreenew.cpp +++ b/linden/indra/newview/llvotreenew.cpp | |||
@@ -138,9 +138,9 @@ void LLVOTreeNew::initClass() | |||
138 | //LLVOTreeNew::sParameters = LLTreeParams(); | 138 | //LLVOTreeNew::sParameters = LLTreeParams(); |
139 | 139 | ||
140 | // initialize an array of random numbers that we'll be using | 140 | // initialize an array of random numbers that we'll be using |
141 | gLindenLabRandomNumber.seed(0); | 141 | LLRandLagFib607 tree_rand; |
142 | for (i = 0; i < MAX_RAND_NUMS; i++) | 142 | for (i = 0; i < MAX_RAND_NUMS; i++) |
143 | sRandNums[i] = gLindenLabRandomNumber.llfrand(1.0); | 143 | sRandNums[i] = (F32)tree_rand(); |
144 | } | 144 | } |
145 | 145 | ||
146 | /* | 146 | /* |
@@ -959,7 +959,8 @@ void LLVOTreeNew::drawTree(LLDrawPool &draw_pool) | |||
959 | U8 i, j; | 959 | U8 i, j; |
960 | 960 | ||
961 | // seed the drawtree thing with the object's uuid to make it original but predictable... | 961 | // seed the drawtree thing with the object's uuid to make it original but predictable... |
962 | gLindenLabRandomNumber.seed(0); | 962 | // don't re-seed the process random number generator. bad. |
963 | //gLindenLabRandomNumber.seed(0); | ||
963 | 964 | ||
964 | // reset the rand offsets | 965 | // reset the rand offsets |
965 | for (i = 0; i < MAX_LEVELS; i++) mRandOffset[i] = 0; | 966 | for (i = 0; i < MAX_LEVELS; i++) mRandOffset[i] = 0; |
diff --git a/linden/indra/newview/llvotreenew.h b/linden/indra/newview/llvotreenew.h index 058bd19..936028a 100644 --- a/linden/indra/newview/llvotreenew.h +++ b/linden/indra/newview/llvotreenew.h | |||
@@ -78,7 +78,7 @@ public: | |||
78 | // return +- negPos | 78 | // return +- negPos |
79 | static S32 llrand_signed(S32 negPos) | 79 | static S32 llrand_signed(S32 negPos) |
80 | { | 80 | { |
81 | return (gLindenLabRandomNumber.llrand((U32)negPos * 2) - negPos); | 81 | return (ll_rand((U32)negPos * 2) - negPos); |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static S32 llrand_signed(S32 negPos, U32 index) | 84 | static S32 llrand_signed(S32 negPos, U32 index) |
@@ -94,7 +94,7 @@ public: | |||
94 | // return +- negPos | 94 | // return +- negPos |
95 | static F32 llfrand_signed(F32 negPos) | 95 | static F32 llfrand_signed(F32 negPos) |
96 | { | 96 | { |
97 | return (gLindenLabRandomNumber.llfrand(negPos * 2.0f) - negPos); | 97 | return (ll_frand(negPos * 2.0f) - negPos); |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static F32 llfrand_signed(F32 negPos, U32 index) | 100 | static F32 llfrand_signed(F32 negPos, U32 index) |
@@ -110,7 +110,7 @@ public: | |||
110 | // return between 0-pos | 110 | // return between 0-pos |
111 | static F32 llfrand_unsigned(F32 pos) | 111 | static F32 llfrand_unsigned(F32 pos) |
112 | { | 112 | { |
113 | return gLindenLabRandomNumber.llfrand(pos); | 113 | return ll_frand(pos); |
114 | }; | 114 | }; |
115 | 115 | ||
116 | static void cleanupTextures() {}; // not needed anymore | 116 | static void cleanupTextures() {}; // not needed anymore |
diff --git a/linden/indra/newview/llwearable.cpp b/linden/indra/newview/llwearable.cpp index 62a1d20..310eae5 100644 --- a/linden/indra/newview/llwearable.cpp +++ b/linden/indra/newview/llwearable.cpp | |||
@@ -265,6 +265,9 @@ BOOL LLWearable::exportFile( FILE* file ) | |||
265 | 265 | ||
266 | BOOL LLWearable::importFile( FILE* file ) | 266 | BOOL LLWearable::importFile( FILE* file ) |
267 | { | 267 | { |
268 | // *NOTE: changing the type or size of this buffer will require | ||
269 | // changes in the fscanf() code below. You would be better off | ||
270 | // rewriting this to use streams and not require an open FILE. | ||
268 | char text_buffer[2048]; | 271 | char text_buffer[2048]; |
269 | S32 fields_read = 0; | 272 | S32 fields_read = 0; |
270 | 273 | ||
@@ -295,7 +298,7 @@ BOOL LLWearable::importFile( FILE* file ) | |||
295 | else | 298 | else |
296 | { | 299 | { |
297 | ungetc( next_char, file ); | 300 | ungetc( next_char, file ); |
298 | fields_read = fscanf( file, "%[^\n]", text_buffer ); | 301 | fields_read = fscanf( file, "%2047[^\n]", text_buffer ); |
299 | if( (1 != fields_read) || (fgetc( file ) != '\n') ) | 302 | if( (1 != fields_read) || (fgetc( file ) != '\n') ) |
300 | { | 303 | { |
301 | llwarns << "Bad Wearable asset: early end of file" << llendl; | 304 | llwarns << "Bad Wearable asset: early end of file" << llendl; |
@@ -315,7 +318,7 @@ BOOL LLWearable::importFile( FILE* file ) | |||
315 | else | 318 | else |
316 | { | 319 | { |
317 | ungetc( next_char, file ); | 320 | ungetc( next_char, file ); |
318 | fields_read = fscanf( file, "%[^\n]", text_buffer ); | 321 | fields_read = fscanf( file, "%2047[^\n]", text_buffer ); |
319 | if( (1 != fields_read) || (fgetc( file ) != '\n') ) | 322 | if( (1 != fields_read) || (fgetc( file ) != '\n') ) |
320 | { | 323 | { |
321 | llwarns << "Bad Wearable asset: early end of file" << llendl; | 324 | llwarns << "Bad Wearable asset: early end of file" << llendl; |
@@ -422,7 +425,7 @@ BOOL LLWearable::importFile( FILE* file ) | |||
422 | for( i = 0; i < num_textures; i++ ) | 425 | for( i = 0; i < num_textures; i++ ) |
423 | { | 426 | { |
424 | S32 te = 0; | 427 | S32 te = 0; |
425 | fields_read = fscanf( file, "%d %s\n", &te, text_buffer); | 428 | fields_read = fscanf( file, "%d %2047s\n", &te, text_buffer); |
426 | if( fields_read != 2 ) | 429 | if( fields_read != 2 ) |
427 | { | 430 | { |
428 | llwarns << "Bad Wearable asset: bad texture, #" << i << llendl; | 431 | llwarns << "Bad Wearable asset: bad texture, #" << i << llendl; |
diff --git a/linden/indra/newview/llwebbrowserctrl.cpp b/linden/indra/newview/llwebbrowserctrl.cpp index afbff65..6d1ee28 100644 --- a/linden/indra/newview/llwebbrowserctrl.cpp +++ b/linden/indra/newview/llwebbrowserctrl.cpp | |||
@@ -251,8 +251,16 @@ void LLWebBrowserCtrl::navigateTo( std::string urlIn ) | |||
251 | 251 | ||
252 | // don't browse to anything that starts with secondlife:// | 252 | // don't browse to anything that starts with secondlife:// |
253 | if ( urlIn.length() >= protocol.length() ) | 253 | if ( urlIn.length() >= protocol.length() ) |
254 | { | ||
254 | if ( LLString::compareInsensitive( urlIn.substr( 0, protocol.length() ).c_str(), protocol.c_str() ) != 0 ) | 255 | if ( LLString::compareInsensitive( urlIn.substr( 0, protocol.length() ).c_str(), protocol.c_str() ) != 0 ) |
256 | { | ||
255 | LLMozLib::getInstance()->navigateTo( mEmbeddedBrowserWindowId, urlIn ); | 257 | LLMozLib::getInstance()->navigateTo( mEmbeddedBrowserWindowId, urlIn ); |
258 | } | ||
259 | } | ||
260 | else | ||
261 | { | ||
262 | LLMozLib::getInstance()->navigateTo( mEmbeddedBrowserWindowId, urlIn ); | ||
263 | } | ||
256 | } | 264 | } |
257 | 265 | ||
258 | //////////////////////////////////////////////////////////////////////////////// | 266 | //////////////////////////////////////////////////////////////////////////////// |
diff --git a/linden/indra/newview/llwebbrowserctrl.h b/linden/indra/newview/llwebbrowserctrl.h index 57c72c5..bad6e88 100644 --- a/linden/indra/newview/llwebbrowserctrl.h +++ b/linden/indra/newview/llwebbrowserctrl.h | |||
@@ -254,4 +254,4 @@ class LLWebBrowserTexture : public LLDynamicTexture | |||
254 | 254 | ||
255 | #endif // // LL_LIBXUL_ENABLED | 255 | #endif // // LL_LIBXUL_ENABLED |
256 | 256 | ||
257 | #endif // LL_LLWEBBROWSERCTRL_H \ No newline at end of file | 257 | #endif // LL_LLWEBBROWSERCTRL_H |
diff --git a/linden/indra/newview/releasenotes.txt b/linden/indra/newview/releasenotes.txt index a96a62a..4cce794 100644 --- a/linden/indra/newview/releasenotes.txt +++ b/linden/indra/newview/releasenotes.txt | |||
@@ -1,3 +1,21 @@ | |||
1 | Release Notes for Second Life 1.13.2(15) January 25, 2007 | ||
2 | ===================================== | ||
3 | Changes: | ||
4 | * Tapping Alt to focus on menus has been disabled | ||
5 | * Separate settings.ini file used by Beta and First Look clients | ||
6 | ** Uninstalling these clients will no longer remove Second Life user settings | ||
7 | |||
8 | Bug fixes: | ||
9 | * Alt-mouseclick no longer puts focus on the menus | ||
10 | * Popup warnings for sandbox regions reflect changes made in 1.13.2(11) | ||
11 | * Fixed error while editing profile if you have a classified | ||
12 | * Fixed Buy Pass option in pie menu not appearing unless access list for avatars is enabled | ||
13 | * Fixed build tool not changing type until you use another menu | ||
14 | * Fixed dragging position arrows sideways moves object vertically | ||
15 | * Fixed clicking More/Less in editor selects Create | ||
16 | * Fixed loud noise in wind on dual core systems | ||
17 | * Fixed a client crash | ||
18 | |||
1 | Release Notes for Second Life 1.13.2(12) January 19, 2007 | 19 | Release Notes for Second Life 1.13.2(12) January 19, 2007 |
2 | ===================================== | 20 | ===================================== |
3 | Bug fixes: | 21 | Bug fixes: |
diff --git a/linden/indra/newview/res/newViewRes.rc b/linden/indra/newview/res/newViewRes.rc index 44aab17..cf7b935 100644 --- a/linden/indra/newview/res/newViewRes.rc +++ b/linden/indra/newview/res/newViewRes.rc | |||
@@ -227,7 +227,7 @@ TOOLPIPETTE CURSOR "toolpipette.cur" | |||
227 | // | 227 | // |
228 | 228 | ||
229 | VS_VERSION_INFO VERSIONINFO | 229 | VS_VERSION_INFO VERSIONINFO |
230 | FILEVERSION 1,13,2,12 | 230 | FILEVERSION 1,13,2,15 |
231 | PRODUCTVERSION 1,13,2,0 | 231 | PRODUCTVERSION 1,13,2,0 |
232 | FILEFLAGSMASK 0x3fL | 232 | FILEFLAGSMASK 0x3fL |
233 | #ifdef _DEBUG | 233 | #ifdef _DEBUG |
@@ -245,7 +245,7 @@ BEGIN | |||
245 | BEGIN | 245 | BEGIN |
246 | VALUE "CompanyName", "Linden Lab" | 246 | VALUE "CompanyName", "Linden Lab" |
247 | VALUE "FileDescription", "Second Life" | 247 | VALUE "FileDescription", "Second Life" |
248 | VALUE "FileVersion", "1.13.2.12" | 248 | VALUE "FileVersion", "1.13.2.15" |
249 | VALUE "InternalName", "Second Life" | 249 | VALUE "InternalName", "Second Life" |
250 | VALUE "LegalCopyright", "Copyright © 2001-2006, Linden Research, Inc." | 250 | VALUE "LegalCopyright", "Copyright © 2001-2006, Linden Research, Inc." |
251 | VALUE "OriginalFilename", "SecondLife.exe" | 251 | VALUE "OriginalFilename", "SecondLife.exe" |
diff --git a/linden/indra/newview/rsyncfiles.txt b/linden/indra/newview/rsyncfiles.txt new file mode 100644 index 0000000..0763c5c --- /dev/null +++ b/linden/indra/newview/rsyncfiles.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | - *.cpp | ||
2 | - *.c | ||
3 | - *.h | ||
4 | - .svn/ | ||
5 | - CVS/ | ||
6 | - .cvsignore | ||
7 | - .DS_Store | ||
8 | - /app_settings/mozilla/ | ||
9 | - /app_settings/mozilla_debug/ | ||
10 | + /app_settings/ | ||
11 | + /character/ | ||
12 | + /help/ | ||
13 | + /trial/ | ||
14 | + /fonts/ | ||
15 | + /skins/ | ||
16 | + /cursors_mac/ | ||
17 | + /featuretable.txt | ||
18 | + /featuretable_mac.txt | ||
19 | + /releasenotes.txt | ||
20 | + /lsl_guide.html | ||
21 | + /secondlife.icns | ||
22 | + /gpu_table.txt | ||
diff --git a/linden/indra/newview/secondlife setup build firstlook.bat b/linden/indra/newview/secondlife setup build firstlook.bat new file mode 100644 index 0000000..099f4fc --- /dev/null +++ b/linden/indra/newview/secondlife setup build firstlook.bat | |||
@@ -0,0 +1,11 @@ | |||
1 | @rem Invoke the script which preps then runs the installer. | ||
2 | @rem This batch file is customized per grid. | ||
3 | |||
4 | set LOGINPAGEURL=http://secondlife.com/app/login/firstlook/ | ||
5 | set ARGS=/DFIRSTLOOK | ||
6 | |||
7 | @rem To build optional "update" installer (doesn't have static VFS): | ||
8 | @rem | ||
9 | @rem set ARGS=/DUPDATE | ||
10 | |||
11 | @"secondlife setup build.bat" %LOGINPAGEURL% %ARGS% | ||
diff --git a/linden/indra/newview/skins/xui/en-us/notify.xml b/linden/indra/newview/skins/xui/en-us/notify.xml index 70defa7..747d1ca 100644 --- a/linden/indra/newview/skins/xui/en-us/notify.xml +++ b/linden/indra/newview/skins/xui/en-us/notify.xml | |||
@@ -802,9 +802,8 @@ You can edit your appearance as often as you like. | |||
802 | <notify name="FirstSandbox" tip="false"> | 802 | <notify name="FirstSandbox" tip="false"> |
803 | <message name="message"> | 803 | <message name="message"> |
804 | This is a sandbox region. | 804 | This is a sandbox region. |
805 | Objects you build here may be deleted after you | 805 | Objects you build here may be deleted after |
806 | leave the area, and the region will be wiped | 806 | you leave the area, Sandboxes clean on a regular basis, please refer to the information at the top of the screen next to the region name. |
807 | every [HOURS] hours starting at [TIME] AM Pacific Time. | ||
808 | 807 | ||
809 | Sandbox regions are uncommon, and are marked with signs. | 808 | Sandbox regions are uncommon, and are marked with signs. |
810 | </message> | 809 | </message> |
diff --git a/linden/indra/newview/viewer.cpp b/linden/indra/newview/viewer.cpp index c009039..19b5260 100644 --- a/linden/indra/newview/viewer.cpp +++ b/linden/indra/newview/viewer.cpp | |||
@@ -352,7 +352,7 @@ BOOL gDoneLogout = FALSE; | |||
352 | 352 | ||
353 | BOOL gInitializationComplete = FALSE; // used in windows handlers to determine if OK to call idle() | 353 | BOOL gInitializationComplete = FALSE; // used in windows handlers to determine if OK to call idle() |
354 | BOOL gAutoLogin = FALSE; | 354 | BOOL gAutoLogin = FALSE; |
355 | char gOldSettingsFileName[LL_MAX_PATH]; | 355 | LLString gOldSettingsFileName; |
356 | BOOL gPrintMessagesThisFrame = FALSE; | 356 | BOOL gPrintMessagesThisFrame = FALSE; |
357 | const char* DEFAULT_SETTINGS_FILE = "settings.xml"; | 357 | const char* DEFAULT_SETTINGS_FILE = "settings.xml"; |
358 | const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; | 358 | const char* LEGACY_DEFAULT_SETTINGS_FILE = "settings.ini"; |
@@ -925,8 +925,8 @@ int main( int argc, char **argv ) | |||
925 | // | 925 | // |
926 | 926 | ||
927 | // Set up some defaults... | 927 | // Set up some defaults... |
928 | strcpy(gSettingsFileName, gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DEFAULT_SETTINGS_FILE).c_str()); | 928 | gSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, DEFAULT_SETTINGS_FILE); |
929 | strcpy(gOldSettingsFileName, gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, LEGACY_DEFAULT_SETTINGS_FILE).c_str()); | 929 | gOldSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, LEGACY_DEFAULT_SETTINGS_FILE); |
930 | gUserServer.setPort(DEFAULT_USER_SERVER_PORT); | 930 | gUserServer.setPort(DEFAULT_USER_SERVER_PORT); |
931 | 931 | ||
932 | ///////////////////////////////////////// | 932 | ///////////////////////////////////////// |
@@ -4215,7 +4215,7 @@ BOOL add_object( LLPCode pcode, S32 x, S32 y, U8 use_physics ) | |||
4215 | { | 4215 | { |
4216 | case LL_PCODE_LEGACY_GRASS: | 4216 | case LL_PCODE_LEGACY_GRASS: |
4217 | // Randomize size of grass patch | 4217 | // Randomize size of grass patch |
4218 | scale.setVec(10.f + frand(20.f), 10.f + frand(20.f), 1.f + frand(2.f)); | 4218 | scale.setVec(10.f + ll_frand(20.f), 10.f + ll_frand(20.f), 1.f + ll_frand(2.f)); |
4219 | state = rand() % LLVOGrass::sMaxGrassSpecies; | 4219 | state = rand() % LLVOGrass::sMaxGrassSpecies; |
4220 | break; | 4220 | break; |
4221 | 4221 | ||
@@ -5337,8 +5337,14 @@ void send_stats() | |||
5337 | gMessageSystem->addU32Fast(_PREHASH_SysRAM, gSysMemory.getPhysicalMemory()); | 5337 | gMessageSystem->addU32Fast(_PREHASH_SysRAM, gSysMemory.getPhysicalMemory()); |
5338 | gMessageSystem->addStringFast(_PREHASH_SysOS, gSysOS.getOSString()); | 5338 | gMessageSystem->addStringFast(_PREHASH_SysOS, gSysOS.getOSString()); |
5339 | gMessageSystem->addStringFast(_PREHASH_SysCPU, gSysCPU.getCPUStringTerse()); | 5339 | gMessageSystem->addStringFast(_PREHASH_SysCPU, gSysCPU.getCPUStringTerse()); |
5340 | |||
5340 | 5341 | ||
5341 | gMessageSystem->addStringFast(_PREHASH_SysGPU, gGLManager.getRawGLString()); | 5342 | std::string gpu_desc = llformat("%-6s Class %d ", |
5343 | gGLManager.mGLVendorShort.substr(0,6).c_str(), | ||
5344 | gFeatureManagerp->getGPUClass()) | ||
5345 | + gFeatureManagerp->getGPUString(); | ||
5346 | |||
5347 | gMessageSystem->addStringFast(_PREHASH_SysGPU, gpu_desc); | ||
5342 | 5348 | ||
5343 | gMessageSystem->nextBlockFast(_PREHASH_DownloadTotals); | 5349 | gMessageSystem->nextBlockFast(_PREHASH_DownloadTotals); |
5344 | gMessageSystem->addU32Fast(_PREHASH_World, gTotalWorldBytes); | 5350 | gMessageSystem->addU32Fast(_PREHASH_World, gTotalWorldBytes); |
@@ -5365,6 +5371,14 @@ void send_stats() | |||
5365 | gMessageSystem->addU32Fast(_PREHASH_OffCircuit, (U32)gMessageSystem->mOffCircuitPackets); | 5371 | gMessageSystem->addU32Fast(_PREHASH_OffCircuit, (U32)gMessageSystem->mOffCircuitPackets); |
5366 | gMessageSystem->addU32Fast(_PREHASH_Invalid, (U32)gMessageSystem->mInvalidOnCircuitPackets); | 5372 | gMessageSystem->addU32Fast(_PREHASH_Invalid, (U32)gMessageSystem->mInvalidOnCircuitPackets); |
5367 | 5373 | ||
5374 | // 1.00.00.000000 | ||
5375 | F64 version = | ||
5376 | LL_VERSION_MAJOR * 10000000000.0 + | ||
5377 | LL_VERSION_MINOR * 100000000.0 + | ||
5378 | LL_VERSION_PATCH * 1000000.0 + | ||
5379 | LL_VERSION_BUILD; | ||
5380 | gViewerStats->setStat(LLViewerStats::ST_VERSION, version); | ||
5381 | |||
5368 | gViewerStats->addToMessage(); | 5382 | gViewerStats->addToMessage(); |
5369 | 5383 | ||
5370 | gAgent.sendReliableMessage(); | 5384 | gAgent.sendReliableMessage(); |
@@ -5596,7 +5610,7 @@ int parse_args(int argc, char **argv) | |||
5596 | std::string folder(argv[j]); | 5610 | std::string folder(argv[j]); |
5597 | gDirUtilp->setSkinFolder(folder); | 5611 | gDirUtilp->setSkinFolder(folder); |
5598 | } | 5612 | } |
5599 | else if (!strcmp(argv[j], "--autologin")) | 5613 | else if (!strcmp(argv[j], "-autologin") || !strcmp(argv[j], "--autologin")) // keep --autologin for compatibility |
5600 | { | 5614 | { |
5601 | gAutoLogin = TRUE; | 5615 | gAutoLogin = TRUE; |
5602 | } | 5616 | } |
@@ -5731,8 +5745,9 @@ int parse_args(int argc, char **argv) | |||
5731 | } | 5745 | } |
5732 | else if (!strcmp(argv[j], "-logfile") && (++j < argc)) | 5746 | else if (!strcmp(argv[j], "-logfile") && (++j < argc)) |
5733 | { | 5747 | { |
5748 | // *NOTE: This buffer size is hard coded into scanf() below. | ||
5734 | char logfile[256]; | 5749 | char logfile[256]; |
5735 | sscanf(argv[j], "%s", logfile); | 5750 | sscanf(argv[j], "%255s", logfile); |
5736 | llinfos << "Setting log file to " << logfile << llendl; | 5751 | llinfos << "Setting log file to " << logfile << llendl; |
5737 | LLFile::remove(logfile); | 5752 | LLFile::remove(logfile); |
5738 | if (!gErrorStream.setFile(logfile)) | 5753 | if (!gErrorStream.setFile(logfile)) |
@@ -5742,7 +5757,7 @@ int parse_args(int argc, char **argv) | |||
5742 | } | 5757 | } |
5743 | else if (!strcmp(argv[j], "-settings") && (++j < argc)) | 5758 | else if (!strcmp(argv[j], "-settings") && (++j < argc)) |
5744 | { | 5759 | { |
5745 | strcpy(gSettingsFileName, argv[j]); | 5760 | gSettingsFileName = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, argv[j]); |
5746 | } | 5761 | } |
5747 | else if (!strcmp(argv[j], "-setdefault") && (j + 2 < argc)) | 5762 | else if (!strcmp(argv[j], "-setdefault") && (j + 2 < argc)) |
5748 | { | 5763 | { |
@@ -6475,7 +6490,7 @@ void cleanup_app() | |||
6475 | // Must do this after all panels have been deleted because panels that have persistent rects | 6490 | // Must do this after all panels have been deleted because panels that have persistent rects |
6476 | // save their rects on delete. | 6491 | // save their rects on delete. |
6477 | gSavedSettings.saveToFile(gSettingsFileName, TRUE); | 6492 | gSavedSettings.saveToFile(gSettingsFileName, TRUE); |
6478 | if (gPerAccountSettingsFileName[0]) | 6493 | if (!gPerAccountSettingsFileName.empty()) |
6479 | { | 6494 | { |
6480 | gSavedPerAccountSettings.saveToFile(gPerAccountSettingsFileName, TRUE); | 6495 | gSavedPerAccountSettings.saveToFile(gPerAccountSettingsFileName, TRUE); |
6481 | } | 6496 | } |
diff --git a/linden/indra/newview/viewer.h b/linden/indra/newview/viewer.h index ed302ce..34ca249 100644 --- a/linden/indra/newview/viewer.h +++ b/linden/indra/newview/viewer.h | |||
@@ -95,7 +95,7 @@ extern LLTimer gLogoutTimer; | |||
95 | extern BOOL gInProductionGrid; | 95 | extern BOOL gInProductionGrid; |
96 | extern S32 gCrashBehavior; | 96 | extern S32 gCrashBehavior; |
97 | extern bool gVerifySSLCert; | 97 | extern bool gVerifySSLCert; |
98 | 98 | extern const char* DEFAULT_SETTINGS_FILE; | |
99 | 99 | ||
100 | // TODO: Eliminate most of these, move into a globals structure. | 100 | // TODO: Eliminate most of these, move into a globals structure. |
101 | extern const U32 PATCH_SIZE; | 101 | extern const U32 PATCH_SIZE; |