From: terencehill Date: Sun, 26 Apr 2020 13:02:39 +0000 (+0200) Subject: Fix #2429 "precache_playermodel() does not account for :skin suffix which is allowed... X-Git-Tag: xonotic-v0.8.5~1098 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;ds=sidebyside;h=eff3f68a71c14f2e4c395fb3e113b627457f8899;p=xonotic%2Fxonotic-data.pk3dir.git Fix #2429 "precache_playermodel() does not account for :skin suffix which is allowed in sv_defaultplayermodel" (patch by nico) --- diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 4e2113f53..9dd468c2d 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -856,9 +856,14 @@ void readplayerstartcvars() void precache_playermodel(string m) { - float globhandle, i, n; + int globhandle, i, n; string f; + // remove : 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")