@@ -286,7 +286,12 @@ void Animatable3DObjClass::Render(RenderInfoClass & rinfo)
286286 return ;
287287 }
288288
289- if (!Is_Hierarchy_Valid () || Are_Sub_Object_Transforms_Dirty ()) {
289+ //
290+ // Force the hierarchy to be recalculated for single animations.
291+ //
292+ const bool isSingleAnim = CurMotionMode == SINGLE_ANIM && ModeAnim.AnimMode != ANIM_MODE_MANUAL;
293+
294+ if (isSingleAnim || !Is_Hierarchy_Valid () || Are_Sub_Object_Transforms_Dirty ()) {
290295 Update_Sub_Object_Transforms ();
291296 }
292297}
@@ -307,7 +312,12 @@ void Animatable3DObjClass::Special_Render(SpecialRenderInfoClass & rinfo)
307312{
308313 if (HTree == NULL ) return ;
309314
310- if (!Is_Hierarchy_Valid ()) {
315+ //
316+ // Force the hierarchy to be recalculated for single animations.
317+ //
318+ const bool isSingleAnim = CurMotionMode == SINGLE_ANIM && ModeAnim.AnimMode != ANIM_MODE_MANUAL;
319+
320+ if (isSingleAnim || !Is_Hierarchy_Valid ()) {
311321 Update_Sub_Object_Transforms ();
312322 }
313323}
@@ -805,7 +815,7 @@ void Animatable3DObjClass::Update_Sub_Object_Transforms(void)
805815 ModeInterp.PrevFrame1 = AnimatedSoundMgrClass::Trigger_Sound (ModeInterp.Motion1 , ModeInterp.PrevFrame1 , ModeInterp.Frame1 , HTree->Get_Transform (ModeInterp.Motion1 ->Get_Embedded_Sound_Bone_Index ()));
806816 }
807817
808- break ;
818+ break ;
809819
810820 case MULTIPLE_ANIM:
811821 {
@@ -1025,19 +1035,13 @@ void Animatable3DObjClass::Single_Anim_Progress (void)
10251035 //
10261036 // Update the current frame (only works in "SINGLE_ANIM" mode!)
10271037 //
1028- if (CurMotionMode == SINGLE_ANIM) {
1038+ WWASSERT (CurMotionMode == SINGLE_ANIM);
10291039
1030- //
1031- // Update the frame number and sync time
1032- //
1033- ModeAnim.PrevFrame = ModeAnim.Frame ;
1034- ModeAnim.Frame = Compute_Current_Frame (&ModeAnim.animDirection );
1035-
1036- //
1037- // Force the hierarchy to be recalculated
1038- //
1039- Set_Hierarchy_Valid (false );
1040- }
1040+ //
1041+ // Update the frame number and sync time
1042+ //
1043+ ModeAnim.PrevFrame = ModeAnim.Frame ;
1044+ ModeAnim.Frame = Compute_Current_Frame (&ModeAnim.animDirection );
10411045}
10421046
10431047
0 commit comments