summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2015-04-15 15:07:13 -0700
committersimon <none@none>2015-04-15 15:07:13 -0700
commita219cf1c98527faa0e7addeb9660f679208bb0e7 (patch)
tree78a14774f7ff79dd92c022caa2d9d68ec85fba85 /indra/newview/llappviewer.cpp
parentb5324afb6f2e45deefb9b79e7e2192bc686b181a (diff)
parenta647b8f1cbab13f07ea889c80df28414bc906129 (diff)
Merge viewer-release
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rwxr-xr-xindra/newview/llappviewer.cpp38
1 files changed, 21 insertions, 17 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 4dc791feb2..b3fc642f6a 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -686,6 +686,8 @@ LLAppViewer::LLAppViewer()
mQuitRequested(false),
mLogoutRequestSent(false),
mYieldTime(-1),
+ mLastAgentControlFlags(0),
+ mLastAgentForceUpdate(0),
mMainloopTimeout(NULL),
mAgentRegionLastAlive(false),
mRandomizeFramerate(LLCachedControl<bool>(gSavedSettings,"Randomize Framerate", FALSE)),
@@ -4838,22 +4840,24 @@ void LLAppViewer::idle()
gAgentPilot.updateTarget();
gAgent.autoPilot(&yaw);
}
-
- static LLFrameTimer agent_update_timer;
- static U32 last_control_flags;
-
- // When appropriate, update agent location to the simulator.
- F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
- BOOL flags_changed = gAgent.controlFlagsDirty() || (last_control_flags != gAgent.getControlFlags());
-
- if (flags_changed || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
- {
- LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
- // Send avatar and camera info
- last_control_flags = gAgent.getControlFlags();
- send_agent_update(TRUE);
- agent_update_timer.reset();
- }
+
+ static LLFrameTimer agent_update_timer;
+
+ // When appropriate, update agent location to the simulator.
+ F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
+ F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
+ BOOL force_update = gAgent.controlFlagsDirty()
+ || (mLastAgentControlFlags != gAgent.getControlFlags())
+ || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
+ if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
+ {
+ LL_RECORD_BLOCK_TIME(FTM_AGENT_UPDATE);
+ // Send avatar and camera info
+ mLastAgentControlFlags = gAgent.getControlFlags();
+ mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
+ send_agent_update(force_update);
+ agent_update_timer.reset();
+ }
}
//////////////////////////////////////
@@ -5417,7 +5421,7 @@ void LLAppViewer::idleNetwork()
}
// Handle per-frame message system processing.
- gMessageSystem->processAcks();
+ gMessageSystem->processAcks(gSavedSettings.getF32("AckCollectTime"));
#ifdef TIME_THROTTLE_MESSAGES
if (total_time >= CheckMessagesMaxTime)