diff --git a/src/drawtypes/animation.cpp b/src/drawtypes/animation.cpp index 8580b17b..66900bc4 100644 --- a/src/drawtypes/animation.cpp +++ b/src/drawtypes/animation.cpp @@ -44,14 +44,17 @@ namespace drawtypes { name = string_util::ltrim(string_util::rtrim(name, '>'), '<'); + auto anim_defaults = load_optional_icon(conf, section, name); + if (required) frames = conf.get_list(section, name); else frames = conf.get_list(section, name, {}); - for (size_t i = 0; i < frames.size(); i++) - vec.emplace_back( - forward(load_optional_icon(conf, section, name + "-" + to_string(i), frames[i]))); + for (size_t i = 0; i < frames.size(); i++) { + vec.emplace_back(forward(load_optional_icon(conf, section, name + "-" + to_string(i), frames[i]))); + vec.back()->copy_undefined(anim_defaults); + } auto framerate = conf.get(section, name + "-framerate", 1000);