From f03ee01bc593ad2271f697bf286ebc04c91da0b1 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Tue, 13 Feb 2024 18:27:18 -0800 Subject: Make loaded scene node an anima node only if the scene has skins/skeletons. --- game/src/plugins/viewer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'game/src/plugins') diff --git a/game/src/plugins/viewer.c b/game/src/plugins/viewer.c index 3000b30..769887f 100644 --- a/game/src/plugins/viewer.c +++ b/game/src/plugins/viewer.c @@ -120,9 +120,11 @@ bool init(Game* game, State** pp_state) { goto cleanup; } - Anima* anima = gfx_get_node_anima(node); - gfx_play_animation( - anima, &(AnimationPlaySettings){.name = "Walk", .loop = true}); + if (gfx_get_node_type(node) == AnimaNode) { + Anima* anima = gfx_get_node_anima(node); + gfx_play_animation( + anima, &(AnimationPlaySettings){.name = "Walk", .loop = true}); + } *pp_state = state; return true; -- cgit v1.2.3