Merge Firestorm LGPL

meow-7.2.2
Ansariel 2016-05-13 18:50:50 +02:00
commit cfd5544f63
4 changed files with 30 additions and 20 deletions

View File

@ -256,8 +256,7 @@ LLWorldMap::LLWorldMap() :
mIsTrackingDoubleClick( false ),
mIsTrackingCommit( false ),
mTrackingLocation( 0, 0, 0 ),
mFirstRequest(true),
mMapBlockLastUpdate(0.0) // <FS:Ansariel> 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;
// <FS:Ansariel> Periodically update sim info
mMapBlockLastUpdate = 0.0;
mMapBlockLastUpdateOffsets.clear();
// </FS:Ansariel>
}
@ -662,9 +660,19 @@ void LLWorldMap::updateRegions(S32 x0, S32 y0, S32 x1, S32 y1)
y1 = y1 / MAP_BLOCK_SIZE;
// <FS:Ansariel> Periodically update sim info
std::set<S32> 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);
// </FS:Ansariel>
// 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);
// <FS:Ansariel> 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())
// </FS:Ansariel>
{
//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;
// <FS:Ansariel> Periodically update sim info
new_offsets.insert(offset);
did_update = true;
// </FS:Ansariel>
mMapBlockLastUpdateOffsets[offset] = time_now;
}
}
}
// <FS:Ansariel> Periodically update sim info
if (did_update)
{
mMapBlockLastUpdate = time_now;
mMapBlockLastUpdateOffsets.swap(new_offsets);
}
// </FS:Ansariel>
}
void LLWorldMap::dump()

View File

@ -294,8 +294,8 @@ private:
bool * mMapBlockLoaded; // Telling us if the block of regions has been requested or not
// <FS:Ansariel> Periodically update sim info
F64 mMapBlockLastUpdate;
std::set<S32> mMapBlockLastUpdateOffsets;
typedef std::map<S32, F64> 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

View File

@ -59,6 +59,7 @@
<check_box label="Animierte Skript-Dialoge" name="FSAnimatedScriptDialogs" tool_tip="Aktivieren, um Skript-Dialoge animiert einzublenden (Klassisches V1.x-Verhalten)."/>
<slider label_width="190" width="430" label="Sichtbare Zeilen pro Skriptdialog:" name="FSRowsPerScriptDialog" tool_tip="Die maximale Anzahl an Zeilen in einem Skriptdialog, die gleichzeitig sichtbar sind."/>
<check_box label="Pie-Menü aktivieren" name="UsePieMenu" tool_tip="Aktiviert das klassische V1-Kontextmenü in Kuchenform anstelle des standardmäßigen Kontextmenüs."/>
<check_box label="Text-Animation aktivieren" name="PieMenuPopupFontEffect" tool_tip="Aktiviert die Animation der Texte innerhalb des klassischen V1-Kontextmenü in Kuchenform, wenn sich dieses öffnet."/>
<check_box label="Gruppenmitteilungen und Chiclets oben rechts" name="ShowGroupNoticesTopRight" tool_tip="Aktivieren, um Gruppenmitteilungen in der oberen rechten Ecke des Bildschirms anzuzeigen (Klassisches V1.x-Verhalten)."/>
<text name="GroupTopRightRequiresRestart" left_delta="280">
(Erfordert Neustart)

View File

@ -397,13 +397,23 @@
<check_box
control_name="UsePieMenu"
height="16"
initial_value="true"
label="Use Pie Menu"
layout="topleft"
left="5"
name="UsePieMenu"
tool_tip="Use the classic V1 ring menu instead of rectangular context menus when right clicking on land, avatars, objects or attachments."
top_pad="12"
width="256" />
<check_box
control_name="PieMenuPopupFontEffect"
enabled_control="UsePieMenu"
height="16"
label="Enable text animation"
layout="topleft"
left="15"
name="PieMenuPopupFontEffect"
tool_tip="Enables the text within the pie menu being part of the animation when the pie menu opens."
top_pad="3"
width="256" />
<check_box
control_name="ShowGroupNoticesTopRight"
@ -411,6 +421,7 @@
initial_value="true"
label="Group Notices and chiclets in Top Right"
layout="topleft"
left="5"
name="ShowGroupNoticesTopRight"
tool_tip="Set this to move group notifications and chiclet icons to the top right corner of the screen (Classic V1.x behavior)."
top_pad="3"