From 9da0c095056b170831f0a93944d73f2f72ea184c Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 13 Feb 2016 21:06:18 +0000 Subject: [PATCH] Fix https://forums.duke4.net/topic/8450- git-svn-id: https://svn.eduke32.com/eduke32@5623 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/anim.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/polymer/eduke32/source/anim.c b/polymer/eduke32/source/anim.c index f63df205d..fe70c0275 100644 --- a/polymer/eduke32/source/anim.c +++ b/polymer/eduke32/source/anim.c @@ -42,6 +42,24 @@ dukeanim_t * g_animPtr; dukeanim_t *Anim_Find(const char *s) { intptr_t ptr = hash_findcase(&h_dukeanim, s); + + if (ptr == -1) + { + int const siz = Bstrlen(s) + 5; + char * const str = (char *)Xcalloc(1, siz); + + maybe_append_ext(str, siz, s, ".anm"); + ptr = hash_findcase(&h_dukeanim, str); + + if (ptr == -1) + { + maybe_append_ext(str, siz, s, ".ivf"); + ptr = hash_findcase(&h_dukeanim, str); + } + + Bfree(str); + } + return (dukeanim_t *)(ptr == -1 ? NULL : (dukeanim_t *)ptr); }