aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworld.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:50 -0500
committerJacek Antonelli2008-08-15 23:44:50 -0500
commit89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch)
treebcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llworld.cpp
parentSecond Life viewer sources 1.13.3.2 (diff)
downloadmeta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2
meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/llworld.cpp')
-rw-r--r--linden/indra/newview/llworld.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/linden/indra/newview/llworld.cpp b/linden/indra/newview/llworld.cpp
index 18d4e48..cf85eab 100644
--- a/linden/indra/newview/llworld.cpp
+++ b/linden/indra/newview/llworld.cpp
@@ -62,7 +62,6 @@ U32 gAgentPauseSerialNum = 0;
62// Constants 62// Constants
63// 63//
64const S32 MAX_NUMBER_OF_CLOUDS = 750; 64const S32 MAX_NUMBER_OF_CLOUDS = 750;
65const F32 MIN_IDLE_UPDATE_TIME = 0.025f;
66const S32 WORLD_PATCH_SIZE = 16; 65const S32 WORLD_PATCH_SIZE = 16;
67 66
68extern LLColor4U MAX_WATER_COLOR; 67extern LLColor4U MAX_WATER_COLOR;
@@ -82,7 +81,6 @@ LLWorld::LLWorld(const U32 grids_per_region, const F32 meters_per_grid)
82 mLastPacketsOut = 0; 81 mLastPacketsOut = 0;
83 mLastPacketsLost = 0; 82 mLastPacketsLost = 0;
84 mLandFarClip = DEFAULT_FAR_PLANE; 83 mLandFarClip = DEFAULT_FAR_PLANE;
85 mIdleUpdateTime = MIN_IDLE_UPDATE_TIME;
86 84
87 if (gNoRender) 85 if (gNoRender)
88 { 86 {
@@ -635,31 +633,22 @@ void LLWorld::updateVisibilities()
635 gCamera->setFar(cur_far_clip); 633 gCamera->setFar(cur_far_clip);
636} 634}
637 635
638 636void LLWorld::updateRegions(F32 max_update_time)
639void LLWorld::updateRegions()
640{ 637{
641 LLViewerRegion *regionp; 638 LLViewerRegion *regionp;
642 LLTimer update_timer; 639 LLTimer update_timer;
643 640 BOOL did_one = FALSE;
641
644 // Perform idle time updates for the regions (and associated surfaces) 642 // Perform idle time updates for the regions (and associated surfaces)
645 for (regionp = mRegionList.getFirstData(); 643 for (regionp = mRegionList.getFirstData();
646 regionp; 644 regionp;
647 regionp = mRegionList.getNextData()) 645 regionp = mRegionList.getNextData())
648 { 646 {
649 update_timer.reset(); 647 F32 max_time = max_update_time - update_timer.getElapsedTimeF32();
650 if (!regionp->idleUpdate(update_timer, mIdleUpdateTime)) 648 if (did_one && max_time <= 0.f)
651 { 649 break;
652 // Didn't finish all the updates. Slightly increase the idle update time. 650 max_time = llmin(max_time, max_update_time*.1f);
653 mIdleUpdateTime *= 1.05f; 651 did_one |= regionp->idleUpdate(max_update_time);
654 }
655 else
656 {
657 mIdleUpdateTime *= 0.9f;
658 if (mIdleUpdateTime < MIN_IDLE_UPDATE_TIME)
659 {
660 mIdleUpdateTime = MIN_IDLE_UPDATE_TIME;
661 }
662 }
663 } 652 }
664} 653}
665 654