correct player mask

0.6.3
Miloslav Číž 7 years ago
parent e54c0a90fa
commit 1b184d8716

@ -782,6 +782,8 @@ namespace MWRender
double fovBackup = mFieldOfView; double fovBackup = mFieldOfView;
mFieldOfView = 90.0; // each side sees 90 degrees mFieldOfView = 90.0; // each side sees 90 degrees
int maskBackup = mPlayerAnimation->getObjectRoot()->getNodeMask();
if (mCamera->isFirstPerson()) if (mCamera->isFirstPerson())
mPlayerAnimation->getObjectRoot()->setNodeMask(0); mPlayerAnimation->getObjectRoot()->setNodeMask(0);
@ -791,11 +793,9 @@ namespace MWRender
screenshot(sideImage,cubeWidth,cubeWidth,directions[i],true); screenshot(sideImage,cubeWidth,cubeWidth,directions[i],true);
} }
if (mCamera->isFirstPerson())
mPlayerAnimation->getObjectRoot()->setNodeMask(1);
s.create(image,screenshotWidth,mapping != SphericalScreenshot::MAPPING_SMALL_PLANET ? screenshotHeight : screenshotWidth,mapping); s.create(image,screenshotWidth,mapping != SphericalScreenshot::MAPPING_SMALL_PLANET ? screenshotHeight : screenshotWidth,mapping);
mPlayerAnimation->getObjectRoot()->setNodeMask(maskBackup);
mFieldOfView = fovBackup; mFieldOfView = fovBackup;
} }

Loading…
Cancel
Save