From f6398e0388ad5c3df4a1716d895b2f00bb8a1b67 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sun, 12 Dec 2010 20:05:51 +0100 Subject: [PATCH] do not load _lod models if they do not exist (fixes client warning) --- qcsrc/server/miscfunctions.qc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index a2f420101..113e9f427 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); -- 2.39.2