HitResponse
Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& )
{
- badguy.kill_fall();
+ if(state == 1)
+ badguy.kill_fall();
return ABORT_MOVE;
}
if(timer.check()) {
state = 1;
sprite->set_action("explosion");
+ SoundManager::get()->play_sound(IDToSound(SND_EXPLODE), get_pos(),
+ Sector::current()->player->get_pos());
timer.start(EXPLOSIONTIME);
}
break;
using namespace SuperTux;
+class CollisionGridIterator;
+
/**
* A rectangular grid to keep track of all moving game objects. It allows fast
* queries for all objects in a rectangular area.
//frame_rate.update();
/* Handle time: */
- if (time_left.check() && currentsector->player->dying == DYING_NOT
- && !end_sequence)
+ if (time_left.check() && !end_sequence)
currentsector->player->kill(Player::KILL);
/* Handle music: */
- if(currentsector->player->invincible_timer.started() && !end_sequence)
+ if (currentsector->player->invincible_timer.started() && !end_sequence)
{
currentsector->play_music(HERRING_MUSIC);
}
LEFT_ALLIGN, LAYER_FOREGROUND1);
}
- if(time_left.check()) {
+ if(time_left.get_timeleft() < 0) {
context.draw_text(white_text, _("TIME's UP"), Vector(screen->w/2, 0),
CENTER_ALLIGN, LAYER_FOREGROUND1);
} else if (time_left.get_timeleft() > TIME_WARNING
do_backscrolling = true;
reader.get("backscrolling", do_backscrolling);
} else if(modename == "autoscroll") {
+ printf("autoscroll.\n");
mode = AUTOSCROLL;
const lisp::Lisp* path_lisp = reader.get_lisp("path");