is_exploding(false),
time_until_explosion(0.0f),
is_stunned(false),
- time_stunned(0.0f)
+ time_stunned(0.0f),
+ ticking(),
+ grunting()
{
walk_speed = 80;
max_drop_height = 16;
return true;
}
+ if(WalkingBadguy::is_frozen()) {
+ WalkingBadguy::unfreeze();
+ }
+
if (!is_exploding) {
set_action ((dir == LEFT) ? "ticking-left" : "ticking-right", /* loops = */ -1);
walk_left_action = "ticking-left";
time_until_explosion = TIME_EXPLOSION;
is_exploding = true;
- ticking.reset(sound_manager->create_sound_source("sounds/fizz.wav"));
+ ticking = sound_manager->create_sound_source("sounds/fizz.wav");
ticking->set_position(get_pos());
ticking->set_looping(true);
ticking->set_reference_distance(32);
ticking->play();
- grunting.reset(sound_manager->create_sound_source("sounds/grunts.ogg"));
+ grunting = sound_manager->create_sound_source("sounds/grunts.ogg");
grunting->set_position(get_pos());
grunting->set_looping(true);
grunting->set_reference_distance(32);
- grunting->play();
+ grunting->play();
}
time_stunned = TIME_STUNNED;
run_dead_script();
}
-void
-Haywire::freeze()
-{
- WalkingBadguy::freeze();
- sprite->set_action(dir == LEFT ? "iced-left" : "iced-right");
-}
-
bool
Haywire::is_freezable() const
{