@@ -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}
@@ -804,7 +814,7 @@ void Animatable3DObjClass::Update_Sub_Object_Transforms(void)
804814 ModeInterp.PrevFrame1 = AnimatedSoundMgrClass::Trigger_Sound (ModeInterp.Motion1 , ModeInterp.PrevFrame1 , ModeInterp.Frame1 , HTree->Get_Transform (ModeInterp.Motion1 ->Get_Embedded_Sound_Bone_Index ()));
805815 }
806816
807- break ;
817+ break ;
808818
809819 case MULTIPLE_ANIM:
810820 {
@@ -1033,19 +1043,13 @@ void Animatable3DObjClass::Single_Anim_Progress (void)
10331043 //
10341044 // Update the current frame (only works in "SINGLE_ANIM" mode!)
10351045 //
1036- if (CurMotionMode == SINGLE_ANIM) {
1046+ WWASSERT (CurMotionMode == SINGLE_ANIM);
10371047
1038- //
1039- // Update the frame number and sync time
1040- //
1041- ModeAnim.PrevFrame = ModeAnim.Frame ;
1042- ModeAnim.Frame = Compute_Current_Frame (&ModeAnim.animDirection );
1043-
1044- //
1045- // Force the hierarchy to be recalculated
1046- //
1047- Set_Hierarchy_Valid (false );
1048- }
1048+ //
1049+ // Update the frame number and sync time
1050+ //
1051+ ModeAnim.PrevFrame = ModeAnim.Frame ;
1052+ ModeAnim.Frame = Compute_Current_Frame (&ModeAnim.animDirection );
10491053}
10501054
10511055
0 commit comments