{
if(!visible)
return;
-
+
TuxBodyParts* tux_body;
if (player_status->bonus == GROWUP_BONUS)
else // dir == RIGHT
tux_body->set_action("buttjump-right");
}
- else if (physic.get_velocity_y() != 0 && !on_ground())
+ else if (!on_ground())
{
if(dir == LEFT)
tux_body->set_action("jump-left");
if(dying) {
smalltux_gameover->draw(context, get_pos(), layer);
} else if(growing_timer.get_timeleft() > 0) {
- 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);
+ 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);
}
}
else if (safe_timer.started() && size_t(game_time*40)%2)
}
if(other.get_flags() & FLAG_SOLID) {
+ /*
+ printf("Col %p: HN: %3.1f %3.1f D %.1f P: %3.1f %3.1f M: %3.1f %3.1f\n",
+ &other,
+ hit.normal.x, hit.normal.y, hit.depth,
+ get_pos().x, get_pos().y,
+ movement.x, movement.y);
+ */
+
if(hit.normal.y < 0) { // landed on floor?
if(physic.get_velocity_y() < 0)
physic.set_velocity_y(0);
}
else
{
- growing_timer.start(GROWING_TIME);
- safe_timer.start(TUX_SAFE_TIME + GROWING_TIME);
+ //growing_timer.start(GROWING_TIME);
+ safe_timer.start(TUX_SAFE_TIME /* + GROWING_TIME */);
adjust_height = 31.8;
duck = false;
player_status->bonus = NO_BONUS;