diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-12-20 12:08:53 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-12-20 12:08:53 +0100 |
commit | f04727a555f71d40f78697f55206d7f3e6ebed01 (patch) | |
tree | 319823be1430ea9bf420685a610703abcdc87a78 | |
parent | 3d06561d3fc5938cab28eaa69b50aaa774193b93 (diff) |
Limit time deltas to prevent tunneling after hitches.
-rw-r--r-- | src/game/game.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index a6eda99..ddf9a75 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -178,7 +178,11 @@ void state_t::tick(double now_, double dt_) if (paused) return; - dt = dt_; + if (dt > 0.05) + dt = 0.05; + else + dt = dt_; + now += dt; // FIXME: Is this non-deterministic enough? |