projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c7b599
)
- bullet tweaks
author
Ingo Ruhnke
<grumbel@gmx.de>
Sun, 25 Apr 2004 22:10:32 +0000
(22:10 +0000)
committer
Ingo Ruhnke
<grumbel@gmx.de>
Sun, 25 Apr 2004 22:10:32 +0000
(22:10 +0000)
SVN-Revision: 721
src/player.cpp
patch
|
blob
|
history
src/special.cpp
patch
|
blob
|
history
diff --git
a/src/player.cpp
b/src/player.cpp
index
8e50c7e
..
77aaa1b
100644
(file)
--- 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
aac3458
..
4eed304
100644
(file)
--- 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;