From 43f063fe2c814e28da69f2f5c373497a6d621460 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 9 May 2013 17:19:05 -0700 Subject: SH-4080 WIP interesting: random crash on Mac added controls for curtain delay --- indra/newview/app_settings/settings.xml | 24 +++++++++++++++++++++++- indra/newview/llviewerdisplay.cpp | 10 ++++------ indra/newview/llvieweroctree.cpp | 2 +- 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 94a8550938..8a1c37d242 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -19,7 +19,7 @@ Time before automatically setting AFK (away from keyboard) mode (seconds, 0=never). Valid values are: 0, 120, 300, 600, 1800 - + Persist 1 Type @@ -14117,5 +14117,27 @@ Value 0 + TeleportArrivalDelay + + Comment + Time to wait before displaying world during teleport (seconds) + Persist + 1 + Type + F32 + Value + 2 + + TeleportLocalDelay + + Comment + Delay to prevent teleports after starting an in-sim teleport. (seconds) + Persist + 1 + Type + F32 + Value + 1 + diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 0889c3ec6c..970862892c 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -85,9 +85,6 @@ extern bool gShiftFrame; LLPointer gDisconnectedImagep = NULL; // used to toggle renderer back on after teleport -const F32 TELEPORT_RENDER_DELAY = 20.f; // Max time a teleport is allowed to take before we raise the curtain -const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived. -const F32 TELEPORT_LOCAL_DELAY = 1.0f; // Delay to prevent teleports after starting an in-sim teleport. BOOL gTeleportDisplay = FALSE; LLFrameTimer gTeleportDisplayTimer; LLFrameTimer gTeleportArrivalTimer; @@ -373,7 +370,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) { LLFastTimer t(FTM_TELEPORT_DISPLAY); LLAppViewer::instance()->pingMainloopTimeout("Display:Teleport"); - const F32 TELEPORT_ARRIVAL_DELAY = 2.f; // Time to preload the world before raising the curtain after we've actually already arrived. + static LLCachedControl teleport_arrival_delay(gSavedSettings, "TeleportArrivalDelay"); + static LLCachedControl teleport_local_delay(gSavedSettings, "TeleportLocalDelay"); S32 attach_count = 0; if (isAgentAvatarValid()) @@ -441,7 +439,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) case LLAgent::TELEPORT_ARRIVING: // Make the user wait while content "pre-caches" { - F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / TELEPORT_ARRIVAL_DELAY); + F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / teleport_arrival_delay()); if( arrival_fraction > 1.f ) { arrival_fraction = 1.f; @@ -458,7 +456,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Short delay when teleporting in the same sim (progress screen active but not shown - did not // fall-through from TELEPORT_START) { - if( gTeleportDisplayTimer.getElapsedTimeF32() > TELEPORT_LOCAL_DELAY ) + if( gTeleportDisplayTimer.getElapsedTimeF32() > teleport_local_delay() ) { //LLFirstUse::useTeleport(); gAgent.setTeleportState( LLAgent::TELEPORT_NONE ); diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index 0eb1745cd5..0fa1f5bef3 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -331,7 +331,7 @@ LLviewerOctreeGroup::~LLviewerOctreeGroup() { LLViewerRegion::sCurRegionp->clearVisibleGroup(this); } - llassert(LLViewerRegion::sCurRegionp->hasVisibleGroup(this) == false); + llassert(!LLViewerRegion::sCurRegionp || LLViewerRegion::sCurRegionp->hasVisibleGroup(this) == false); } LLviewerOctreeGroup::LLviewerOctreeGroup(OctreeNode* node) : -- cgit v1.2.3