diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-17 19:18:23 +0000 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-17 19:18:23 +0000 |
commit | 41bebb262aa8f346ce6cdaefd854c9077ae84f97 (patch) | |
tree | 6270136442f06a406f3b101e18f12c84c63a523e /src/game/game.cpp | |
parent | c8e7fcc5f2cac58785baf2556cffc5727a48e957 (diff) |
Implement pausing.
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index fb130d9..e5f32f5 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -131,8 +131,11 @@ void state_t::tick(double now_, double dt_) uint32_t i; } u; - now = now_; + if (paused) + return; + dt = dt_; + now += dt; // FIXME: Is this non-deterministic enough? u.d = now; |