forked from Mirrorlandia_minetest/minetest
Cleanup various headers to reduce compilation times (#6255)
* Cleanup various headers to reduce compilation times
This commit is contained in:
parent
816bca32ac
commit
85511a642f
@ -30,7 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
class BanManager
|
class BanManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BanManager(const std::string &bannfilepath);
|
BanManager(const std::string &banfilepath);
|
||||||
~BanManager();
|
~BanManager();
|
||||||
void load();
|
void load();
|
||||||
void save();
|
void save();
|
||||||
|
@ -283,8 +283,7 @@ void Camera::addArmInertia(f32 player_yaw)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
|
void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime, f32 tool_reload_ratio)
|
||||||
f32 tool_reload_ratio, ClientEnvironment &c_env)
|
|
||||||
{
|
{
|
||||||
// Get player position
|
// Get player position
|
||||||
// Smooth the movement when walking up stairs
|
// Smooth the movement when walking up stairs
|
||||||
@ -408,19 +407,19 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
|
|||||||
|
|
||||||
// Calculate new position
|
// Calculate new position
|
||||||
bool abort = false;
|
bool abort = false;
|
||||||
for (int i = BS; i <= BS*2.75; i++)
|
for (int i = BS; i <= BS * 2.75; i++) {
|
||||||
{
|
my_cp.X = m_camera_position.X + m_camera_direction.X * -i;
|
||||||
my_cp.X = m_camera_position.X + m_camera_direction.X*-i;
|
my_cp.Z = m_camera_position.Z + m_camera_direction.Z * -i;
|
||||||
my_cp.Z = m_camera_position.Z + m_camera_direction.Z*-i;
|
|
||||||
if (i > 12)
|
if (i > 12)
|
||||||
my_cp.Y = m_camera_position.Y + (m_camera_direction.Y*-i);
|
my_cp.Y = m_camera_position.Y + (m_camera_direction.Y * -i);
|
||||||
|
|
||||||
// Prevent camera positioned inside nodes
|
// Prevent camera positioned inside nodes
|
||||||
INodeDefManager *nodemgr = m_client->ndef();
|
INodeDefManager *nodemgr = m_client->ndef();
|
||||||
MapNode n = c_env.getClientMap().getNodeNoEx(floatToInt(my_cp, BS));
|
MapNode n = m_client->getEnv().getClientMap()
|
||||||
|
.getNodeNoEx(floatToInt(my_cp, BS));
|
||||||
|
|
||||||
const ContentFeatures& features = nodemgr->get(n);
|
const ContentFeatures& features = nodemgr->get(n);
|
||||||
if(features.walkable)
|
if (features.walkable) {
|
||||||
{
|
|
||||||
my_cp.X += m_camera_direction.X*-1*-BS/2;
|
my_cp.X += m_camera_direction.X*-1*-BS/2;
|
||||||
my_cp.Z += m_camera_direction.Z*-1*-BS/2;
|
my_cp.Z += m_camera_direction.Z*-1*-BS/2;
|
||||||
my_cp.Y += m_camera_direction.Y*-1*-BS/2;
|
my_cp.Y += m_camera_direction.Y*-1*-BS/2;
|
||||||
|
@ -24,13 +24,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "inventory.h"
|
#include "inventory.h"
|
||||||
#include "mesh.h"
|
#include "mesh.h"
|
||||||
#include "client/tile.h"
|
#include "client/tile.h"
|
||||||
#include "util/numeric.h"
|
|
||||||
#include <ICameraSceneNode.h>
|
#include <ICameraSceneNode.h>
|
||||||
#include <ISceneNode.h>
|
#include <ISceneNode.h>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "client.h"
|
|
||||||
|
|
||||||
class LocalPlayer;
|
class LocalPlayer;
|
||||||
struct MapDrawControl;
|
struct MapDrawControl;
|
||||||
class Client;
|
class Client;
|
||||||
@ -120,7 +117,7 @@ public:
|
|||||||
// Update the camera from the local player's position.
|
// Update the camera from the local player's position.
|
||||||
// busytime is used to adjust the viewing range.
|
// busytime is used to adjust the viewing range.
|
||||||
void update(LocalPlayer* player, f32 frametime, f32 busytime,
|
void update(LocalPlayer* player, f32 frametime, f32 busytime,
|
||||||
f32 tool_reload_ratio, ClientEnvironment &c_env);
|
f32 tool_reload_ratio);
|
||||||
|
|
||||||
// Update render distance
|
// Update render distance
|
||||||
void updateViewingRange();
|
void updateViewingRange();
|
||||||
|
@ -22,6 +22,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <IFileSystem.h>
|
#include <IFileSystem.h>
|
||||||
|
#include "client.h"
|
||||||
|
#include "network/clientopcodes.h"
|
||||||
|
#include "network/networkpacket.h"
|
||||||
#include "threading/mutex_auto_lock.h"
|
#include "threading/mutex_auto_lock.h"
|
||||||
#include "client/renderingengine.h"
|
#include "client/renderingengine.h"
|
||||||
#include "util/auth.h"
|
#include "util/auth.h"
|
||||||
@ -30,8 +33,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "util/serialize.h"
|
#include "util/serialize.h"
|
||||||
#include "util/string.h"
|
#include "util/string.h"
|
||||||
#include "util/srp.h"
|
#include "util/srp.h"
|
||||||
#include "client.h"
|
|
||||||
#include "network/clientopcodes.h"
|
|
||||||
#include "filesys.h"
|
#include "filesys.h"
|
||||||
#include "mapblock_mesh.h"
|
#include "mapblock_mesh.h"
|
||||||
#include "mapblock.h"
|
#include "mapblock.h"
|
||||||
|
@ -38,7 +38,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "tileanimation.h"
|
#include "tileanimation.h"
|
||||||
#include "mesh_generator_thread.h"
|
#include "mesh_generator_thread.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include "filesys.h"
|
|
||||||
|
|
||||||
#define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
|
#define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
|
||||||
|
|
||||||
|
@ -247,8 +247,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
return m_mousepos;
|
return m_mousepos;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setMousePos(s32 x, s32 y)
|
virtual void setMousePos(s32 x, s32 y)
|
||||||
{
|
{
|
||||||
if (RenderingEngine::get_raw_device()->getCursorControl()) {
|
if (RenderingEngine::get_raw_device()->getCursorControl()) {
|
||||||
|
@ -21,10 +21,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <IrrlichtDevice.h>
|
#include <IrrlichtDevice.h>
|
||||||
#include <irrlicht.h>
|
#include <irrlicht.h>
|
||||||
#include "fontengine.h"
|
#include "fontengine.h"
|
||||||
|
#include "client.h"
|
||||||
#include "clouds.h"
|
#include "clouds.h"
|
||||||
#include "util/numeric.h"
|
#include "util/numeric.h"
|
||||||
#include "guiscalingfilter.h"
|
#include "guiscalingfilter.h"
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
|
#include "localplayer.h"
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
#include "minimap.h"
|
#include "minimap.h"
|
||||||
#include "clientmap.h"
|
#include "clientmap.h"
|
||||||
|
@ -19,6 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#include "util/serialize.h"
|
#include "util/serialize.h"
|
||||||
#include "util/pointedthing.h"
|
#include "util/pointedthing.h"
|
||||||
|
#include "client.h"
|
||||||
#include "clientenvironment.h"
|
#include "clientenvironment.h"
|
||||||
#include "clientsimpleobject.h"
|
#include "clientsimpleobject.h"
|
||||||
#include "clientmap.h"
|
#include "clientmap.h"
|
||||||
|
@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <ISceneManager.h>
|
#include <ISceneManager.h>
|
||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "clientobject.h"
|
#include "clientobject.h"
|
||||||
|
#include "util/numeric.h"
|
||||||
|
|
||||||
class ClientSimpleObject;
|
class ClientSimpleObject;
|
||||||
class ClientMap;
|
class ClientMap;
|
||||||
|
@ -18,18 +18,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include "clientiface.h"
|
#include "clientiface.h"
|
||||||
|
#include "network/connection.h"
|
||||||
|
#include "network/serveropcodes.h"
|
||||||
#include "remoteplayer.h"
|
#include "remoteplayer.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "mapblock.h"
|
#include "mapblock.h"
|
||||||
#include "network/connection.h"
|
|
||||||
#include "serverenvironment.h"
|
#include "serverenvironment.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "emerge.h"
|
#include "emerge.h"
|
||||||
#include "content_sao.h" // TODO this is used for cleanup of only
|
#include "content_sao.h" // TODO this is used for cleanup of only
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "network/serveropcodes.h"
|
|
||||||
#include "util/srp.h"
|
#include "util/srp.h"
|
||||||
#include "face_position_cache.h"
|
#include "face_position_cache.h"
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "serialization.h" // for SER_FMT_VER_INVALID
|
#include "serialization.h" // for SER_FMT_VER_INVALID
|
||||||
#include "network/networkpacket.h"
|
#include "network/networkpacket.h"
|
||||||
|
#include "network/networkprotocol.h"
|
||||||
#include "porting.h"
|
#include "porting.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
@ -41,6 +41,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "localplayer.h"
|
#include "localplayer.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "camera.h" // CameraModes
|
#include "camera.h" // CameraModes
|
||||||
|
#include "client.h"
|
||||||
#include "wieldmesh.h"
|
#include "wieldmesh.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "client/renderingengine.h"
|
#include "client/renderingengine.h"
|
||||||
|
@ -19,7 +19,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#ifndef CONTENT_MAPBLOCK_HEADER
|
#ifndef CONTENT_MAPBLOCK_HEADER
|
||||||
#define CONTENT_MAPBLOCK_HEADER
|
#define CONTENT_MAPBLOCK_HEADER
|
||||||
#include "util/numeric.h"
|
|
||||||
#include "nodedef.h"
|
#include "nodedef.h"
|
||||||
#include <IMeshManipulator.h>
|
#include <IMeshManipulator.h>
|
||||||
|
|
||||||
|
@ -36,9 +36,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include "irr_v3d.h"
|
#include "irr_v3d.h"
|
||||||
#include "activeobject.h"
|
|
||||||
#include "util/numeric.h"
|
|
||||||
#include "network/networkprotocol.h" // for AccessDeniedCode
|
#include "network/networkprotocol.h" // for AccessDeniedCode
|
||||||
|
#include "util/basic_macros.h"
|
||||||
|
|
||||||
class IGameDef;
|
class IGameDef;
|
||||||
class Map;
|
class Map;
|
||||||
|
@ -3445,8 +3445,7 @@ void Game::updateCamera(u32 busy_time, f32 dtime)
|
|||||||
float tool_reload_ratio = runData.time_from_last_punch / full_punch_interval;
|
float tool_reload_ratio = runData.time_from_last_punch / full_punch_interval;
|
||||||
|
|
||||||
tool_reload_ratio = MYMIN(tool_reload_ratio, 1.0);
|
tool_reload_ratio = MYMIN(tool_reload_ratio, 1.0);
|
||||||
camera->update(player, dtime, busy_time / 1000.0f, tool_reload_ratio,
|
camera->update(player, dtime, busy_time / 1000.0f, tool_reload_ratio);
|
||||||
client->getEnv());
|
|
||||||
camera->step(dtime);
|
camera->step(dtime);
|
||||||
|
|
||||||
v3f camera_position = camera->getPosition();
|
v3f camera_position = camera->getPosition();
|
||||||
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#define GETTEXT_HEADER
|
#define GETTEXT_HEADER
|
||||||
|
|
||||||
#include "config.h" // for USE_GETTEXT
|
#include "config.h" // for USE_GETTEXT
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#if USE_GETTEXT
|
#if USE_GETTEXT
|
||||||
#include <libintl.h>
|
#include <libintl.h>
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#include "irrlichttypes_extrabloated.h"
|
#include "irrlichttypes_extrabloated.h"
|
||||||
#include "modalMenu.h"
|
#include "modalMenu.h"
|
||||||
#include "client.h"
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "keycode.h"
|
#include "keycode.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -17,9 +17,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "guiPasswordChange.h"
|
#include "guiPasswordChange.h"
|
||||||
#include "debug.h"
|
#include "client.h"
|
||||||
#include "serialization.h"
|
|
||||||
#include <string>
|
|
||||||
#include <IGUICheckBox.h>
|
#include <IGUICheckBox.h>
|
||||||
#include <IGUIEditBox.h>
|
#include <IGUIEditBox.h>
|
||||||
#include <IGUIButton.h>
|
#include <IGUIButton.h>
|
||||||
|
@ -21,9 +21,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
|
|
||||||
#include "irrlichttypes_extrabloated.h"
|
#include "irrlichttypes_extrabloated.h"
|
||||||
#include "modalMenu.h"
|
#include "modalMenu.h"
|
||||||
#include "client.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
class Client;
|
||||||
|
|
||||||
class GUIPasswordChange : public GUIModalMenu
|
class GUIPasswordChange : public GUIModalMenu
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -22,7 +22,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||||||
|
|
||||||
#include "irrlichttypes_extrabloated.h"
|
#include "irrlichttypes_extrabloated.h"
|
||||||
#include "modalMenu.h"
|
#include "modalMenu.h"
|
||||||
#include "client.h"
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class GUIVolumeChange : public GUIModalMenu
|
class GUIVolumeChange : public GUIModalMenu
|
||||||
|
@ -28,7 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
* regardless of the compiler.
|
* regardless of the compiler.
|
||||||
*/
|
*/
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
# include <stdint.h>
|
# include <cstdint>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <irrTypes.h>
|
#include <irrTypes.h>
|
||||||
|
@ -144,7 +144,9 @@ public:
|
|||||||
void setCollisionbox(const aabb3f &box) { m_collisionbox = box; }
|
void setCollisionbox(const aabb3f &box) { m_collisionbox = box; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// clang-format off
|
||||||
void accelerateHorizontal(const v3f &target_speed, f32 max_increase, bool slippery);
|
void accelerateHorizontal(const v3f &target_speed, f32 max_increase, bool slippery);
|
||||||
|
// clang-format on
|
||||||
void accelerateVertical(const v3f &target_speed, const f32 max_increase);
|
void accelerateVertical(const v3f &target_speed, const f32 max_increase);
|
||||||
bool updateSneakNode(Map *map, const v3f &position, const v3f &sneak_max);
|
bool updateSneakNode(Map *map, const v3f &position, const v3f &sneak_max);
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#include "mainmenumanager.h"
|
#include "mainmenumanager.h"
|
||||||
#include "irrlichttypes_extrabloated.h"
|
#include "irrlichttypes_extrabloated.h"
|
||||||
|
#include "chat_interface.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "unittest/test.h"
|
#include "unittest/test.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
@ -34,10 +35,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "quicktune.h"
|
#include "quicktune.h"
|
||||||
#include "httpfetch.h"
|
#include "httpfetch.h"
|
||||||
#include "guiEngine.h"
|
#include "guiEngine.h"
|
||||||
#include "map.h"
|
|
||||||
#include "player.h"
|
|
||||||
#include "mapsector.h"
|
|
||||||
#include "fontengine.h"
|
|
||||||
#include "gameparams.h"
|
#include "gameparams.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -47,7 +44,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#endif
|
#endif
|
||||||
#ifndef SERVER
|
#ifndef SERVER
|
||||||
#include "client/clientlauncher.h"
|
#include "client/clientlauncher.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_TOUCHSCREENGUI
|
#ifdef HAVE_TOUCHSCREENGUI
|
||||||
|
@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "mapblock_mesh.h"
|
#include "mapblock_mesh.h"
|
||||||
|
#include "client.h"
|
||||||
#include "mapblock.h"
|
#include "mapblock.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "profiler.h"
|
#include "profiler.h"
|
||||||
|
@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "noise.h"
|
#include "noise.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "util/numeric.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,16 +18,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "minimap.h"
|
#include "minimap.h"
|
||||||
#include "threading/mutex_auto_lock.h"
|
#include "client.h"
|
||||||
#include "threading/semaphore.h"
|
|
||||||
#include "clientmap.h"
|
#include "clientmap.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "nodedef.h"
|
|
||||||
#include "porting.h"
|
|
||||||
#include "util/numeric.h"
|
|
||||||
#include "util/string.h"
|
|
||||||
#include "mapblock.h"
|
#include "mapblock.h"
|
||||||
#include <math.h>
|
|
||||||
#include "client/renderingengine.h"
|
#include "client/renderingengine.h"
|
||||||
|
|
||||||
|
|
||||||
@ -37,16 +31,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
MinimapUpdateThread::~MinimapUpdateThread()
|
MinimapUpdateThread::~MinimapUpdateThread()
|
||||||
{
|
{
|
||||||
for (std::map<v3s16, MinimapMapblock *>::iterator
|
for (auto &it : m_blocks_cache) {
|
||||||
it = m_blocks_cache.begin();
|
delete it.second;
|
||||||
it != m_blocks_cache.end(); ++it) {
|
|
||||||
delete it->second;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (std::deque<QueuedMinimapUpdate>::iterator
|
for (auto &q : m_update_queue) {
|
||||||
it = m_update_queue.begin();
|
|
||||||
it != m_update_queue.end(); ++it) {
|
|
||||||
QueuedMinimapUpdate &q = *it;
|
|
||||||
delete q.data;
|
delete q.data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,18 +21,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#define MINIMAP_HEADER
|
#define MINIMAP_HEADER
|
||||||
|
|
||||||
#include "irrlichttypes_extrabloated.h"
|
#include "irrlichttypes_extrabloated.h"
|
||||||
#include "client.h"
|
#include "util/thread.h"
|
||||||
#include "voxel.h"
|
#include "voxel.h"
|
||||||
#include "threading/semaphore.h"
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "camera.h"
|
|
||||||
|
class Client;
|
||||||
|
class ITextureSource;
|
||||||
|
class IShaderSource;
|
||||||
|
|
||||||
#define MINIMAP_MAX_SX 512
|
#define MINIMAP_MAX_SX 512
|
||||||
#define MINIMAP_MAX_SY 512
|
#define MINIMAP_MAX_SY 512
|
||||||
|
|
||||||
|
|
||||||
enum MinimapMode {
|
enum MinimapMode {
|
||||||
MINIMAP_MODE_OFF,
|
MINIMAP_MODE_OFF,
|
||||||
MINIMAP_MODE_SURFACEx1,
|
MINIMAP_MODE_SURFACEx1,
|
||||||
|
@ -23,7 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "networkprotocol.h"
|
#include "networkprotocol.h"
|
||||||
#include "networkpacket.h"
|
|
||||||
|
class NetworkPacket;
|
||||||
|
|
||||||
enum ToClientConnectionState {
|
enum ToClientConnectionState {
|
||||||
TOCLIENT_STATE_NOT_CONNECTED,
|
TOCLIENT_STATE_NOT_CONNECTED,
|
||||||
|
@ -563,6 +563,20 @@ void IncomingSplitBuffer::removeUnreliableTimedOuts(float dtime, float timeout)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
ConnectionCommand
|
||||||
|
*/
|
||||||
|
|
||||||
|
void ConnectionCommand::send(u16 peer_id_, u8 channelnum_, NetworkPacket *pkt,
|
||||||
|
bool reliable_)
|
||||||
|
{
|
||||||
|
type = CONNCMD_SEND;
|
||||||
|
peer_id = peer_id_;
|
||||||
|
channelnum = channelnum_;
|
||||||
|
data = pkt->oldForgePacket();
|
||||||
|
reliable = reliable_;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Channel
|
Channel
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
#include "exceptions.h"
|
#include "exceptions.h"
|
||||||
#include "constants.h"
|
#include "constants.h"
|
||||||
#include "network/networkpacket.h"
|
|
||||||
#include "util/pointer.h"
|
#include "util/pointer.h"
|
||||||
#include "util/container.h"
|
#include "util/container.h"
|
||||||
#include "util/thread.h"
|
#include "util/thread.h"
|
||||||
@ -433,15 +432,8 @@ struct ConnectionCommand
|
|||||||
type = CONNCMD_DISCONNECT_PEER;
|
type = CONNCMD_DISCONNECT_PEER;
|
||||||
peer_id = peer_id_;
|
peer_id = peer_id_;
|
||||||
}
|
}
|
||||||
void send(u16 peer_id_, u8 channelnum_,
|
|
||||||
NetworkPacket* pkt, bool reliable_)
|
void send(u16 peer_id_, u8 channelnum_, NetworkPacket* pkt, bool reliable_);
|
||||||
{
|
|
||||||
type = CONNCMD_SEND;
|
|
||||||
peer_id = peer_id_;
|
|
||||||
channelnum = channelnum_;
|
|
||||||
data = pkt->oldForgePacket();
|
|
||||||
reliable = reliable_;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ack(u16 peer_id_, u8 channelnum_, const SharedBuffer<u8> &data_)
|
void ack(u16 peer_id_, u8 channelnum_, const SharedBuffer<u8> &data_)
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "networkpacket.h"
|
#include "networkpacket.h"
|
||||||
#include "debug.h"
|
#include <sstream>
|
||||||
#include "exceptions.h"
|
#include "exceptions.h"
|
||||||
#include "util/serialize.h"
|
#include "util/serialize.h"
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#ifndef NETWORKPACKET_HEADER
|
#ifndef NETWORKPACKET_HEADER
|
||||||
#define NETWORKPACKET_HEADER
|
#define NETWORKPACKET_HEADER
|
||||||
|
|
||||||
|
#include <SColor.h>
|
||||||
#include "util/pointer.h"
|
#include "util/pointer.h"
|
||||||
#include "util/numeric.h"
|
#include "util/numeric.h"
|
||||||
#include "networkprotocol.h"
|
|
||||||
|
|
||||||
class NetworkPacket
|
class NetworkPacket
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "networkprotocol.h"
|
#include "networkprotocol.h"
|
||||||
#include "networkpacket.h"
|
|
||||||
|
class NetworkPacket;
|
||||||
|
|
||||||
enum ToServerConnectionState {
|
enum ToServerConnectionState {
|
||||||
TOSERVER_STATE_NOT_CONNECTED,
|
TOSERVER_STATE_NOT_CONNECTED,
|
||||||
|
@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include "util/numeric.h"
|
|
||||||
#include "mapnode.h"
|
#include "mapnode.h"
|
||||||
#ifndef SERVER
|
#ifndef SERVER
|
||||||
#include "client/tile.h"
|
#include "client/tile.h"
|
||||||
|
@ -111,7 +111,7 @@ struct NoiseParams {
|
|||||||
float lacunarity = 2.0f;
|
float lacunarity = 2.0f;
|
||||||
u32 flags = NOISE_FLAG_DEFAULTS;
|
u32 flags = NOISE_FLAG_DEFAULTS;
|
||||||
|
|
||||||
NoiseParams() {}
|
NoiseParams() = default;
|
||||||
|
|
||||||
NoiseParams(float offset_, float scale_, v3f spread_, s32 seed_,
|
NoiseParams(float offset_, float scale_, v3f spread_, s32 seed_,
|
||||||
u16 octaves_, float persist_, float lacunarity_,
|
u16 octaves_, float persist_, float lacunarity_,
|
||||||
|
@ -24,8 +24,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <deque>
|
#include <deque>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
#include "threading/thread.h"
|
|
||||||
#include "threading/semaphore.h"
|
#include "threading/semaphore.h"
|
||||||
|
#include "threading/thread.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "lua.h"
|
#include "lua.h"
|
||||||
#include "cpp_api/s_base.h"
|
#include "cpp_api/s_base.h"
|
||||||
@ -39,7 +39,7 @@ class AsyncEngine;
|
|||||||
// Data required to queue a job
|
// Data required to queue a job
|
||||||
struct LuaJobInfo
|
struct LuaJobInfo
|
||||||
{
|
{
|
||||||
LuaJobInfo() {};
|
LuaJobInfo() = default;
|
||||||
|
|
||||||
// Function to be called in async environment
|
// Function to be called in async environment
|
||||||
std::string serializedFunction = "";
|
std::string serializedFunction = "";
|
||||||
|
@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
#include <mutex>
|
||||||
#include "util/basic_macros.h"
|
#include "util/basic_macros.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -30,7 +31,6 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "irrlichttypes.h"
|
#include "irrlichttypes.h"
|
||||||
#include "threading/mutex_auto_lock.h"
|
|
||||||
#include "common/c_types.h"
|
#include "common/c_types.h"
|
||||||
#include "common/c_internal.h"
|
#include "common/c_internal.h"
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
#include "common/c_internal.h"
|
#include "common/c_internal.h"
|
||||||
#include "cpp_api/s_base.h"
|
#include "cpp_api/s_base.h"
|
||||||
|
#include "threading/mutex_auto_lock.h"
|
||||||
|
|
||||||
#ifdef SCRIPTAPI_LOCK_DEBUG
|
#ifdef SCRIPTAPI_LOCK_DEBUG
|
||||||
#include "debug.h" // assert()
|
#include "debug.h" // assert()
|
||||||
|
@ -30,7 +30,7 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef SERVER
|
#ifndef SERVER
|
||||||
#include "client.h"
|
class Client;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class ScriptApiBase;
|
class ScriptApiBase;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "l_internal.h"
|
#include "l_internal.h"
|
||||||
#include "content_cao.h"
|
#include "content_cao.h"
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
LuaCamera::LuaCamera(Camera *m) : m_camera(m)
|
LuaCamera::LuaCamera(Camera *m) : m_camera(m)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#include "l_client.h"
|
#include "l_client.h"
|
||||||
#include "chatmessage.h"
|
#include "chatmessage.h"
|
||||||
|
#include "client.h"
|
||||||
#include "clientenvironment.h"
|
#include "clientenvironment.h"
|
||||||
#include "common/c_content.h"
|
#include "common/c_content.h"
|
||||||
#include "common/c_converter.h"
|
#include "common/c_converter.h"
|
||||||
|
@ -37,6 +37,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "emerge.h"
|
#include "emerge.h"
|
||||||
#include "pathfinder.h"
|
#include "pathfinder.h"
|
||||||
#include "face_position_cache.h"
|
#include "face_position_cache.h"
|
||||||
|
#ifndef SERVER
|
||||||
|
#include "client.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
struct EnumString ModApiEnvMod::es_ClearObjectsMode[] =
|
struct EnumString ModApiEnvMod::es_ClearObjectsMode[] =
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "l_localplayer.h"
|
#include "l_localplayer.h"
|
||||||
#include "l_internal.h"
|
#include "l_internal.h"
|
||||||
#include "script/common/c_converter.h"
|
#include "script/common/c_converter.h"
|
||||||
|
#include "localplayer.h"
|
||||||
|
|
||||||
LuaLocalPlayer::LuaLocalPlayer(LocalPlayer *m) : m_localplayer(m)
|
LuaLocalPlayer::LuaLocalPlayer(LocalPlayer *m) : m_localplayer(m)
|
||||||
{
|
{
|
||||||
|
@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "lua_api/l_minimap.h"
|
#include "lua_api/l_minimap.h"
|
||||||
#include "lua_api/l_internal.h"
|
#include "lua_api/l_internal.h"
|
||||||
#include "common/c_converter.h"
|
#include "common/c_converter.h"
|
||||||
|
#include "client.h"
|
||||||
#include "minimap.h"
|
#include "minimap.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "util/hex.h"
|
#include "util/hex.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "chatmessage.h"
|
#include "chatmessage.h"
|
||||||
|
#include "chat_interface.h"
|
||||||
|
|
||||||
class ClientNotFoundException : public BaseException
|
class ClientNotFoundException : public BaseException
|
||||||
{
|
{
|
||||||
|
@ -34,16 +34,17 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "util/thread.h"
|
#include "util/thread.h"
|
||||||
#include "util/basic_macros.h"
|
#include "util/basic_macros.h"
|
||||||
#include "serverenvironment.h"
|
#include "serverenvironment.h"
|
||||||
#include "chat_interface.h"
|
|
||||||
#include "clientiface.h"
|
#include "clientiface.h"
|
||||||
#include "remoteplayer.h"
|
#include "remoteplayer.h"
|
||||||
#include "network/networkpacket.h"
|
|
||||||
#include "chatmessage.h"
|
#include "chatmessage.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
class ChatEvent;
|
||||||
|
struct ChatEventChat;
|
||||||
|
struct ChatInterface;
|
||||||
class IWritableItemDefManager;
|
class IWritableItemDefManager;
|
||||||
class IWritableNodeDefManager;
|
class IWritableNodeDefManager;
|
||||||
class IWritableCraftDefManager;
|
class IWritableCraftDefManager;
|
||||||
|
@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "environment.h"
|
#include "environment.h"
|
||||||
#include "mapnode.h"
|
#include "mapnode.h"
|
||||||
#include "mapblock.h"
|
#include "mapblock.h"
|
||||||
|
#include "activeobject.h"
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
class IGameDef;
|
class IGameDef;
|
||||||
|
@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "util/numeric.h"
|
#include "util/numeric.h"
|
||||||
#include "util/string.h"
|
#include "util/string.h"
|
||||||
|
#include "chat_interface.h"
|
||||||
|
|
||||||
TerminalChatConsole g_term_console;
|
TerminalChatConsole g_term_console;
|
||||||
|
|
||||||
|
@ -22,11 +22,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
|
|
||||||
#include "chat.h"
|
#include "chat.h"
|
||||||
#include "threading/thread.h"
|
#include "threading/thread.h"
|
||||||
#include "chat_interface.h"
|
#include "util/container.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
struct ChatInterface;
|
||||||
|
|
||||||
class TermLogOutput : public ILogOutput {
|
class TermLogOutput : public ILogOutput {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "itemdef.h"
|
#include "itemdef.h"
|
||||||
#include "gamedef.h"
|
#include "gamedef.h"
|
||||||
#include "mods.h"
|
#include "mods.h"
|
||||||
|
#include "util/numeric.h"
|
||||||
|
|
||||||
content_t t_CONTENT_STONE;
|
content_t t_CONTENT_STONE;
|
||||||
content_t t_CONTENT_GRASS;
|
content_t t_CONTENT_GRASS;
|
||||||
|
@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "util/serialize.h"
|
#include "util/serialize.h"
|
||||||
#include "network/connection.h"
|
#include "network/connection.h"
|
||||||
|
#include "network/networkpacket.h"
|
||||||
|
|
||||||
class TestConnection : public TestBase {
|
class TestConnection : public TestBase {
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user