1 #include "ServerState.hpp"
3 #include "Environment.hpp"
4 #include "TextureIndex.hpp"
5 #include "../net/io.hpp"
12 ServerState::ServerState(
13 HeadlessEnvironment &env,
14 const World::Config &wc,
16 const Server::Config &sc
20 , world(block_types, wc, ws)
22 TextureIndex tex_index;
23 env.loader.LoadBlockTypes("default", block_types, tex_index);
25 std::cout << "listening on UDP port " << sc.port << std::endl;
29 void ServerState::Handle(const SDL_Event &event) {
30 if (event.type == SDL_QUIT) {
36 void ServerState::Update(int dt) {
42 void ServerState::Render(Viewport &viewport) {