summaryrefslogtreecommitdiff
path: root/platformer/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'platformer/src/main.c')
-rw-r--r--platformer/src/main.c4
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();