]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix #2429 "precache_playermodel() does not account for :skin suffix which is allowed...
authorterencehill <piuntn@gmail.com>
Sun, 26 Apr 2020 13:02:39 +0000 (15:02 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 26 Apr 2020 13:02:39 +0000 (15:02 +0200)
qcsrc/server/miscfunctions.qc

index 4e2113f53fe3baf148c7c7308c371c51efc45c87..9dd468c2d74982c15a6e83691debb4b4c9254bcb 100644 (file)
@@ -856,9 +856,14 @@ void readplayerstartcvars()
 
 void precache_playermodel(string m)
 {
-       float globhandle, i, n;
+       int globhandle, i, n;
        string f;
 
+       // remove :<skinnumber> suffix
+       int j = strstrofs(m, ":", 0);
+       if(j >= 0)
+               m = substring(m, 0, j);
+
        if(substring(m, -9, 5) == "_lod1")
                return;
        if(substring(m, -9, 5) == "_lod2")