Merge pull request #2001 from pacomont/Let's_appling_Camera_FX_when_mount_on_driver_position

Why not apply Camera FX on vehicle driver position?
This commit is contained in:
Areloch 2017-05-15 00:58:11 -05:00 committed by GitHub
commit 726790bacf

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() );