X-Git-Url: https://git.artsoft.org/rocksndiamonds.git/?a=blobdiff_plain;f=src%2Fanim.c;h=0cb2023d85b6b21f1eb0f14bcf551f352942ace2;hb=895d5cb33db251c933445778400bb3e50b76d4ab;hp=a23d6e581de1c2f23c1b780d91e1f771c92f1247;hpb=d1a0dcb34b3d1c33e8cc283fe4dee238c94b84f8;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index a23d6e58..0cb2023d 100644 --- a/src/anim.c +++ b/src/anim.c @@ -535,6 +535,10 @@ static void InitGlobalAnimControls(void) anim->state = ANIM_STATE_INACTIVE; + // if draw order is undefined, set to default value "0" + if (anim->control_info.draw_order == ARG_UNDEFINED_VALUE) + anim->control_info.draw_order = 0; + part_nr = 0; for (p = 0; p < NUM_GLOBAL_ANIM_PARTS_ALL; p++) @@ -606,6 +610,10 @@ static void InitGlobalAnimControls(void) if (part->control_info.class == get_hash_from_key("pointer") && part->control_info.style == STYLE_DEFAULT) part->control_info.style |= STYLE_PASSTHROUGH; + + // if draw order is undefined, inherit it from main animation + if (part->control_info.draw_order == ARG_UNDEFINED_VALUE) + part->control_info.draw_order = anim->control_info.draw_order; } if (anim->num_parts > 0 || anim->has_base)