1234567891011121314151617181920212223242526 |
- #ifndef SERVER_PLAYER_H
- #define SERVER_PLAYER_H
- #include "common/entities/Entity.h"
- #include "common/network/toserver/PlayerUpdatePacket.h"
- #include "network/Server.h"
- #include "utils/RingBuffer.h"
- class ServerPlayer : public Entity {
- Server::Client& client;
- RingBuffer<PlayerUpdatePacket, 40> history;
- public:
- ServerPlayer(Server::Client& client);
- void tick() override;
- void onChat(InPacket& in);
- void sendChunk();
- void send(OutPacket& out);
- void onUpdatePacket(const PlayerUpdatePacket& p);
- private:
- void setClientPosition();
- };
- #endif
|