projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
-optimized and cleaned up collision_object_map
[supertux.git]
/
src
/
player.cpp
diff --git
a/src/player.cpp
b/src/player.cpp
index
8d0a2ee
..
afc4eb5
100644
(file)
--- a/
src/player.cpp
+++ b/
src/player.cpp
@@
-371,7
+371,7
@@
Player::handle_horizontal_input()
void
Player::handle_vertical_input()
{
void
Player::handle_vertical_input()
{
- if(input.up == DOWN)
+ if(input.up == DOWN
&& input.old_up == UP
)
{
if (on_ground())
{
{
if (on_ground())
{
@@
-410,6
+410,7
@@
Player::handle_input()
{
handle_vertical_input();
}
{
handle_vertical_input();
}
+ input.old_up = input.up;
/* Shoot! */
/* Shoot! */
@@
-455,11
+456,25
@@
Player::handle_input()
duck = false;
base.y -= 32;
base.height = 64;
duck = false;
base.y -= 32;
base.height = 64;
- old_base = previous_base = base;
+ // changing base size confuses collision otherwise
+ old_base = previous_base = base;
}
}
void
}
}
void
+Player::grow()
+{
+ if(size == BIG)
+ return;
+
+ size = BIG;
+ base.height = 64;
+ base.y -= 32;
+
+ old_base = previous_base = base;
+}
+
+void
Player::grabdistros()
{
/* Grab distros: */
Player::grabdistros()
{
/* Grab distros: */