X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fanim.c;h=eefb5a1dba076afd59842c4f05459dec1ab1e465;hp=71f9958857020ce938ee3edc49277b18333fa9a0;hb=cc3e2f7d6ba6593e7c6aad77d63b14886096d066;hpb=c271d9388070fd4ae23f7b75abab9045bd81bb73 diff --git a/src/anim.c b/src/anim.c index 71f99588..eefb5a1d 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1197,6 +1197,8 @@ static int HandleGlobalAnim_Part(struct GlobalAnimPartControlInfo *part, part->anim_delay_counter = (c->anim_delay_fixed + GetSimpleRandom(c->anim_delay_random)); + part->post_delay_counter = 0; + part->init_event_state = (c->init_event != ANIM_EVENT_UNDEFINED); part->anim_event_state = (c->anim_event != ANIM_EVENT_UNDEFINED); @@ -1638,15 +1640,13 @@ static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part) if (anim_event_action == -1) return FALSE; - boolean action_executed = (DoGadgetAction(anim_event_action) || - DoScreenAction(anim_event_action) || - DoKeysymAction(anim_event_action)); + PushUserEvent(USEREVENT_ANIM_EVENT_ACTION, anim_event_action, 0); // check if further actions are allowed to be executed if (part->control_info.style & STYLE_MULTIPLE_ACTIONS) return FALSE; - return action_executed; + return TRUE; } static void InitGlobalAnim_Clickable(void)