Skip to content

Commit 362e4e7

Browse files
committed
Fix in .s animation checking, was somewhat bad rewriting of the code.
1 parent f11a428 commit 362e4e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/RunActivity/Viewer3D/Shapes.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2734,7 +2734,8 @@ public virtual Matrix GetMatrixProduct(int iNode)
27342734
/// </summary>
27352735
/// <param name="animationId">For stf files it is the node id, for gltf files it is the animation id.</param>
27362736
/// <returns>true if there is no internal seqence defined in the shape.</returns>
2737-
public virtual bool IsAnimationArticulation(int animationId) => Animations?.FirstOrDefault()?.anim_nodes?.ElementAtOrDefault(animationId)?.controllers.Count == 0;
2737+
public virtual bool IsAnimationArticulation(int animationId) =>
2738+
!(Animations?.FirstOrDefault()?.anim_nodes is anim_nodes a && a.Count > animationId && a.ElementAtOrDefault(animationId)?.controllers is controllers c && c.Count > 0);
27382739

27392740
/// <summary>
27402741
/// Returns the parent animation id.

0 commit comments

Comments
 (0)