diff options
Diffstat (limited to '')
| -rw-r--r-- | platformer/src/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/platformer/src/main.c b/platformer/src/main.c index ce02b85..23f06d2 100644 --- a/platformer/src/main.c +++ b/platformer/src/main.c @@ -30,6 +30,8 @@ * window_poll_events(); * * while accumulator >= TICK_DT: // 0, 1 or several ticks + * world_update(TICK_DT); // moving platforms first, + * // so the player rides them * controls_poll(&input); * if input.quit_pressed: window_request_close(); * if input.reset_pressed: @@ -156,6 +158,8 @@ int main(void) window_poll_events(); while (accumulator >= TICK_DT) { + /* Moving platforms move first, so the player rides where they are now. */ + world_update(TICK_DT); controls_poll(&input); if (input.quit_pressed) window_request_close(); |
