summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2011-01-04 12:37:43 -0800
committerDon Kjer <don@lindenlab.com>2011-01-04 12:37:43 -0800
commitd0f5d06f79d829aef0175b43144fb94687ddc84d (patch)
treef1661e9f275d2516536ee575ff41b1da936adb0c /indra/newview
parent4aeb27232e6da5f2e00da8671e05bb5a8f277ba9 (diff)
parent66c34a162a78e23f46816f4c616726ec82e6f20c (diff)
Backed out tiggs' ER-350 change
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermessage.cpp69
1 files changed, 34 insertions, 35 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index c87fa47a40..7313463f1b 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4057,55 +4057,54 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
if (duplicate_count < DUP_MSGS && !gDisconnected)
{
- if (LLStartUp::getStartupState() >= STATE_STARTED)
- {
- LLFastTimer t(FTM_AGENT_UPDATE_SEND);
- // Build the message
- msg->newMessageFast(_PREHASH_AgentUpdate);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->addQuatFast(_PREHASH_BodyRotation, body_rotation);
- msg->addQuatFast(_PREHASH_HeadRotation, head_rotation);
- msg->addU8Fast(_PREHASH_State, render_state);
- msg->addU8Fast(_PREHASH_Flags, flags);
+ LLFastTimer t(FTM_AGENT_UPDATE_SEND);
+ // Build the message
+ msg->newMessageFast(_PREHASH_AgentUpdate);
+ msg->nextBlockFast(_PREHASH_AgentData);
+ msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
+ msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
+ msg->addQuatFast(_PREHASH_BodyRotation, body_rotation);
+ msg->addQuatFast(_PREHASH_HeadRotation, head_rotation);
+ msg->addU8Fast(_PREHASH_State, render_state);
+ msg->addU8Fast(_PREHASH_Flags, flags);
// if (camera_pos_agent.mV[VY] > 255.f)
// {
// LL_INFOS("Messaging") << "Sending camera center " << camera_pos_agent << LL_ENDL;
// }
- msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent);
- msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis());
- msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis());
- msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis());
- msg->addF32Fast(_PREHASH_Far, gAgentCamera.mDrawDistance);
+ msg->addVector3Fast(_PREHASH_CameraCenter, camera_pos_agent);
+ msg->addVector3Fast(_PREHASH_CameraAtAxis, LLViewerCamera::getInstance()->getAtAxis());
+ msg->addVector3Fast(_PREHASH_CameraLeftAxis, LLViewerCamera::getInstance()->getLeftAxis());
+ msg->addVector3Fast(_PREHASH_CameraUpAxis, LLViewerCamera::getInstance()->getUpAxis());
+ msg->addF32Fast(_PREHASH_Far, gAgentCamera.mDrawDistance);
- msg->addU32Fast(_PREHASH_ControlFlags, control_flags);
+ msg->addU32Fast(_PREHASH_ControlFlags, control_flags);
- if (gDebugClicks)
+ if (gDebugClicks)
+ {
+ if (control_flags & AGENT_CONTROL_LBUTTON_DOWN)
{
- if (control_flags & AGENT_CONTROL_LBUTTON_DOWN)
- {
- LL_INFOS("Messaging") << "AgentUpdate left button down" << LL_ENDL;
- }
-
- if (control_flags & AGENT_CONTROL_LBUTTON_UP)
- {
- LL_INFOS("Messaging") << "AgentUpdate left button up" << LL_ENDL;
- }
+ LL_INFOS("Messaging") << "AgentUpdate left button down" << LL_ENDL;
}
- gAgent.enableControlFlagReset();
- if (!send_reliable)
+ if (control_flags & AGENT_CONTROL_LBUTTON_UP)
{
- gAgent.sendMessage();
- }
- else
- {
- gAgent.sendReliableMessage();
+ LL_INFOS("Messaging") << "AgentUpdate left button up" << LL_ENDL;
}
}
+
+ gAgent.enableControlFlagReset();
+
+ if (!send_reliable)
+ {
+ gAgent.sendMessage();
+ }
+ else
+ {
+ gAgent.sendReliableMessage();
+ }
+
// LL_DEBUGS("Messaging") << "agent " << avatar_pos_agent << " cam " << camera_pos_agent << LL_ENDL;
// Copy the old data