From f04727a555f71d40f78697f55206d7f3e6ebed01 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Wed, 20 Dec 2017 12:08:53 +0100 Subject: Limit time deltas to prevent tunneling after hitches. --- src/game/game.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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? -- cgit