From: Ingo Ruhnke Date: Sun, 25 Apr 2004 22:10:32 +0000 (+0000) Subject: - bullet tweaks X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=1535e8fcef06a4d211c9c1296460a595797d8012;p=supertux.git - bullet tweaks SVN-Revision: 721 --- diff --git a/src/player.cpp b/src/player.cpp index 8e50c7e4f..77aaa1bae 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -121,6 +121,8 @@ Player::key_event(SDLKey key, int state) } else if(key == keymap.fire) { + if (state == UP) + input.old_fire = UP; input.fire = state; return true; } @@ -412,6 +414,7 @@ Player::handle_input() if (input.fire == DOWN && input.old_fire == UP && got_coffee) { World::current()->add_bullet(base.x, base.y, physic.get_velocity_x(), dir); + input.old_fire = DOWN; } /* tux animations: */ diff --git a/src/special.cpp b/src/special.cpp index aac345859..4eed30420 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -95,10 +95,10 @@ Bullet::action(double frame_ratio) { base.y = old_y; base.ym = -base.ym; - if (base.ym > 13) - base.ym = 13; - else if (base.ym < -13) - base.ym = -13; + if (base.ym > 9) + base.ym = 9; + else if (base.ym < -9) + base.ym = -9; } base.ym = base.ym + 0.5 * frame_ratio;