From 4f9bd9bfa048e00ca4a2a130e67434ea0f82bb2d Mon Sep 17 00:00:00 2001 From: alistair Date: Wed, 22 Jul 2020 19:38:11 +1000 Subject: [PATCH] end of level bug fix --- src/game.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 7fa327f..1525406 100644 --- a/src/game.c +++ b/src/game.c @@ -24,6 +24,7 @@ void add_to_world(world_thing thing); void step(int interval); void set_motor_timeout(Body *thing, int motorID, uint32_t timeout); void set_motor_status(Body *thing, int motorID, bool run); +void stop_pull_rope(void); player_st player; @@ -541,6 +542,8 @@ void next_level() { v.y = 0; player.physics->vel = v; player.physics->acc = v; + stop_pull_rope(); + player.physics->strings[0].attached = false; int d = -1; for (int i = 0; i < world.items.size; i++) { @@ -1405,7 +1408,7 @@ void startgame(SDL_Renderer * ren) { debug_ren = ren; - level = 4; + level = 0; world = create_world();