#ifndef CLIENT_STATE_STATE_HH_ #define CLIENT_STATE_STATE_HH_ #include #include "shared/entity/entity.hh" #include "shared/net/connection.hh" #include "shared/shared.hh" namespace client { namespace state { inline std::string_view address; inline std::string_view port; inline std::uint64_t seed; inline std::size_t player_count; inline std::size_t requested_chunk_count; inline std::size_t networked_chunk_count; inline std::int32_t draw_distance; inline std::int32_t chunks_per_frame; inline std::uint32_t tickrate; inline shared::tick_t tick; inline float delta_ticks; // num ticks since the last tick, [0, inf) shared::time_duration_t get_time_per_tick() noexcept; // Speed of the client's move ticks should be 1.0f but if we're too slow (or the // server lags and we're too fast) this value should move to speed up the client // somewhat gracefully. inline float time_factor = 1.0f; inline shared::net::connection* connection = nullptr; // non-opt after init inline std::optional localplayer_index; bool has_initialised() noexcept; } // namespace state } // namespace client #endif