{
start_position = pos;
bbox.set_pos(pos);
- bbox.set_size(32, 32);
+ bbox.set_size(31.8, 31.8);
sprite = sprite_manager->create("bomb");
state = 0;
timer.start(TICKINGTIME);
}
void
-Bomb::write(LispWriter& )
+Bomb::write(lisp::Writer& )
{
// bombs are only temporarily so don't write them out...
}
return ABORT_MOVE;
}
+HitResponse
+Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& )
+{
+ if(state == 1)
+ badguy.kill_fall();
+ return ABORT_MOVE;
+}
+
void
Bomb::active_action(float )
{
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;
Bomb::kill_fall()
{
}
+