#include <deque>
#include <list>
#include <SDL_net.h>
+#include <vector>
namespace blank {
+
+class CompositeModel;
+
namespace server {
class Server;
ChunkIndex &PlayerChunks() noexcept { return *player.chunks; }
const ChunkIndex &PlayerChunks() const noexcept { return *player.chunks; }
+ void SetPlayerModel(const CompositeModel &) noexcept;
+ bool HasPlayerModel() const noexcept;
+ const CompositeModel &GetPlayerModel() const noexcept;
+
private:
struct SpawnStatus {
// the entity in question
void SendSpawn(SpawnStatus &);
void SendDespawn(SpawnStatus &);
- void SendUpdate(SpawnStatus &);
+ void QueueUpdate(SpawnStatus &);
+ void SendUpdates();
void CheckPlayerFix();
Server &server;
Connection conn;
Player player;
+ const CompositeModel *player_model;
std::list<SpawnStatus> spawns;
unsigned int confirm_wait;
+ std::vector<SpawnStatus *> entity_updates;
+
EntityState player_update_state;
std::uint16_t player_update_pack;
IntervalTimer player_update_timer;