aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-09-26 15:10:02 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-09-26 15:10:02 +0300
commit061d4b420206c67fb346d75fb6bcaf4aa8147ca8 (patch)
tree3f17c19e529baf3a6ae13479b7805fbe5cdf46ba /src/client.cpp
parentb9e680d06cf56b7c8b41a6b5626a3b94304adf42 (diff)
parent2ecd53ce09d8f20a06b057c24924a010fa2eefde (diff)
downloadminetest-061d4b420206c67fb346d75fb6bcaf4aa8147ca8.tar.gz
minetest-061d4b420206c67fb346d75fb6bcaf4aa8147ca8.tar.bz2
minetest-061d4b420206c67fb346d75fb6bcaf4aa8147ca8.zip
Merge branch 'view_bobbing_and_vielded_tool'
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 522fb8087..fa600719e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -189,8 +189,6 @@ Client::Client(
),
m_con(PROTOCOL_ID, 512, CONNECTION_TIMEOUT, this),
m_device(device),
- camera_position(0,0,0),
- camera_direction(0,0,1),
m_server_ser_ver(SER_FMT_VER_INVALID),
m_inventory_updated(false),
m_time_of_day(0),
@@ -1981,11 +1979,14 @@ 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);
- camera_position = pos;
- camera_direction = dir;
+ m_env.getClientMap().updateCamera(pos, dir, fov);
+}
+
+void Client::renderPostFx()
+{
+ m_env.getClientMap().renderPostFx();
}
MapNode Client::getNode(v3s16 p)
@@ -1999,14 +2000,9 @@ NodeMetadata* Client::getNodeMetadata(v3s16 p)
return m_env.getMap().getNodeMetadata(p);
}
-v3f Client::getPlayerPosition(v3f *eye_position)
+LocalPlayer* Client::getLocalPlayer()
{
- //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();
+ return m_env.getLocalPlayer();
}
void Client::setPlayerControl(PlayerControl &control)