X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fgrowup.cpp;h=3f37e0f6036c537132301e05e51226bdeefdc3e6;hb=37e3ad0ee2ec05d6bfebf611d45046b49fa33387;hp=a7f748214f118e4f2889dec613327fd9b76b0402;hpb=d46c78c842ab4090a3f46e560c891234167f124b;p=supertux.git diff --git a/src/object/growup.cpp b/src/object/growup.cpp index a7f748214..3f37e0f60 100644 --- a/src/object/growup.cpp +++ b/src/object/growup.cpp @@ -2,7 +2,6 @@ #include #include "growup.h" -#include "defines.h" #include "resources.h" #include "camera.h" #include "sector.h" @@ -35,7 +34,7 @@ HitResponse GrowUp::collision(GameObject& other, const CollisionHit& hit) { if(other.get_flags() & FLAG_SOLID) { - if(fabsf(hit.normal.y) > .5) { // roof + if(fabsf(hit.normal.y) > .5) { // roof or ground physic.set_velocity_y(0); } else { // bumped left or right physic.set_velocity_x(-physic.get_velocity_x()); @@ -46,7 +45,7 @@ GrowUp::collision(GameObject& other, const CollisionHit& hit) Player* player = dynamic_cast(&other); if(player != 0) { - player->grow(); + player->set_bonus(GROWUP_BONUS, true); SoundManager::get()->play_sound(IDToSound(SND_EXCELLENT)); remove_me();