From e4483eca01b48b943cd0461e24a74ae1a3139ed4 Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Wed, 12 Feb 2025 21:57:46 +1100 Subject: Update to most recent version (old initial commit) --- src/client/state/state.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/client/state/state.cc (limited to 'src/client/state/state.cc') diff --git a/src/client/state/state.cc b/src/client/state/state.cc new file mode 100644 index 0000000..2423c9a --- /dev/null +++ b/src/client/state/state.cc @@ -0,0 +1,15 @@ +#include "client/state/state.hh" + +namespace client { +namespace state { + +shared::time_duration_t get_time_per_tick() noexcept { + return std::chrono::microseconds(1'000'000) / tickrate; +} + +bool has_initialised() noexcept { + return state::localplayer_index.has_value(); +} + +} // namespace state +} // namespace client -- cgit v1.2.3