X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Foneup.cpp;h=a0dc071043fee2cd14b1ed530466140b07035a16;hb=ae7bd4f460fdd93934fc0abc9589758a49309bda;hp=bdbaa5e9a79f2dd47b759e97893de6ac89c9fb16;hpb=3655d32f63f75b2af054ec68d4176e55a561ba96;p=supertux.git diff --git a/src/object/oneup.cpp b/src/object/oneup.cpp index bdbaa5e9a..a0dc07104 100644 --- a/src/object/oneup.cpp +++ b/src/object/oneup.cpp @@ -24,10 +24,12 @@ #include "player.hpp" #include "player_status.hpp" #include "sector.hpp" +#include "level.hpp" +#include "statistics.hpp" #include "video/drawing_context.hpp" OneUp::OneUp(const Vector& pos, Direction direction) - : MovingSprite(pos, "images/powerups/1up/1up.sprite", LAYER_FLOATINGOBJECTS, COLGROUP_TOUCHABLE) + : MovingSprite(pos, "images/powerups/1up/1up.sprite", LAYER_FLOATINGOBJECTS, COLGROUP_TOUCHABLE) { physic.set_velocity((direction == LEFT)?-100:100, -400); } @@ -47,6 +49,10 @@ OneUp::collision(GameObject& other, const CollisionHit& ) Player* player = dynamic_cast (&other); if(player) { player->get_status()->add_coins(100); +#if 0 + // FIXME: do we want this? q.v. src/level.cpp + Sector::current()->get_level()->stats.coins += 100; +#endif remove_me(); return ABORT_MOVE; }