From 1e7b94ad52e7a8117dae067c6686070d965bf323 Mon Sep 17 00:00:00 2001 From: Christoph Sommer Date: Fri, 7 Apr 2006 11:37:26 +0000 Subject: [PATCH] Forgot a file SVN-Revision: 3257 --- src/object/player.cpp | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/object/player.cpp b/src/object/player.cpp index 0bc2e854b..e2df3682d 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -660,12 +660,28 @@ Player::draw(DrawingContext& context) if(dying) { smalltux_gameover->draw(context, get_pos(), layer); } else if(growing_timer.get_timeleft() > 0) { - if (dir == RIGHT) { - context.draw_surface(growingtux_right[int((growing_timer.get_timegone() * - GROWING_FRAMES) / GROWING_TIME)], get_pos() - Vector(0, 32), layer); - } else { - context.draw_surface(growingtux_left[int((growing_timer.get_timegone() * - GROWING_FRAMES) / GROWING_TIME)], get_pos() - Vector(0, 32), layer); + if(!is_big()) + { + if (dir == RIGHT) + context.draw_surface(growingtux_right[GROWING_FRAMES-1 - + int((growing_timer.get_timegone() * + GROWING_FRAMES) / GROWING_TIME)], get_pos(), layer); + else + context.draw_surface(growingtux_left[GROWING_FRAMES-1 - + int((growing_timer.get_timegone() * + GROWING_FRAMES) / GROWING_TIME)], get_pos(), layer); + } + else + { + if (dir == RIGHT) + context.draw_surface(growingtux_right[ + int((growing_timer.get_timegone() * + GROWING_FRAMES) / GROWING_TIME)], get_pos(), layer); + else + context.draw_surface(growingtux_left[ + int((growing_timer.get_timegone() * + GROWING_FRAMES) / GROWING_TIME)], + get_pos(), layer); } } else if (safe_timer.started() && size_t(game_time*40)%2) @@ -844,7 +860,7 @@ Player::kill(HurtMode mode) physic.enable_gravity(true); physic.set_acceleration(0, 0); physic.set_velocity(0, 700); - player_status->lives -= 1; + player_status->coins -= 25; player_status->bonus = NO_BONUS; dying = true; dying_timer.start(3.0); -- 2.11.0