1234567891011121314151617181920212223 |
- #ifndef SERVER_PLAYER_H
- #define SERVER_PLAYER_H
- #include "common/entities/Entity.h"
- #include "common/network/toserver/ControllerPacket.h"
- #include "network/Server.h"
- #include "utils/RingBuffer.h"
- class ServerPlayer : public Entity {
- Server::Client& client;
- RingBuffer<ControllerPacket, 30> history;
- public:
- ServerPlayer(Server::Client& client);
- void tick() override;
- void onChat(InPacket& in);
- void sendChunk();
- void send(OutPacket& out);
- void onControllerPacket(const ControllerPacket& cp);
- };
- #endif
|