From 827a825c2dcaddc5d1b76bfe0ce2b559a27deb16 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 4 Feb 2018 08:20:49 +0000 Subject: [PATCH] Jetpack / aqualung fix. --- src/structs.h | 2 +- src/world/world.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/structs.h b/src/structs.h index 38b709f..640c364 100644 --- a/src/structs.h +++ b/src/structs.h @@ -211,7 +211,7 @@ struct Bob { int outTimer; int stunTimer; int immuneTimer; - int power, powerMax; + float power, powerMax; int jpEffectTimer; PointF checkpoints[MAX_CHECKPOINTS]; Entity *items[MAX_ITEMS]; diff --git a/src/world/world.c b/src/world/world.c index 2f1330c..d3445e1 100644 --- a/src/world/world.c +++ b/src/world/world.c @@ -176,6 +176,13 @@ static void doWorldInProgress(void) game.config.control[CONTROL_DOWN] = app.keyboard[SDL_SCANCODE_S]; game.config.control[CONTROL_JUMP] = app.keyboard[SDL_SCANCODE_I]; + if (app.keyboard[SDL_SCANCODE_SPACE]) + { + world.bob->activate(1); + + app.keyboard[SDL_SCANCODE_SPACE] = 0; + } + if (!world.showingInfoMessage) { doBob();