Some teleport reworking. Don't clear rebuild groups/resetVBO unless tp screen is up, or we've just changed sims. Also skip updateUI drawing if tp screen is up.
This commit is contained in:
@@ -3515,8 +3515,12 @@ bool LLAgent::teleportCore(bool is_local)
|
||||
gTeleportDisplay = TRUE;
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_START );
|
||||
|
||||
//release geometry from old location
|
||||
gPipeline.resetVertexBuffers();
|
||||
/*static const LLCachedControl<bool> hide_tp_screen("AscentDisableTeleportScreens",false);
|
||||
if(!hide_tp_screen)
|
||||
{
|
||||
//release geometry from old location
|
||||
gPipeline.resetVertexBuffers();
|
||||
}*/
|
||||
|
||||
if (gSavedSettings.getBOOL("SpeedRez"))
|
||||
{
|
||||
|
||||
@@ -3922,6 +3922,12 @@ void LLAppViewer::idle()
|
||||
return;
|
||||
}
|
||||
|
||||
static const LLCachedControl<bool> hide_tp_screen("AscentDisableTeleportScreens",false);
|
||||
if (!hide_tp_screen && gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && gAgent.getTeleportState() != LLAgent::TELEPORT_LOCAL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
gViewerWindow->updateUI();
|
||||
|
||||
///////////////////////////////////////
|
||||
|
||||
@@ -76,6 +76,7 @@ private:
|
||||
S32 mInstanceIndex;
|
||||
|
||||
public:
|
||||
static void resetTimers() { memset(&sUpdateDelay[0], 0, sizeof(S32)*sUpdateDelay.size()); }
|
||||
static void updateClass();
|
||||
|
||||
LLVolumeImplFlexible(LLViewerObject* volume, LLFlexibleObjectData* attributes);
|
||||
|
||||
@@ -422,6 +422,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
|
||||
gAgent.setTeleportMessage(std::string());
|
||||
}
|
||||
|
||||
static const LLCachedControl<bool> hide_tp_screen("AscentDisableTeleportScreens",false);
|
||||
const std::string& message = gAgent.getTeleportMessage();
|
||||
switch( gAgent.getTeleportState() )
|
||||
{
|
||||
@@ -429,11 +430,13 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
|
||||
// Transition to REQUESTED. Viewer has sent some kind
|
||||
// of TeleportRequest to the source simulator
|
||||
gTeleportDisplayTimer.reset();
|
||||
if(!gSavedSettings.getBOOL("AscentDisableTeleportScreens"))gViewerWindow->setShowProgress(TRUE);
|
||||
if(!hide_tp_screen)
|
||||
gViewerWindow->setShowProgress(TRUE);
|
||||
gViewerWindow->setProgressPercent(0);
|
||||
gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );
|
||||
gAgent.setTeleportMessage(
|
||||
LLAgent::sTeleportProgressMessages["requesting"]);
|
||||
gViewerWindow->setProgressString(LLAgent::sTeleportProgressMessages["requesting"]);
|
||||
break;
|
||||
|
||||
case LLAgent::TELEPORT_REQUESTED:
|
||||
@@ -457,14 +460,15 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot, boo
|
||||
gAgent.setTeleportMessage(
|
||||
LLAgent::sTeleportProgressMessages["arriving"]);
|
||||
gTextureList.mForceResetTextureStats = TRUE;
|
||||
if(!gSavedSettings.getBOOL("AscentDisableTeleportScreens"))gAgentCamera.resetView(TRUE, TRUE);
|
||||
if(!hide_tp_screen)
|
||||
gAgentCamera.resetView(TRUE, TRUE);
|
||||
break;
|
||||
|
||||
case LLAgent::TELEPORT_ARRIVING:
|
||||
// Make the user wait while content "pre-caches"
|
||||
{
|
||||
F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / TELEPORT_ARRIVAL_DELAY);
|
||||
if( arrival_fraction > 1.f || gSavedSettings.getBOOL("AscentDisableTeleportScreens"))
|
||||
if( arrival_fraction > 1.f || hide_tp_screen)
|
||||
{
|
||||
arrival_fraction = 1.f;
|
||||
LLFirstUse::useTeleport();
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
#include "pipeline.h"
|
||||
#include "llappviewer.h"
|
||||
#include "llagent.h"
|
||||
#include "llviewerdisplay.h"
|
||||
#include "llflexibleobject.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -624,12 +626,20 @@ static LLFastTimer::DeclareTimer FTM_IMAGE_MEDIA("Media");
|
||||
void LLViewerTextureList::updateImages(F32 max_time)
|
||||
{
|
||||
static BOOL cleared = FALSE;
|
||||
if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && gAgent.getTeleportState() != LLAgent::TELEPORT_LOCAL )
|
||||
static const LLCachedControl<bool> hide_tp_screen("AscentDisableTeleportScreens",false);
|
||||
|
||||
//Can't check gTeleportDisplay due to a process_teleport_local(), which sets it to true for local teleports... so:
|
||||
// Do this case if IS teleporting but NOT local teleporting, AND either the TP screen is set to appear OR we just entered the sim (TELEPORT_START_ARRIVAL)
|
||||
if(gAgent.getTeleportState() != LLAgent::TELEPORT_NONE && gAgent.getTeleportState() != LLAgent::TELEPORT_LOCAL &&
|
||||
(!hide_tp_screen || gAgent.getTeleportState() == LLAgent::TELEPORT_START_ARRIVAL))
|
||||
{
|
||||
if(!cleared)
|
||||
{
|
||||
clearFetchingRequests();
|
||||
//gPipeline.clearRebuildGroups() really doesn't belong here... but since it is here, do a few other needed things too.
|
||||
gPipeline.clearRebuildGroups();
|
||||
gPipeline.resetVertexBuffers();
|
||||
LLVolumeImplFlexible::resetTimers();
|
||||
cleared = TRUE;
|
||||
}
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user