]> git.localhorst.tv Git - blank.git/blobdiff - src/server/Server.hpp
split input handling
[blank.git] / src / server / Server.hpp
index 8bbb778a91b358a51cbb3d836cf64423fd4952a5..cf4fc0433e889f5966bee3806eee1427d57c521c 100644 (file)
@@ -1,12 +1,15 @@
 #ifndef BLANK_SERVER_SERVER_HPP
 #define BLANK_SERVER_SERVER_HPP
 
+#include "../app/Config.hpp"
+
 #include <list>
 #include <SDL_net.h>
 
 
 namespace blank {
 
+class CompositeModel;
 class World;
 
 namespace server {
@@ -16,12 +19,7 @@ class ClientConnection;
 class Server {
 
 public:
-       struct Config {
-               Uint16 port = 12354;
-       };
-
-public:
-       Server(const Config &, World &);
+       Server(const Config::Network &, World &);
        ~Server();
 
        void Handle();
@@ -33,6 +31,10 @@ public:
 
        World &GetWorld() noexcept { return world; }
 
+       void SetPlayerModel(const CompositeModel &) noexcept;
+       bool HasPlayerModel() const noexcept;
+       const CompositeModel &GetPlayerModel() const noexcept;
+
 private:
        void HandlePacket(const UDPpacket &);
 
@@ -44,6 +46,7 @@ private:
        std::list<ClientConnection> clients;
 
        World &world;
+       const CompositeModel *player_model;
 
 };