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/windowing/StarFuelWidget.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/windowing/StarFuelWidget.cpp') diff --git a/source/windowing/StarFuelWidget.cpp b/source/windowing/StarFuelWidget.cpp index af51cb2..d7028f8 100644 --- a/source/windowing/StarFuelWidget.cpp +++ b/source/windowing/StarFuelWidget.cpp @@ -21,9 +21,8 @@ FuelWidget::FuelWidget() { disableScissoring(); } -void FuelWidget::update() { - m_pingTimeout -= WorldTimestep; - if (m_pingTimeout < 0) +void FuelWidget::update(float dt) { + if ((m_pingTimeout -= dt) < 0) m_pingTimeout = 0; } -- cgit v1.2.3