projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with not recognizing ".init_event_action" for global animations
[rocksndiamonds.git]
/
src
/
anim.c
diff --git
a/src/anim.c
b/src/anim.c
index 71f9958857020ce938ee3edc49277b18333fa9a0..a531ceb84548eeec6059fa5ecea9d00100f01318 100644
(file)
--- 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->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);
part->init_event_state = (c->init_event != ANIM_EVENT_UNDEFINED);
part->anim_event_state = (c->anim_event != ANIM_EVENT_UNDEFINED);
@@
-1633,20
+1635,20
@@
static void DoAnimationExt(void)
static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part)
{
static boolean DoGlobalAnim_EventAction(struct GlobalAnimPartControlInfo *part)
{
- int anim_event_action = part->control_info.anim_event_action;
+ int anim_event_action = (part->init_event_state ?
+ part->control_info.init_event_action :
+ part->control_info.anim_event_action);
if (anim_event_action == -1)
return FALSE;
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;
// 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)
}
static void InitGlobalAnim_Clickable(void)