mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Collected and moved existing camera infrastructure from game.cpp to camera.cpp and camera.h. Introduced configuration settings 'fov' which chooses the camera's (vertical) field of view and 'view_bobbing' which currently does nothing. Other code refactored to not expect the FOV to be a build time constant.
This commit is contained in:
@@ -1978,9 +1978,9 @@ void Client::addNode(v3s16 p, MapNode n)
|
||||
}
|
||||
}
|
||||
|
||||
void Client::updateCamera(v3f pos, v3f dir)
|
||||
void Client::updateCamera(v3f pos, v3f dir, f32 fov)
|
||||
{
|
||||
m_env.getClientMap().updateCamera(pos, dir);
|
||||
m_env.getClientMap().updateCamera(pos, dir, fov);
|
||||
}
|
||||
|
||||
void Client::renderPostFx()
|
||||
@@ -2004,16 +2004,6 @@ LocalPlayer* Client::getLocalPlayer()
|
||||
return m_env.getLocalPlayer();
|
||||
}
|
||||
|
||||
v3f Client::getPlayerPosition(v3f *eye_position)
|
||||
{
|
||||
//JMutexAutoLock envlock(m_env_mutex); //bulk comment-out
|
||||
LocalPlayer *player = m_env.getLocalPlayer();
|
||||
assert(player != NULL);
|
||||
if (eye_position)
|
||||
*eye_position = player->getEyePosition();
|
||||
return player->getPosition();
|
||||
}
|
||||
|
||||
void Client::setPlayerControl(PlayerControl &control)
|
||||
{
|
||||
//JMutexAutoLock envlock(m_env_mutex); //bulk comment-out
|
||||
|
Reference in New Issue
Block a user