diff options
Diffstat (limited to 'linden')
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 33 | ||||
-rw-r--r-- | linden/indra/newview/llagent.cpp | 15 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 10 | ||||
-rw-r--r-- | linden/indra/newview/llviewerdisplay.cpp | 27 | ||||
-rw-r--r-- | linden/indra/newview/llviewerdisplay.h | 1 |
5 files changed, 84 insertions, 2 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 29b3bcc..c35ae5b 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -7833,6 +7833,39 @@ | |||
7833 | <key>Value</key> | 7833 | <key>Value</key> |
7834 | <real>256.0</real> | 7834 | <real>256.0</real> |
7835 | </map> | 7835 | </map> |
7836 | <key>SavedRenderFarClip</key> | ||
7837 | <map> | ||
7838 | <key>Comment</key> | ||
7839 | <string>Saved draw distance (used in case of logout during speed rezzing)</string> | ||
7840 | <key>Persist</key> | ||
7841 | <integer>1</integer> | ||
7842 | <key>Type</key> | ||
7843 | <string>F32</string> | ||
7844 | <key>Value</key> | ||
7845 | <real>0.0</real> | ||
7846 | </map> | ||
7847 | <key>SpeedRez</key> | ||
7848 | <map> | ||
7849 | <key>Comment</key> | ||
7850 | <string>Set to TRUE to increase rezzing speed via draw distance stepping</string> | ||
7851 | <key>Persist</key> | ||
7852 | <integer>1</integer> | ||
7853 | <key>Type</key> | ||
7854 | <string>Boolean</string> | ||
7855 | <key>Value</key> | ||
7856 | <integer>1</integer> | ||
7857 | </map> | ||
7858 | <key>SpeedRezInterval</key> | ||
7859 | <map> | ||
7860 | <key>Comment</key> | ||
7861 | <string>Interval in seconds between each draw distance increment</string> | ||
7862 | <key>Persist</key> | ||
7863 | <integer>1</integer> | ||
7864 | <key>Type</key> | ||
7865 | <string>U32</string> | ||
7866 | <key>Value</key> | ||
7867 | <integer>20</integer> | ||
7868 | </map> | ||
7836 | <key>RenderFastAlpha</key> | 7869 | <key>RenderFastAlpha</key> |
7837 | <map> | 7870 | <map> |
7838 | <key>Comment</key> | 7871 | <key>Comment</key> |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index df3ab18..f40a2e8 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -6073,9 +6073,20 @@ bool LLAgent::teleportCore(bool is_local) | |||
6073 | 6073 | ||
6074 | //release geometry from old location | 6074 | //release geometry from old location |
6075 | gPipeline.resetVertexBuffers(); | 6075 | gPipeline.resetVertexBuffers(); |
6076 | |||
6077 | if (gSavedSettings.getBOOL("SpeedRez")) | ||
6078 | { | ||
6079 | F32 draw_distance = gSavedSettings.getF32("RenderFarClip"); | ||
6080 | if (gSavedDrawDistance < draw_distance) | ||
6081 | { | ||
6082 | gSavedDrawDistance = draw_distance; | ||
6083 | } | ||
6084 | gSavedSettings.setF32("SavedRenderFarClip", gSavedDrawDistance); | ||
6085 | gSavedSettings.setF32("RenderFarClip", 32.0f); | ||
6086 | } | ||
6087 | make_ui_sound("UISndTeleportOut"); | ||
6076 | } | 6088 | } |
6077 | make_ui_sound("UISndTeleportOut"); | 6089 | |
6078 | |||
6079 | // MBW -- Let the voice client know a teleport has begun so it can leave the existing channel. | 6090 | // MBW -- Let the voice client know a teleport has begun so it can leave the existing channel. |
6080 | // This was breaking the case of teleporting within a single sim. Backing it out for now. | 6091 | // This was breaking the case of teleporting within a single sim. Backing it out for now. |
6081 | // gVoiceClient->leaveChannel(); | 6092 | // gVoiceClient->leaveChannel(); |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 7a7e023..11bd87b 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -2636,6 +2636,16 @@ bool idle_startup() | |||
2636 | LLStartUp::setStartupState( STATE_STARTED ); | 2636 | LLStartUp::setStartupState( STATE_STARTED ); |
2637 | LLStartUp::setStartedOnce(true); | 2637 | LLStartUp::setStartedOnce(true); |
2638 | 2638 | ||
2639 | if (gSavedSettings.getBOOL("SpeedRez")) | ||
2640 | { | ||
2641 | // Speed up rezzing if requested. | ||
2642 | F32 dist1 = gSavedSettings.getF32("RenderFarClip"); | ||
2643 | F32 dist2 = gSavedSettings.getF32("SavedRenderFarClip"); | ||
2644 | gSavedDrawDistance = (dist1 >= dist2 ? dist1 : dist2); | ||
2645 | gSavedSettings.setF32("SavedRenderFarClip", gSavedDrawDistance); | ||
2646 | gSavedSettings.setF32("RenderFarClip", 32.0f); | ||
2647 | } | ||
2648 | |||
2639 | // Unmute audio if desired and setup volumes. | 2649 | // Unmute audio if desired and setup volumes. |
2640 | // Unmute audio if desired and setup volumes. | 2650 | // Unmute audio if desired and setup volumes. |
2641 | // This is a not-uncommon crash site, so surround it with | 2651 | // This is a not-uncommon crash site, so surround it with |
diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 388ba73..28d048b 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp | |||
@@ -93,6 +93,7 @@ const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before rais | |||
93 | BOOL gTeleportDisplay = FALSE; | 93 | BOOL gTeleportDisplay = FALSE; |
94 | LLFrameTimer gTeleportDisplayTimer; | 94 | LLFrameTimer gTeleportDisplayTimer; |
95 | LLFrameTimer gTeleportArrivalTimer; | 95 | LLFrameTimer gTeleportArrivalTimer; |
96 | F32 gSavedDrawDistance = 0.0f; | ||
96 | const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures before we raise the curtain | 97 | const F32 RESTORE_GL_TIME = 5.f; // Wait this long while reloading textures before we raise the curtain |
97 | 98 | ||
98 | BOOL gForceRenderLandFence = FALSE; | 99 | BOOL gForceRenderLandFence = FALSE; |
@@ -398,6 +399,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
398 | // No teleport in progress | 399 | // No teleport in progress |
399 | gViewerWindow->setShowProgress(FALSE); | 400 | gViewerWindow->setShowProgress(FALSE); |
400 | gTeleportDisplay = FALSE; | 401 | gTeleportDisplay = FALSE; |
402 | gTeleportArrivalTimer.reset(); | ||
401 | break; | 403 | break; |
402 | } | 404 | } |
403 | } | 405 | } |
@@ -439,6 +441,31 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) | |||
439 | } | 441 | } |
440 | } | 442 | } |
441 | 443 | ||
444 | // Progressively increase draw distance after TP when required. | ||
445 | if (gSavedDrawDistance > 0.0f && gAgent.getTeleportState() == LLAgent::TELEPORT_NONE) | ||
446 | { | ||
447 | if (gTeleportArrivalTimer.getElapsedTimeF32() >= | ||
448 | (F32)gSavedSettings.getU32("SpeedRezInterval")) | ||
449 | { | ||
450 | gTeleportArrivalTimer.reset(); | ||
451 | F32 current = gSavedSettings.getF32("RenderFarClip"); | ||
452 | if (gSavedDrawDistance > current) | ||
453 | { | ||
454 | current *= 2.0; | ||
455 | if (current > gSavedDrawDistance) | ||
456 | { | ||
457 | current = gSavedDrawDistance; | ||
458 | } | ||
459 | gSavedSettings.setF32("RenderFarClip", current); | ||
460 | } | ||
461 | if (current >= gSavedDrawDistance) | ||
462 | { | ||
463 | gSavedDrawDistance = 0.0f; | ||
464 | gSavedSettings.setF32("SavedRenderFarClip", 0.0f); | ||
465 | } | ||
466 | } | ||
467 | } | ||
468 | |||
442 | ////////////////////////// | 469 | ////////////////////////// |
443 | // | 470 | // |
444 | // Prepare for the next frame | 471 | // Prepare for the next frame |
diff --git a/linden/indra/newview/llviewerdisplay.h b/linden/indra/newview/llviewerdisplay.h index 0d60403..4d650de 100644 --- a/linden/indra/newview/llviewerdisplay.h +++ b/linden/indra/newview/llviewerdisplay.h | |||
@@ -46,5 +46,6 @@ extern BOOL gTeleportDisplay; | |||
46 | extern LLFrameTimer gTeleportDisplayTimer; | 46 | extern LLFrameTimer gTeleportDisplayTimer; |
47 | extern BOOL gForceRenderLandFence; | 47 | extern BOOL gForceRenderLandFence; |
48 | extern BOOL gResizeScreenTexture; | 48 | extern BOOL gResizeScreenTexture; |
49 | extern F32 gSavedDrawDistance; | ||
49 | 50 | ||
50 | #endif // LL_LLVIEWERDISPLAY_H | 51 | #endif // LL_LLVIEWERDISPLAY_H |