#ifndef BLANK_CLIENT_INTERACTIVESTATE_HPP_
#define BLANK_CLIENT_INTERACTIVESTATE_HPP_
+#include "../app/IntervalTimer.hpp"
#include "../app/State.hpp"
#include "../io/WorldSave.hpp"
#include "../model/Skeletons.hpp"
#include "../ui/Interface.hpp"
#include "../world/BlockTypeRegistry.hpp"
#include "../world/ChunkRenderer.hpp"
+#include "../world/EntityState.hpp"
#include "../world/World.hpp"
+#include <list>
+
namespace blank {
void Update(int dt) override;
void Render(Viewport &) override;
+ void PushPlayerUpdate(const Entity &, int dt);
+ void MergePlayerCorrection(std::uint16_t, const EntityState &);
+
private:
MasterState &master;
BlockTypeRegistry block_types;
Interface interface;
ChunkRenderer chunk_renderer;
Skeletons skeletons;
+ IntervalTimer loop_timer;
+
+ struct PlayerHistory {
+ EntityState state;
+ int delta_t;
+ std::uint16_t packet;
+ PlayerHistory(EntityState s, int dt, std::uint16_t p)
+ : state(s), delta_t(dt), packet(p) { }
+ };
+ std::list<PlayerHistory> player_hist;
};