// // Created by Иван Ильин on 25.05.2021. // #ifndef SHOOTER_SERVER_H #define SHOOTER_SERVER_H #include "engine/network/ServerUDP.h" #include "Player.h" struct BonusInfo final { const Vec3D position{}; const double lastTake = std::numeric_limits::min(); const bool onTheMap = false; }; class Server final : public ServerUDP { private: std::map> _players{}; std::map> _bonuses{}; public: Server() = default; void broadcast() override; void processConnect(sf::Uint16 senderId) override; void processClientUpdate(sf::Uint16 senderId, sf::Packet& packet) override; void processDisconnect(sf::Uint16 senderId) override; void processCustomPacket(sf::Packet& packet, sf::Uint16 senderId) override; void processStop() override; void generateBonuses(); void updateInfo() override; ~Server() override; }; #endif //MINECRAFT_3DZAVR_SERVER_H