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 4e2113f..9dd468c 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")