]> git.localhorst.tv Git - blank.git/blobdiff - src/server/Server.hpp
transmit player input from client to server
[blank.git] / src / server / Server.hpp
index bf2399180111354191c2a922bfe6754c84464ac7..1a4c0b4f44b9c84de2cda7530737db6c1acdc80d 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef BLANK_SERVER_SERVER_HPP
 #define BLANK_SERVER_SERVER_HPP
 
+#include "../app/Config.hpp"
+#include "../world/WorldManipulator.hpp"
+
 #include <list>
 #include <SDL_net.h>
 
@@ -14,15 +17,11 @@ namespace server {
 
 class ClientConnection;
 
-class Server {
-
-public:
-       struct Config {
-               Uint16 port = 12354;
-       };
+class Server
+: public WorldManipulator {
 
 public:
-       Server(const Config &, World &);
+       Server(const Config::Network &, World &);
        ~Server();
 
        void Handle();
@@ -38,6 +37,8 @@ public:
        bool HasPlayerModel() const noexcept;
        const CompositeModel &GetPlayerModel() const noexcept;
 
+       void SetBlock(Chunk &, int, const Block &) override;
+
 private:
        void HandlePacket(const UDPpacket &);