From dbb998459b8481f474f791423789951f0e217565 Mon Sep 17 00:00:00 2001 From: LDA Date: Wed, 12 Jul 2023 15:33:25 -0700 Subject: [PATCH 1/2] fmtlib backport to fix warning spam under gcc 13 --- source/extern/fmt/core.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/extern/fmt/core.h b/source/extern/fmt/core.h index 46723d5..9062026 100644 --- a/source/extern/fmt/core.h +++ b/source/extern/fmt/core.h @@ -1671,8 +1671,7 @@ constexpr auto encode_types() -> unsigned long long { template FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value { - auto&& arg = arg_mapper().map(FMT_FORWARD(val)); - using arg_type = remove_cvref_t; + using arg_type = remove_cvref_t().map(val))>; constexpr bool formattable_char = !std::is_same::value; @@ -1691,7 +1690,7 @@ FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value { formattable, "Cannot format an argument. To make type T formattable provide a " "formatter specialization: https://fmt.dev/latest/api.html#udt"); - return {arg}; + return {arg_mapper().map(val)}; } template From 49afa899a8169bcde3eecffe9944d096ffcd7d2e Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Thu, 13 Jul 2023 19:20:58 +1000 Subject: [PATCH 2/2] Make server tickrate configurable --- source/server/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/server/main.cpp b/source/server/main.cpp index 8d734e0..08b55dd 100644 --- a/source/server/main.cpp +++ b/source/server/main.cpp @@ -47,6 +47,13 @@ int main(int argc, char** argv) { { Logger::info("Server Version {} ({}) Source ID: {} Protocol: {}", StarVersionString, StarArchitectureString, StarSourceIdentifierString, StarProtocolVersion); + float updateRate = 1.0f / WorldTimestep; + if (auto jUpdateRate = configuration->get("updateRate")) { + updateRate = jUpdateRate.toFloat(); + WorldTimestep = 1.0f / updateRate; + Logger::info("Configured tickrate is {:4.2f}hz", updateRate); + } + UniverseServerUPtr server = make_unique(root->toStoragePath("universe")); server->setListeningTcp(true); server->start();