Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://code.google.com/p/supertux
  • Loading branch information
Grumbel committed Aug 3, 2014
2 parents 45c2bac + 5c8bc80 commit 76c0dd8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/object/growup.cpp
Expand Up @@ -48,9 +48,12 @@ GrowUp::update(float elapsed_time)
}

void
GrowUp::draw(DrawingContext& context){
//Set Sprite rotation angle
sprite->set_angle(get_pos().x * 360.0f / (32.0f * M_PI));
GrowUp::draw(DrawingContext& context)
{
if(physic.get_velocity_x() != 0) {
//Set Sprite rotation angle
sprite->set_angle(get_pos().x * 360.0f / (32.0f * M_PI));
}
//Draw the Sprite.
MovingSprite::draw(context);
//Draw shade
Expand Down Expand Up @@ -88,7 +91,7 @@ GrowUp::collision(GameObject& other, const CollisionHit& hit )
{
Player* player = dynamic_cast<Player*>(&other);
if(player != 0) {
if(!player->add_bonus(GROWUP_BONUS, true)){
if(!player->add_bonus(GROWUP_BONUS, true)) {
// Tux can't grow right now.
collision_solid( hit );
return ABORT_MOVE;
Expand Down

0 comments on commit 76c0dd8

Please sign in to comment.