|
|
|
@ -194,6 +194,8 @@ void plPhysicalControllerCore::IUpdateNonPhysical(float alpha)
|
|
|
|
|
plSceneObject* so = plSceneObject::ConvertNoRef(fOwner->ObjectIsLoaded()); |
|
|
|
|
const hsMatrix44& l2w = so->GetCoordinateInterface()->GetLocalToWorld(); |
|
|
|
|
if (CompareMatrices(fLastGlobalLoc, l2w, 0.0001f)) |
|
|
|
|
{ |
|
|
|
|
if (fEnabled) |
|
|
|
|
{ |
|
|
|
|
hsVector3 displacement = (hsVector3)(fLocalPosition - fLastLocalPosition); |
|
|
|
|
hsPoint3 interpLocalPos = fLastLocalPosition + (displacement * alpha); |
|
|
|
@ -210,6 +212,22 @@ void plPhysicalControllerCore::IUpdateNonPhysical(float alpha)
|
|
|
|
|
|
|
|
|
|
ISendCorrectionMessages(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
// Update global location if in a subworld
|
|
|
|
|
const plCoordinateInterface* subworldCI = GetSubworldCI(); |
|
|
|
|
if (subworldCI) |
|
|
|
|
{ |
|
|
|
|
hsMatrix44 l2s = fPrevSubworldW2L * fLastGlobalLoc; |
|
|
|
|
const hsMatrix44& subL2W = subworldCI->GetLocalToWorld(); |
|
|
|
|
fLastGlobalLoc = subL2W * l2s; |
|
|
|
|
fPrevSubworldW2L = subworldCI->GetWorldToLocal(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ISendCorrectionMessages(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void plPhysicalControllerCore::ISendCorrectionMessages(bool dirtySynch) |
|
|
|
|