]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Less ponies
authorMario <zacjardine@y7mail.com>
Fri, 17 Apr 2015 04:42:53 +0000 (14:42 +1000)
committerMario <zacjardine@y7mail.com>
Fri, 17 Apr 2015 04:42:53 +0000 (14:42 +1000)
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc

index 7e657b12eabe760226a4b2fe044bdb56c6532e17..f8bd8d05026d842f3d2a42f7f58938f999dfe28f 100644 (file)
@@ -410,7 +410,7 @@ void FixPlayermodel()
        if(!cvar("g_overkill"))
        {
                // public hax
-               if(self.cvar_cl_pony)
+               if(self.cvar_cl_pony && pony_allowed)
                {
                        defaultmodel = "models/player/pony.iqm";
                        defaultskin = self.cvar_cl_pony_skin;
index 75667119292232da63ace8f7654ea55f1fcb246a..34a8e08a6256e325eef5b4dcd3484481b9b9d442 100644 (file)
@@ -567,6 +567,8 @@ const int MIF_GUIDED_TAG = 128;
 .bool cvar_cl_goat;
 .int cvar_cl_charge;
 
+bool pony_allowed;
+
 .string cvar_cl_autovote;
 
 .entity lastkiller;
index d4d1956f289b0bc7e5fe7b800a560e051b90da92..7dd41a9f822686c5af710988e1d0fdac494b1194 100644 (file)
@@ -1060,7 +1060,11 @@ void precache()
 
     if(autocvar_sv_allow_customplayermodels)
     {
-        precache_playermodel("models/player/pony.iqm");
+       if(fexists("models/player/pony.iqm"))
+       {
+               pony_allowed = true;
+               precache_playermodel("models/player/pony.iqm");
+       }
         precache_playermodel("models/player/renamon.iqm");
         precache_playermodel("models/player/terminusmale.iqm");
         precache_playermodel("models/player/ubot.iqm");