From 10746e8b0f963dbd82429d0e6478d2f0360c5979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Sun, 11 Feb 2024 11:38:40 +0100 Subject: [PATCH] render: fix animations speed setup --- engine/joint/v4k.h | 2 +- engine/split/v4k_render.c | 2 +- engine/v4k.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index e96af2b..455a0a7 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -373786,8 +373786,8 @@ void model_destroy(model_t m) { anims_t animations(const char *pathfile, int flags) { anims_t a = {0}; - a.speed = 1.0; a.anims = animlist(pathfile); + if(a.anims) a.speed = 1.0; return a; } diff --git a/engine/split/v4k_render.c b/engine/split/v4k_render.c index c8f972b..7417912 100644 --- a/engine/split/v4k_render.c +++ b/engine/split/v4k_render.c @@ -3715,8 +3715,8 @@ void model_destroy(model_t m) { anims_t animations(const char *pathfile, int flags) { anims_t a = {0}; - a.speed = 1.0; a.anims = animlist(pathfile); + if(a.anims) a.speed = 1.0; return a; } diff --git a/engine/v4k.c b/engine/v4k.c index 7bc56ca..2218f6e 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -20930,8 +20930,8 @@ void model_destroy(model_t m) { anims_t animations(const char *pathfile, int flags) { anims_t a = {0}; - a.speed = 1.0; a.anims = animlist(pathfile); + if(a.anims) a.speed = 1.0; return a; }