]> git.lizzy.rs Git - minetest.git/commitdiff
Cleanup some header inclusions to improve compilation times
authorLoic Blot <loic.blot@unix-experience.fr>
Wed, 11 Jan 2017 08:03:07 +0000 (09:03 +0100)
committerNer'zhul <nerzhul@users.noreply.github.com>
Wed, 11 Jan 2017 14:53:56 +0000 (15:53 +0100)
src/client.h
src/clientenvironment.cpp
src/environment.h
src/guiFormSpecMenu.h
src/localplayer.cpp
src/localplayer.h
src/minimap.cpp
src/network/serverpackethandler.cpp
src/player.h
src/serverenvironment.h

index df3e7e60548b4c3bc7eb2aec54da101307208522..f84246deb49c07dc25b2f91d29a5078fedcb7fc7 100644 (file)
@@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "localplayer.h"
 #include "hud.h"
 #include "particles.h"
+#include "mapnode.h"
 
 struct MeshMakeData;
 class MapBlockMesh;
index 65646c6b4e4ba10975dce04b862edaec2ad79117..b32a02f2d3baa600103717974c61b70c396ccf89 100644 (file)
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "profiler.h"
 #include "raycast.h"
 #include "voxelalgorithms.h"
+#include "settings.h"
 
 /*
        ClientEnvironment
index 0cc3222f99f267d95caf0b1ea95e3daf8ed2460a..5154bbdcb2e4472af78219807d6f3611607c0c17 100644 (file)
@@ -36,12 +36,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "irr_v3d.h"
 #include "activeobject.h"
 #include "util/numeric.h"
-#include "mapnode.h"
-#include "mapblock.h"
 #include "threading/mutex.h"
 #include "threading/atomic.h"
 #include "network/networkprotocol.h" // for AccessDeniedCode
 
+class Map;
+
 class Environment
 {
 public:
index 94b52e6f020825fcd580e0d74725c210209be889..2ab7db4f104334a3a464fbd30eaa8c4f57a58f28 100644 (file)
@@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <stack>
 
 #include "irrlichttypes_extrabloated.h"
-#include "inventory.h"
 #include "inventorymanager.h"
 #include "modalMenu.h"
 #include "guiTable.h"
index b859c64557d001f40fef59e6effd545c1620542e..857d95d8b7a521dad7c822c924b92f47964b6069 100644 (file)
@@ -655,6 +655,17 @@ v3s16 LocalPlayer::getStandingNodePos()
        return floatToInt(getPosition() - v3f(0, BS, 0), BS);
 }
 
+v3s16 LocalPlayer::getLightPosition() const
+{
+       return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
+}
+
+v3f LocalPlayer::getEyeOffset() const
+{
+       float eye_height = camera_barely_in_ceiling ? 1.5f : 1.625f;
+       return v3f(0, BS * eye_height, 0);
+}
+
 // Horizontal acceleration (X and Z), Y direction is ignored
 void LocalPlayer::accelerateHorizontal(const v3f &target_speed, const f32 max_increase)
 {
index cbdcb9867df15231716c5cacef06bd50f92dd6af..685a78cb39612960c9caf5f71d5f8ca51c71c11c 100644 (file)
@@ -105,10 +105,7 @@ class LocalPlayer : public Player
        u16 getBreath() const { return m_breath; }
        void setBreath(u16 breath) { m_breath = breath; }
 
-       v3s16 getLightPosition() const
-       {
-               return floatToInt(m_position + v3f(0,BS+BS/2,0), BS);
-       }
+       v3s16 getLightPosition() const;
 
        void setYaw(f32 yaw)
        {
@@ -131,11 +128,7 @@ class LocalPlayer : public Player
 
        v3f getPosition() const { return m_position; }
        v3f getEyePosition() const { return m_position + getEyeOffset(); }
-       v3f getEyeOffset() const
-       {
-               float eye_height = camera_barely_in_ceiling ? 1.5f : 1.625f;
-               return v3f(0, BS * eye_height, 0);
-       }
+       v3f getEyeOffset() const;
 private:
        void accelerateHorizontal(const v3f &target_speed, const f32 max_increase);
        void accelerateVertical(const v3f &target_speed, const f32 max_increase);
index 8cd0a7beb89fbd53d87a90e681a1302bc823611f..f49adb5170dc3a048dcb8e0c716086e4c1e888bb 100644 (file)
@@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "porting.h"
 #include "util/numeric.h"
 #include "util/string.h"
+#include "mapblock.h"
 #include <math.h>
 
 
index eeabcca71947f3d56627c25138afda0fdc01482d..408fe770671eb94acff684721c0c31c237c98f0c 100644 (file)
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "content_abm.h"
 #include "content_sao.h"
 #include "emerge.h"
+#include "mapblock.h"
 #include "nodedef.h"
 #include "player.h"
 #include "rollback_interface.h"
index 5f9bb7ec97d0ec9b490ab9cdee6d1a1e1a5feb4e..3432069c0524a70e297b6befe85b689669d5ec02 100644 (file)
@@ -22,7 +22,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 
 #include "irrlichttypes_bloated.h"
 #include "inventory.h"
-#include "constants.h" // BS
 #include "threading/mutex.h"
 #include <list>
 
index d71d29a9cc0f9f5dc5d9b2b65497d4097b723d1e..b7056c00cd8687ef984debefaed99be8d75a3aeb 100644 (file)
@@ -21,6 +21,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define SERVER_ENVIRONMENT_HEADER
 
 #include "environment.h"
+#include "mapnode.h"
+#include "mapblock.h"
+#include <set>
 
 class IGameDef;
 class ServerMap;