MAINT-5261 The "Ping Interpolate the object position" seems to no longer work

andreykproductengine 2017-10-23 22:06:46 +03:00
parent 76c7eb7310
commit fbb5e8b68c
1 changed files with 3 additions and 1 deletions

View File

@ -2214,7 +2214,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
LLCircuitData *cdp = gMessageSystem->mCircuitInfo.findCircuit(mesgsys->getSender());
if (cdp)
{
F32 ping_delay = 0.5f * time_dilation * ( ((F32)cdp->getPingDelay().valueInUnits<LLUnits::Seconds>()) + gFrameDTClamped);
// Note: delay is U32 and usually less then second,
// converting it into seconds with valueInUnits will result in 0
F32 ping_delay = 0.5f * time_dilation * ( ((F32)cdp->getPingDelay().value()) * 0.001f + gFrameDTClamped);
LLVector3 diff = getVelocity() * ping_delay;
new_pos_parent += diff;
}