projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now the player dies when reaching the bottom of the level, even in Y-scrolling levels.
[supertux.git]
/
src
/
player.cpp
diff --git
a/src/player.cpp
b/src/player.cpp
index
9d06c18
..
e0fd003
100644
(file)
--- a/
src/player.cpp
+++ b/
src/player.cpp
@@
-796,7
+796,8
@@
Player::is_dying()
bool Player::is_dead()
{
bool Player::is_dead()
{
- if(base.y > World::current()->get_level()->height * /*TILE_HEIGHT*/ 32 || base.x < scroll_x - AUTOSCROLL_DEAD_INTERVAL) // last condition can happen in auto-scrolling
+ if(base.y > screen->h + scroll_y ||
+ base.x < scroll_x - AUTOSCROLL_DEAD_INTERVAL) // can happen in auto-scrolling
return true;
else
return false;
return true;
else
return false;