X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fserver%2FServer.hpp;h=cf4fc0433e889f5966bee3806eee1427d57c521c;hb=b066e776622f96e906600a0c4a08de392bd03676;hp=8bbb778a91b358a51cbb3d836cf64423fd4952a5;hpb=8ae45b6555d55f301f83daf8c1337d332d8305ab;p=blank.git diff --git a/src/server/Server.hpp b/src/server/Server.hpp index 8bbb778..cf4fc04 100644 --- a/src/server/Server.hpp +++ b/src/server/Server.hpp @@ -1,12 +1,15 @@ #ifndef BLANK_SERVER_SERVER_HPP #define BLANK_SERVER_SERVER_HPP +#include "../app/Config.hpp" + #include #include 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 clients; World &world; + const CompositeModel *player_model; };