diff --git a/source/src/protos.h b/source/src/protos.h index 2b24d423..d06e83c2 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -801,6 +801,7 @@ extern mapmodelinfo *getmminfo(int i); extern int findanim(const char *name); extern void loadskin(const char *dir, const char *altdir, Texture *&skin); extern model *loadmodel(const char *name, int i = -1, bool trydl = false); +extern void resetmdlnotfound(); extern void preload_playermodels(); extern void preload_entmodels(); extern void preload_hudguns(); diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 959001ca..058741d3 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -305,6 +305,12 @@ void cleanupmodels() enumerate(mdllookup, model *, m, m->cleanup()); } +void resetmdlnotfound() +{ + enumeratek(mdlnotfound, const char *, m, delstring(m)); + mdlnotfound.clear(); +} + void getmapmodelattributes(char *name, char *attr) { const char *res = NULL; diff --git a/source/src/worldio.cpp b/source/src/worldio.cpp index 9ff406c1..dcb4ee8f 100644 --- a/source/src/worldio.cpp +++ b/source/src/worldio.cpp @@ -818,6 +818,7 @@ bool load_world(char *mname) // still supports all map formats that have c2skeepalive(); watch.start(); + if(autodownload) resetmdlnotfound(); preload_mapmodels(autodownload ? true : false); int mdlloadtime = watch.elapsed();