From 30d943fe2f18df9677225ab7a92ddc6b2a42062b Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Mon, 28 Jul 2008 14:22:44 +0000 Subject: Moved validation step from revision 33363, so that it is executed for all animations. svn-id: r33376 --- engines/parallaction/exec_ns.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'engines/parallaction/exec_ns.cpp') diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 11ee829662..fbfb462f9a 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -334,6 +334,12 @@ void Parallaction_ns::drawAnimations() { AnimationPtr anim = *it; GfxObj *obj = anim->gfxobj; + // Validation is performed here, so that every animation is affected, instead that only the ones + // who *own* a script. In fact, some scripts can change values in other animations. + // The right way to do this would be to enforce validation when any variable is modified from + // a script. + anim->validateScriptVars(); + if ((anim->_flags & kFlagsActive) && ((anim->_flags & kFlagsRemove) == 0)) { if (anim->_flags & kFlagsNoMasked) @@ -415,8 +421,6 @@ void ProgramExec::runScripts(ProgramList::iterator first, ProgramList::iterator label1: if (a->_flags & kFlagsCharacter) a->_z = a->_top + a->height(); - - a->validateScriptVars(); } _modCounter++; -- cgit v1.2.3