From f31b0a3361c0c39b9f6f6ee440b93293690bbe02 Mon Sep 17 00:00:00 2001 From: JacobF Date: Wed, 7 Sep 2011 10:56:04 -0400 Subject: Display which tool the player is holding And some simple animation when trying to dig... --- src/client.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 1a7ef924a..398a3b849 100644 --- a/src/client.h +++ b/src/client.h @@ -210,6 +210,7 @@ public: // eye position in *eye_position v3f getPlayerPosition(v3f *eye_position=NULL); + void setPlayerWield(scene::ISceneNode *wield); void setPlayerControl(PlayerControl &control); void selectPlayerItem(u16 item); -- cgit v1.2.3 From c0b35fa429c68b49b2d6a5124aff6dcc31400b63 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Wed, 7 Sep 2011 19:21:28 +0200 Subject: Removed unused camera_position and camera_direction fields from Client. Moved ClientEnvironment::drawPostFx to ClientMap::renderPostFx -- this will make the camera management classes easier to write, as ClientMap already knows the camera position but ClientEnvironment doesn't and has to be told about it. This also eliminates the need for Client::getEnv(). Made the post effect color a content feature defined in content_mapnode.h. --- src/client.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 1a7ef924a..9c942ff9a 100644 --- a/src/client.h +++ b/src/client.h @@ -201,14 +201,16 @@ public: void updateCamera(v3f pos, v3f dir); + void renderPostFx(); + // Returns InvalidPositionException if not found MapNode getNode(v3s16 p); // Wrapper to Map NodeMetadata* getNodeMetadata(v3s16 p); - // Get the player position, and optionally put the - // eye position in *eye_position - v3f getPlayerPosition(v3f *eye_position=NULL); + LocalPlayer* getLocalPlayer(); + + v3f getPlayerPosition(v3f *eye_position); void setPlayerControl(PlayerControl &control); @@ -302,15 +304,6 @@ public: { return m_access_denied_reason; } - - /* - This should only be used for calling the special drawing stuff in - ClientEnvironment - */ - ClientEnvironment * getEnv() - { - return &m_env; - } private: @@ -342,9 +335,6 @@ private: IrrlichtDevice *m_device; - v3f camera_position; - v3f camera_direction; - // Server serialization version u8 m_server_ser_ver; -- cgit v1.2.3 From baf7da9d4a7fc0566840b159903999d76d99a228 Mon Sep 17 00:00:00 2001 From: Kahrl Date: Thu, 8 Sep 2011 01:08:47 +0200 Subject: 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. --- src/client.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index 9c942ff9a..930987c02 100644 --- a/src/client.h +++ b/src/client.h @@ -199,7 +199,7 @@ public: // locks envlock void addNode(v3s16 p, MapNode n); - void updateCamera(v3f pos, v3f dir); + void updateCamera(v3f pos, v3f dir, f32 fov); void renderPostFx(); @@ -210,8 +210,6 @@ public: LocalPlayer* getLocalPlayer(); - v3f getPlayerPosition(v3f *eye_position); - void setPlayerControl(PlayerControl &control); void selectPlayerItem(u16 item); -- cgit v1.2.3 From 36bcbca9acabbc47976d3d7625ffb1c9396b8fdc Mon Sep 17 00:00:00 2001 From: Kahrl Date: Mon, 19 Sep 2011 03:01:11 +0200 Subject: Added sprite extruder --- src/client.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index e7a81a111..930987c02 100644 --- a/src/client.h +++ b/src/client.h @@ -210,7 +210,6 @@ public: LocalPlayer* getLocalPlayer(); - void setPlayerWield(scene::ISceneNode *wield); void setPlayerControl(PlayerControl &control); void selectPlayerItem(u16 item); -- cgit v1.2.3