From: Rudolf Polzer Date: Sun, 12 Dec 2010 19:05:51 +0000 (+0100) Subject: do not load _lod models if they do not exist (fixes client warning) X-Git-Tag: xonotic-v0.1.0preview~44 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=f6398e0388ad5c3df4a1716d895b2f00bb8a1b67 do not load _lod models if they do not exist (fixes client warning) --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a2f4201019..113e9f427d 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -1528,8 +1528,12 @@ void precache_playermodel(string m) precache_model(m); if(sv_loddistance1) { - precache_model(strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1))); - precache_model(strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1))); + f = strcat(substring(m, 0, -5), "_lod1", substring(m, -4, -1)); + if(fexists(f)) + precache_model(f); + f = strcat(substring(m, 0, -5), "_lod2", substring(m, -4, -1)); + if(fexists(f)) + precache_model(f); } globhandle = search_begin(strcat(m, "_*.sounds"), TRUE, FALSE);