Returned the default sound to the healed_anim, to restore healed sounds outside of healing anims
This commit is contained in:
parent
12a8a0a00f
commit
013796a8d9
1 changed files with 22 additions and 23 deletions
|
@ -569,22 +569,21 @@ void unit_animation::fill_initial_animations( std::vector<unit_animation> & anim
|
|||
|
||||
animations.push_back(*itor);
|
||||
animations.back().event_ = utils::split("healing");
|
||||
animations.back().sub_anims_["_healing_sound"] = particule();
|
||||
std::string healing_sound;
|
||||
if (cfg["healing_sound"].empty()) {
|
||||
healing_sound = "heal.wav";
|
||||
} else {
|
||||
healing_sound = cfg["healing_sound"].str();
|
||||
}
|
||||
animations.back().sub_anims_["_healing_sound"].add_frame(1,frame_builder().sound(healing_sound),true);
|
||||
if(!cfg["healing_sound"].empty()) {
|
||||
animations.back().sub_anims_["_healing_sound"] = particule();
|
||||
animations.back().sub_anims_["_healing_sound"].add_frame(1,frame_builder().sound(cfg["healing_sound"]),true);
|
||||
}
|
||||
|
||||
animations.push_back(*itor);
|
||||
animations.back().event_ = utils::split("healed");
|
||||
animations.back().unit_anim_.override(0,300,particule::NO_CYCLE,"","0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30,0.5:30,0:30",display::rgb(255,255,255));
|
||||
if(!cfg["healed_sound"].empty()) {
|
||||
animations.back().sub_anims_["_healed_sound"] = particule();
|
||||
animations.back().sub_anims_["_healed_sound"].add_frame(1,frame_builder().sound(cfg["healed_sound"]),true);
|
||||
}
|
||||
std::string healed_sound;
|
||||
if (cfg["healed_sound"].empty()) {
|
||||
healed_sound = "heal.wav";
|
||||
} else {
|
||||
healed_sound = cfg["healed_sound"].str();
|
||||
}
|
||||
animations.back().sub_anims_["_healed_sound"].add_frame(1,frame_builder().sound(healed_sound),true);
|
||||
|
||||
animations.push_back(*itor);
|
||||
animations.back().event_ = utils::split("poisoned");
|
||||
|
@ -660,13 +659,10 @@ void unit_animation::add_anims( std::vector<unit_animation> & animations, const
|
|||
anim["value"] = anim["damage"];
|
||||
animations.push_back(unit_animation(anim));
|
||||
animations.back().sub_anims_["_healing_sound"] = particule();
|
||||
std::string healing_sound;
|
||||
if (cfg["healing_sound"].empty()) {
|
||||
healing_sound = "heal.wav";
|
||||
} else {
|
||||
healing_sound = cfg["healing_sound"].str();
|
||||
}
|
||||
animations.back().sub_anims_["_healing_sound"].add_frame(1,frame_builder().sound(healing_sound),true);
|
||||
if(!cfg["healing_sound"].empty()) {
|
||||
animations.back().sub_anims_["_healing_sound"] = particule();
|
||||
animations.back().sub_anims_["_healing_sound"].add_frame(1,frame_builder().sound(cfg["healing_sound"]),true);
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const animation_branch &ab, prepare_animation(cfg, "healed_anim"))
|
||||
|
@ -676,10 +672,13 @@ void unit_animation::add_anims( std::vector<unit_animation> & animations, const
|
|||
if (anim["layer"].empty()) anim["layer"] = default_layer;
|
||||
anim["value"] = anim["healing"];
|
||||
animations.push_back(unit_animation(anim));
|
||||
if(!cfg["healed_sound"].empty()) {
|
||||
animations.back().sub_anims_["_healed_sound"] = particule();
|
||||
animations.back().sub_anims_["_healed_sound"].add_frame(1,frame_builder().sound(cfg["healed_sound"]),true);
|
||||
}
|
||||
std::string healed_sound;
|
||||
if (cfg["healed_sound"].empty()) {
|
||||
healed_sound = "heal.wav";
|
||||
} else {
|
||||
healed_sound = cfg["healed_sound"].str();
|
||||
}
|
||||
animations.back().sub_anims_["_healed_sound"].add_frame(1,frame_builder().sound(healed_sound),true);
|
||||
}
|
||||
|
||||
BOOST_FOREACH(const animation_branch &ab, prepare_animation(cfg, "poison_anim"))
|
||||
|
|
Loading…
Add table
Reference in a new issue