From 4b0bc220e4da1173f742a4973939b139bef562db Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:58:49 +1000 Subject: Support for changing the game's timescale Context-specific (like per-world) timescales can also be added later --- source/game/StarSystemWorldClient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/game/StarSystemWorldClient.cpp') diff --git a/source/game/StarSystemWorldClient.cpp b/source/game/StarSystemWorldClient.cpp index 9be0980..d4f8c15 100644 --- a/source/game/StarSystemWorldClient.cpp +++ b/source/game/StarSystemWorldClient.cpp @@ -41,11 +41,11 @@ bool SystemWorldClient::flying() const { return true; } -void SystemWorldClient::update() { +void SystemWorldClient::update(float dt) { if (!m_ship) return; - m_ship->clientUpdate(WorldTimestep); + m_ship->clientUpdate(dt); auto location = m_ship->systemLocation(); if (auto uuid = location.maybe()) { @@ -66,9 +66,9 @@ void SystemWorldClient::update() { } for (auto p : m_clientShips) - p.second->clientUpdate(WorldTimestep); + p.second->clientUpdate(dt); for (auto p : m_objects) - p.second->clientUpdate(WorldTimestep); + p.second->clientUpdate(dt); if (currentSystem().isNull()) { m_objects.clear(); -- cgit v1.2.3