diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-21 00:58:49 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-21 00:58:49 +1000 |
commit | 4b0bc220e4da1173f742a4973939b139bef562db (patch) | |
tree | 0ff66d5957575fa814fc10b8cd93e3dd378f45dc /source/game/StarSystemWorldClient.cpp | |
parent | 607be749451aa40e3619e7ceab0927d1fcec8233 (diff) |
Support for changing the game's timescale
Context-specific (like per-world) timescales can also be added later
Diffstat (limited to 'source/game/StarSystemWorldClient.cpp')
-rw-r--r-- | source/game/StarSystemWorldClient.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<Uuid>()) { @@ -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(); |