Apply Camera FX on vehicle driver position.

This commit is contained in:
Francisco Montañés García 2017-05-02 17:17:33 +02:00
parent bb7440ee5a
commit 2707eaf322

View file

@ -1016,11 +1016,12 @@ void Vehicle::getCameraTransform(F32* pos,MatrixF* mat)
if (isServerObject() && mShapeInstance) if (isServerObject() && mShapeInstance)
mShapeInstance->animateNodeSubtrees(true); mShapeInstance->animateNodeSubtrees(true);
if (*pos == 0) { if (*pos == 0)
{
getRenderEyeTransform(mat); getRenderEyeTransform(mat);
return;
} }
else
{
// Get the shape's camera parameters. // Get the shape's camera parameters.
F32 min, max; F32 min, max;
MatrixF rot; MatrixF rot;
@ -1095,6 +1096,7 @@ void Vehicle::getCameraTransform(F32* pos,MatrixF* mat)
if (isMounted()) if (isMounted())
getObjectMount()->enableCollision(); getObjectMount()->enableCollision();
enableCollision(); enableCollision();
}
// Apply Camera FX. // Apply Camera FX.
mat->mul( gCamFXMgr.getTrans() ); mat->mul( gCamFXMgr.getTrans() );