projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
10fec34
)
If Tux can't grow the egg turns around instead of pushing Tux.
author
Wolfgang Becker
<uafr@gmx.de>
Fri, 14 Mar 2008 17:05:01 +0000
(17:05 +0000)
committer
Wolfgang Becker
<uafr@gmx.de>
Fri, 14 Mar 2008 17:05:01 +0000
(17:05 +0000)
SVN-Revision: 5371
src/object/growup.cpp
patch
|
blob
|
history
diff --git
a/src/object/growup.cpp
b/src/object/growup.cpp
index
db86615
..
c85535f
100644
(file)
--- a/
src/object/growup.cpp
+++ b/
src/object/growup.cpp
@@
-53,12
+53,15
@@
GrowUp::collision_solid(const CollisionHit& hit)
}
HitResponse
}
HitResponse
-GrowUp::collision(GameObject& other, const CollisionHit& )
+GrowUp::collision(GameObject& other, const CollisionHit&
hit
)
{
Player* player = dynamic_cast<Player*>(&other);
if(player != 0) {
{
Player* player = dynamic_cast<Player*>(&other);
if(player != 0) {
- if(!player->add_bonus(GROWUP_BONUS, true))
- return FORCE_MOVE;
+ if(!player->add_bonus(GROWUP_BONUS, true)){
+ // Tux can't grow right now.
+ collision_solid( hit );
+ return ABORT_MOVE;
+ }
sound_manager->play("sounds/grow.wav");
remove_me();
sound_manager->play("sounds/grow.wav");
remove_me();