diff options
author | Kahrl <kahrl@gmx.net> | 2011-09-08 01:08:47 +0200 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2011-09-08 01:08:47 +0200 |
commit | baf7da9d4a7fc0566840b159903999d76d99a228 (patch) | |
tree | 66ed23105449fcf51e971d5f8fcbf03d04973fb7 /src/client.cpp | |
parent | c0b35fa429c68b49b2d6a5124aff6dcc31400b63 (diff) | |
download | minetest-baf7da9d4a7fc0566840b159903999d76d99a228.tar.gz minetest-baf7da9d4a7fc0566840b159903999d76d99a228.tar.bz2 minetest-baf7da9d4a7fc0566840b159903999d76d99a228.zip |
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.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/client.cpp b/src/client.cpp index df792d116..81dedd144 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -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 |