#include "localplayer.h"
#include "hud.h"
#include "particles.h"
+#include "mapnode.h"
struct MeshMakeData;
class MapBlockMesh;
#include "profiler.h"
#include "raycast.h"
#include "voxelalgorithms.h"
+#include "settings.h"
/*
ClientEnvironment
#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:
#include <stack>
#include "irrlichttypes_extrabloated.h"
-#include "inventory.h"
#include "inventorymanager.h"
#include "modalMenu.h"
#include "guiTable.h"
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)
{
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)
{
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);
#include "porting.h"
#include "util/numeric.h"
#include "util/string.h"
+#include "mapblock.h"
#include <math.h>
#include "content_abm.h"
#include "content_sao.h"
#include "emerge.h"
+#include "mapblock.h"
#include "nodedef.h"
#include "player.h"
#include "rollback_interface.h"
#include "irrlichttypes_bloated.h"
#include "inventory.h"
-#include "constants.h" // BS
#include "threading/mutex.h"
#include <list>
#define SERVER_ENVIRONMENT_HEADER
#include "environment.h"
+#include "mapnode.h"
+#include "mapblock.h"
+#include <set>
class IGameDef;
class ServerMap;