summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llface.cpp2
-rw-r--r--indra/newview/llviewercamera.h2
-rwxr-xr-xindra/newview/llviewermessage.cpp3
3 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 28e4b32793..56619563cf 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -2346,8 +2346,6 @@ F32 LLFace::calcImportanceToCamera(F32 cos_angle_to_view_dir, F32 dist)
return 0.f ;
}
- //F32 camera_relative_speed = camera_moving_speed * (lookAt * LLViewerCamera::getInstance()->getVelocityDir()) ;
-
S32 i = 0 ;
for(i = 0; i < FACE_IMPORTANCE_LEVEL && dist > FACE_IMPORTANCE_TO_CAMERA_OVER_DISTANCE[i][0]; ++i);
i = llmin(i, FACE_IMPORTANCE_LEVEL - 1) ;
diff --git a/indra/newview/llviewercamera.h b/indra/newview/llviewercamera.h
index ffec284f72..d7835d8567 100644
--- a/indra/newview/llviewercamera.h
+++ b/indra/newview/llviewercamera.h
@@ -100,7 +100,7 @@ public:
BOOL projectPosAgentToScreen(const LLVector3 &pos_agent, LLCoordGL &out_point, const BOOL clamp = TRUE) const;
BOOL projectPosAgentToScreenEdge(const LLVector3 &pos_agent, LLCoordGL &out_point) const;
- const LLVector3* getVelocityDir() const {return &mVelocityDir;}
+ LLVector3 getVelocityDir() const {return mVelocityDir;}
static LLTrace::CountStatHandle<>* getVelocityStat() {return &sVelocityStat; }
static LLTrace::CountStatHandle<>* getAngularVelocityStat() {return &sAngularVelocityStat; }
F32 getCosHalfFov() {return mCosHalfCameraFOV;}
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();