mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Third person zoom - fixed code review issues.
This commit is contained in:
parent
1b7966ca27
commit
d12bac2d9e
@ -319,8 +319,6 @@ void RenderingManager::update (float duration, bool paused)
|
||||
Ogre::Vector3 playerPos(_playerPos[0], _playerPos[1], _playerPos[2]);
|
||||
|
||||
Ogre::Vector3 orig, dest;
|
||||
//Why is this line here?
|
||||
// mCamera->setCameraDistance();
|
||||
if(!mCamera->getPosition(orig, dest))
|
||||
{
|
||||
orig.z += mCamera->getHeight() * mRootNode->getScale().z;
|
||||
@ -895,6 +893,14 @@ bool RenderingManager::vanityRotateCamera(const float *rot)
|
||||
return true;
|
||||
}
|
||||
|
||||
void RenderingManager::setCameraDistance(float dist, bool adjust, bool override)
|
||||
{
|
||||
if(!mCamera->isVanityOrPreviewModeEnabled() && !mCamera->isFirstPerson())
|
||||
{
|
||||
mCamera->setCameraDistance(-dist / 120.f * 10, adjust, override);
|
||||
}
|
||||
}
|
||||
|
||||
void RenderingManager::getInteriorMapPosition (Ogre::Vector2 position, float& nX, float& nY, int &x, int& y)
|
||||
{
|
||||
return mLocalMap->getInteriorMapPosition (position, nX, nY, x, y);
|
||||
|
@ -86,13 +86,7 @@ public:
|
||||
void resetCamera();
|
||||
|
||||
bool vanityRotateCamera(const float *rot);
|
||||
void setCameraDistance(float dist, bool adjust = false, bool override = true)
|
||||
{
|
||||
if(!mCamera->isVanityOrPreviewModeEnabled() && !mCamera->isFirstPerson())
|
||||
{
|
||||
mCamera->setCameraDistance(-dist/120.f*10, adjust, override);
|
||||
}
|
||||
}
|
||||
void setCameraDistance(float dist, bool adjust = false, bool override = true);
|
||||
|
||||
void setupPlayer(const MWWorld::Ptr &ptr);
|
||||
void renderPlayer(const MWWorld::Ptr &ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user