]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
do not load _lod models if they do not exist (fixes client warning)
authorRudolf Polzer <divverent@alientrap.org>
Sun, 12 Dec 2010 19:05:51 +0000 (20:05 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sun, 12 Dec 2010 19:05:51 +0000 (20:05 +0100)
qcsrc/server/miscfunctions.qc

index a2f4201019a46e19c1b45b78dc8c5d0f38a88a41..113e9f427df5b8105d918b7483e482142b3d4deb 100644 (file)
@@ -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);