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:
Shyotl
2012-11-18 02:41:37 -06:00
parent d2422b03be
commit 9d8f31a0cb
5 changed files with 31 additions and 6 deletions

View File

@@ -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;