diff options
Diffstat (limited to 'linden/indra/newview/llviewerdisplay.cpp')
-rw-r--r-- | linden/indra/newview/llviewerdisplay.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
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 |