summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index a37e15f8da..da019d60d8 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -3153,8 +3153,8 @@ void process_crossed_region(LLMessageSystem* msg, void**)
}
-// sends an AgentUpdate message to the server... or not:
-// only when force_send is 'true' OR
+// sends an AgentUpdate message to the server... or not
+// e.g. only when force_send is 'true' OR
// something changed AND the update is not being throttled
void send_agent_update(bool force_send, bool send_reliable)
{
@@ -3220,8 +3220,6 @@ void send_agent_update(bool force_send, bool send_reliable)
return;
}
- bool send_update = force_send || sec_since_last_send > MAX_AGENT_UPDATE_PERIOD;
-
LLVector3 camera_pos_agent = gAgentCamera.getCameraPositionAgent(); // local to avatar's region
LLVector3 camera_at = LLViewerCamera::getInstance()->getAtAxis();
LLQuaternion body_rotation = gAgent.getFrameAgent().getQuaternion();
@@ -3238,6 +3236,7 @@ void send_agent_update(bool force_send, bool send_reliable)
flags |= AU_FLAGS_CLIENT_AUTOPILOT;
}
+ bool send_update = force_send || sec_since_last_send > MAX_AGENT_UPDATE_PERIOD;
if (!send_update)
{
// check to see if anything changed