Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/server/main.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-13 19:21:07 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-13 19:21:07 +1000
commit212de6b876aaeb916b1e2565740fc65031d906c4 (patch)
treec29db7db3c0a76cbc9049aad20723bb75bafc053 /source/server/main.cpp
parent28f4204b09b04280340ffbbeaccf86b96f377296 (diff)
parent49afa899a8169bcde3eecffe9944d096ffcd7d2e (diff)
Merge branch 'main' into voice
Diffstat (limited to 'source/server/main.cpp')
-rw-r--r--source/server/main.cpp7
1 files changed, 7 insertions, 0 deletions
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<UniverseServer>(root->toStoragePath("universe"));
server->setListeningTcp(true);
server->start();