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

summaryrefslogtreecommitdiff
path: root/source/client/StarClientApplication.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-08-15 13:38:40 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-08-15 13:38:40 +1000
commitaf74a2f4918e39cd3a157350b9c8e00397c94ff8 (patch)
treedd78affb139f6d154bb874ed0c274a0a43d0d8ab /source/client/StarClientApplication.cpp
parent3bc2034c15ee23f78eb20a7b7a839b3300290186 (diff)
Rename global WorldTimestep var to more appropriate name
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r--source/client/StarClientApplication.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp
index 9213d0e..995325e 100644
--- a/source/client/StarClientApplication.cpp
+++ b/source/client/StarClientApplication.cpp
@@ -185,14 +185,14 @@ void ClientApplication::applicationInit(ApplicationControllerPtr appController)
bool borderless = configuration->get("borderless").toBool();
bool maximized = configuration->get("maximized").toBool();
- float updateRate = 1.0f / WorldTimestep;
+ float updateRate = 1.0f / GlobalTimestep;
if (auto jUpdateRate = configuration->get("updateRate")) {
updateRate = jUpdateRate.toFloat();
- WorldTimestep = 1.0f / updateRate;
+ GlobalTimestep = 1.0f / updateRate;
}
if (auto jServerUpdateRate = configuration->get("serverUpdateRate"))
- ServerWorldTimestep = 1.0f / jServerUpdateRate.toFloat();
+ ServerGlobalTimestep = 1.0f / jServerUpdateRate.toFloat();
appController->setTargetUpdateRate(updateRate);
appController->setApplicationTitle(assets->json("/client.config:windowTitle").toString());
@@ -346,7 +346,7 @@ void ClientApplication::processInput(InputEvent const& event) {
}
void ClientApplication::update() {
- float dt = WorldTimestep * GlobalTimescale;
+ float dt = GlobalTimestep * GlobalTimescale;
if (m_state >= MainAppState::Title) {
if (auto p2pNetworkingService = appController()->p2pNetworkingService()) {
if (auto join = p2pNetworkingService->pullPendingJoin()) {