summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-08-16 12:38:12 -0700
committerRichard Linden <none@none>2013-08-16 12:38:12 -0700
commit25937040de9a787c221aae7f178f43827c799028 (patch)
tree69f9a127043fb492ea218678398d81456239e5c2 /indra/newview/llviewerobject.cpp
parentaa050ac946e372c72d0411cda95ccaf41603f394 (diff)
SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms
converted many values over to units system in effort to track down source of 0 ping
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rwxr-xr-xindra/newview/llviewerobject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 3d75f86154..b054e519e0 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -119,8 +119,8 @@ BOOL LLViewerObject::sPulseEnabled(FALSE);
BOOL LLViewerObject::sUseSharedDrawables(FALSE); // TRUE
// sMaxUpdateInterpolationTime must be greater than sPhaseOutUpdateInterpolationTime
-F64 LLViewerObject::sMaxUpdateInterpolationTime = 3.0; // For motion interpolation: after X seconds with no updates, don't predict object motion
-F64 LLViewerObject::sPhaseOutUpdateInterpolationTime = 2.0; // For motion interpolation: after Y seconds with no updates, taper off motion prediction
+F64Seconds LLViewerObject::sMaxUpdateInterpolationTime(3.0); // For motion interpolation: after X seconds with no updates, don't predict object motion
+F64Seconds LLViewerObject::sPhaseOutUpdateInterpolationTime(2.0); // For motion interpolation: after Y seconds with no updates, taper off motion prediction
std::map<std::string, U32> LLViewerObject::sObjectDataMap;
@@ -2190,7 +2190,7 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender());
if (cdp)
{
- F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay()) * 0.001f + gFrameDTClamped);
+ F32 ping_delay = 0.5f * mTimeDilation * ( ((F32)cdp->getPingDelay().valueInUnits<LLUnits::Seconds>()) + gFrameDTClamped);
LLVector3 diff = getVelocity() * ping_delay;
new_pos_parent += diff;
}
@@ -2491,7 +2491,7 @@ void LLViewerObject::interpolateLinearMotion(const F64 & time, const F32 & dt)
if (cdp)
{
// Find out how many seconds since last packet arrived on the circuit
- F64 time_since_last_packet = LLMessageSystem::getMessageTimeSeconds() - cdp->getLastPacketInTime();
+ F64Seconds time_since_last_packet = LLMessageSystem::getMessageTimeSeconds() - cdp->getLastPacketInTime();
if (!cdp->isAlive() || // Circuit is dead or blocked
cdp->isBlocked() || // or doesn't seem to be getting any packets