summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client.h b/src/client.h
index 80f4cee40..2ee81ea09 100644
--- a/src/client.h
+++ b/src/client.h
@@ -19,7 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#pragma once
-#include "network/connection.h"
#include "clientenvironment.h"
#include "irrlichttypes_extrabloated.h"
#include <ostream>
@@ -36,6 +35,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "mapnode.h"
#include "tileanimation.h"
#include "mesh_generator_thread.h"
+#include "network/address.h"
+#include "network/peerhandler.h"
#include <fstream>
#define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
@@ -57,6 +58,9 @@ class Minimap;
struct MinimapMapblock;
class Camera;
class NetworkPacket;
+namespace con {
+class Connection;
+}
enum LocalClientState {
LC_Created,
@@ -472,8 +476,7 @@ public:
u8 getProtoVersion()
{ return m_proto_ver; }
- bool connectedToServer()
- { return m_con.Connected(); }
+ bool connectedToServer();
float mediaReceiveProgress();
@@ -539,10 +542,7 @@ public:
void showGameFog(bool show = true);
void showGameDebug(bool show = true);
- const Address getServerAddress()
- {
- return m_con.GetPeerAddress(PEER_ID_SERVER);
- }
+ const Address getServerAddress();
const std::string &getAddressName() const
{
@@ -611,7 +611,7 @@ private:
MeshUpdateThread m_mesh_update_thread;
ClientEnvironment m_env;
ParticleManager m_particle_manager;
- con::Connection m_con;
+ std::unique_ptr<con::Connection> m_con;
std::string m_address_name;
Camera *m_camera = nullptr;
Minimap *m_minimap = nullptr;