mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 18:55:36 +00:00
fix bug in defense frames...
...where default frame iterfered with 'if' block for hits matching
This commit is contained in:
parent
a0a686db59
commit
4f9e54259a
@ -2720,7 +2720,7 @@ const unit_animation* unit::choose_animation(const display& disp, const map_loca
|
||||
options.push_back(&*i);
|
||||
} else if(matching > max_val) {
|
||||
max_val = matching;
|
||||
options.erase(options.begin(),options.end());
|
||||
options.clear();
|
||||
options.push_back(&*i);
|
||||
}
|
||||
}
|
||||
|
@ -599,8 +599,10 @@ void unit_animation::add_anims( std::vector<unit_animation> & animations, const
|
||||
{
|
||||
anim["hits"] = false;
|
||||
animations.push_back(unit_animation(anim));
|
||||
animations.back().base_score_--; //so default doesn't interefere with 'if' block
|
||||
anim["hits"] = true;
|
||||
animations.push_back(unit_animation(anim));
|
||||
animations.back().base_score_--;
|
||||
animations.back().add_frame(225,frame_builder()
|
||||
.image(animations.back().get_last_frame().end_parameters().image.get_filename())
|
||||
.duration(225)
|
||||
|
Loading…
x
Reference in New Issue
Block a user