diff --git a/indra/newview/llworldmap.cpp b/indra/newview/llworldmap.cpp index 02589c1b34..12624af6a2 100755 --- a/indra/newview/llworldmap.cpp +++ b/indra/newview/llworldmap.cpp @@ -256,8 +256,7 @@ LLWorldMap::LLWorldMap() : mIsTrackingDoubleClick( false ), mIsTrackingCommit( false ), mTrackingLocation( 0, 0, 0 ), - mFirstRequest(true), - mMapBlockLastUpdate(0.0) // Periodically update sim info + mFirstRequest(true) { //LL_INFOS("World Map") << "Creating the World Map -> LLWorldMap::LLWorldMap()" << LL_ENDL; mMapBlockLoaded = new bool[MAP_BLOCK_RES*MAP_BLOCK_RES]; @@ -332,7 +331,6 @@ void LLWorldMap::clearSimFlags() { mMapBlockLoaded[idx] = false; // Periodically update sim info - mMapBlockLastUpdate = 0.0; mMapBlockLastUpdateOffsets.clear(); // } @@ -662,9 +660,19 @@ void LLWorldMap::updateRegions(S32 x0, S32 y0, S32 x1, S32 y1) y1 = y1 / MAP_BLOCK_SIZE; // Periodically update sim info - std::set new_offsets; - bool did_update = false; + block_last_update_map_t new_offsets; F64 time_now = LLTimer::getElapsedSeconds(); + + // Remove blocks that have been request more than BLOCK_UPDATE_TIMER ago + // so we re-request them for an update + for (block_last_update_map_t::iterator it = mMapBlockLastUpdateOffsets.begin(); it != mMapBlockLastUpdateOffsets.end(); ++it) + { + if ((time_now - it->second) <= BLOCK_UPDATE_TIMER) + { + new_offsets[it->first] = it->second; + } + } + mMapBlockLastUpdateOffsets.swap(new_offsets); // // Load the region info those blocks @@ -675,27 +683,17 @@ void LLWorldMap::updateRegions(S32 x0, S32 y0, S32 x1, S32 y1) S32 offset = block_x | (block_y * MAP_BLOCK_RES); // Periodically update sim info //if (!mMapBlockLoaded[offset]) - if (!mMapBlockLoaded[offset] || (time_now - mMapBlockLastUpdate) > BLOCK_UPDATE_TIMER || mMapBlockLastUpdateOffsets.find(offset) == mMapBlockLastUpdateOffsets.end()) + if (!mMapBlockLoaded[offset] || mMapBlockLastUpdateOffsets.find(offset) == mMapBlockLastUpdateOffsets.end()) // { //LL_INFOS("World Map") << "Loading Block (" << block_x << "," << block_y << ")" << LL_ENDL; LLWorldMapMessage::getInstance()->sendMapBlockRequest(block_x * MAP_BLOCK_SIZE, block_y * MAP_BLOCK_SIZE, (block_x * MAP_BLOCK_SIZE) + MAP_BLOCK_SIZE - 1, (block_y * MAP_BLOCK_SIZE) + MAP_BLOCK_SIZE - 1); mMapBlockLoaded[offset] = true; // Periodically update sim info - new_offsets.insert(offset); - did_update = true; - // + mMapBlockLastUpdateOffsets[offset] = time_now; } } } - - // Periodically update sim info - if (did_update) - { - mMapBlockLastUpdate = time_now; - mMapBlockLastUpdateOffsets.swap(new_offsets); - } - // } void LLWorldMap::dump() diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h index 25d3d7dd61..9aee81bb23 100755 --- a/indra/newview/llworldmap.h +++ b/indra/newview/llworldmap.h @@ -294,8 +294,8 @@ private: bool * mMapBlockLoaded; // Telling us if the block of regions has been requested or not // Periodically update sim info - F64 mMapBlockLastUpdate; - std::set mMapBlockLastUpdateOffsets; + typedef std::map block_last_update_map_t; + block_last_update_map_t mMapBlockLastUpdateOffsets; // Track location data : used while there's nothing tracked yet by LLTracker bool mIsTrackingLocation; // True when we're tracking a point diff --git a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml index 37dde49f18..49a9708591 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml @@ -59,6 +59,7 @@ + (Erfordert Neustart) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index db59781025..186a780725 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -397,13 +397,23 @@ +