summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-03-25 18:45:42 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-03-25 18:45:42 -0600
commit0ddeaa196731299e443d96e9f2797d8247c0de97 (patch)
tree80fce8f6c7751de8531e9783dd23e9748b2f22b9 /indra/newview/llviewermessage.cpp
parentcf4798b8f90eebaa62dcb8817538f1e3965b6bc9 (diff)
for SH-3927: Interesting: Viewer should send predicted camera position to simulator to control object load order
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-xindra/newview/llviewermessage.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 4b1c9c5574..8dc72ba5b4 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4222,6 +4222,9 @@ void send_agent_update(BOOL force_send, BOOL send_reliable)
LLQuaternion head_rotation = gAgent.getHeadRotation();
camera_pos_agent = gAgentCamera.getCameraPositionAgent();
+ LLVector3 camera_velocity = LLViewerCamera::getInstance()->getVelocityDir() * LLViewerCamera::getInstance()->getAverageSpeed();
+ F32 time_delta = 1.0f; //predict the camera position in 1 second
+ camera_pos_agent += camera_velocity * time_delta;
render_state = gAgent.getRenderState();