}
Sprite* sprite = (dir == LEFT) ? sprite_left : sprite_right;
- if(dying == DYING_FALLING)
+ if(dying == DYING_FALLING && physic.get_velocity_y() < 0)
sprite->draw(viewport.world2screen(Vector(base.x, base.y)), SD_VERTICAL_FLIP);
else
sprite->draw(viewport.world2screen(Vector(base.x, base.y)));
if(kind == BAD_MRBOMB) {
// mrbomb transforms into a bomb now
- explode();
+ explode(false);
make_player_jump(player);
World::current()->add_score(Vector(base.x, base.y),
}
void
-BadGuy::explode()
+BadGuy::explode(bool right_way)
{
- World::current()->add_bad_guy(base.x, base.y, BAD_BOMB);
+ BadGuy *badguy = World::current()->add_bad_guy(base.x, base.y, BAD_BOMB);
+ if(right_way)
+ {
+ badguy->timer.start(0);
+ badguy->mode = BOMB_TICKING;
+ }
+
remove_me();
}
if (pbad_c->kind == BAD_MRBOMB)
{
// mrbomb transforms into a bomb now
- pbad_c->explode();
+ pbad_c->explode(true);
return;
}
else if (pbad_c->kind != BAD_MRBOMB)
if (pbad_c->kind == BAD_MRBOMB)
{
// mrbomb transforms into a bomb now
- pbad_c->explode();
+ pbad_c->explode(false);
return;
}
else