summaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 2a944af..4cac4eb 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -288,11 +288,12 @@ void state_t::resume(void)
paused = false;
}
-#define TIME_DELTA ((ntime_t)1000000000 / 60)
+#define TIME_DELTA ((ntime_t)1000000000 / 100)
+#define TIME_LIMIT ((ntime_t)1000000000 / 10)
void state_t::tick(ntime_t time_)
{
- size_t target, frames_this_tick = 0;
+ size_t target;
if (paused)
return;
@@ -315,13 +316,12 @@ void state_t::tick(ntime_t time_)
frames++;
frames_since_t0++;
- frames_this_tick++;
time += TIME_DELTA;
- if (frames_this_tick == 3) {
- t0 = time_;
- frames_since_t0 = 0;
- frames_behind++;
+ fc_game.tick();
+
+ if (nclock() - time_ > TIME_LIMIT) {
+ frames_behind += target - frames_since_t0;
break;
}
}