summaryrefslogtreecommitdiff
path: root/game/src/plugins/viewer.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-02-13 18:27:18 -0800
committer3gg <3gg@shellblade.net>2024-02-13 18:27:18 -0800
commitf03ee01bc593ad2271f697bf286ebc04c91da0b1 (patch)
treef6036a15465718d68a5f5c3996d619e4bea61247 /game/src/plugins/viewer.c
parent090f91787b3f4e4711e4aada5ffc232d984b8ce1 (diff)
Make loaded scene node an anima node only if the scene has skins/skeletons.
Diffstat (limited to 'game/src/plugins/viewer.c')
-rw-r--r--game/src/plugins/viewer.c8
1 files changed, 5 insertions, 3 deletions
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) {
120 goto cleanup; 120 goto cleanup;
121 } 121 }
122 122
123 Anima* anima = gfx_get_node_anima(node); 123 if (gfx_get_node_type(node) == AnimaNode) {
124 gfx_play_animation( 124 Anima* anima = gfx_get_node_anima(node);
125 anima, &(AnimationPlaySettings){.name = "Walk", .loop = true}); 125 gfx_play_animation(
126 anima, &(AnimationPlaySettings){.name = "Walk", .loop = true});
127 }
126 128
127 *pp_state = state; 129 *pp_state = state;
128 return true; 130 return true;