diff --git a/src/client.h b/src/client.h index df3e7e60..f84246de 100644 --- a/src/client.h +++ b/src/client.h @@ -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; diff --git a/src/clientenvironment.cpp b/src/clientenvironment.cpp index 65646c6b..b32a02f2 100644 --- a/src/clientenvironment.cpp +++ b/src/clientenvironment.cpp @@ -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 diff --git a/src/environment.h b/src/environment.h index 0cc3222f..5154bbdc 100644 --- a/src/environment.h +++ b/src/environment.h @@ -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: diff --git a/src/guiFormSpecMenu.h b/src/guiFormSpecMenu.h index 94b52e6f..2ab7db4f 100644 --- a/src/guiFormSpecMenu.h +++ b/src/guiFormSpecMenu.h @@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include "irrlichttypes_extrabloated.h" -#include "inventory.h" #include "inventorymanager.h" #include "modalMenu.h" #include "guiTable.h" diff --git a/src/localplayer.cpp b/src/localplayer.cpp index b859c645..857d95d8 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -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) { diff --git a/src/localplayer.h b/src/localplayer.h index cbdcb986..685a78cb 100644 --- a/src/localplayer.h +++ b/src/localplayer.h @@ -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); diff --git a/src/minimap.cpp b/src/minimap.cpp index 8cd0a7be..f49adb51 100644 --- a/src/minimap.cpp +++ b/src/minimap.cpp @@ -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 diff --git a/src/network/serverpackethandler.cpp b/src/network/serverpackethandler.cpp index eeabcca7..408fe770 100644 --- a/src/network/serverpackethandler.cpp +++ b/src/network/serverpackethandler.cpp @@ -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" diff --git a/src/player.h b/src/player.h index 5f9bb7ec..3432069c 100644 --- a/src/player.h +++ b/src/player.h @@ -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 diff --git a/src/serverenvironment.h b/src/serverenvironment.h index d71d29a9..b7056c00 100644 --- a/src/serverenvironment.h +++ b/src/serverenvironment.h @@ -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 class IGameDef; class ServerMap;