]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/csqcmodel_hooks.qc
Merge branch 'TimePath/effectinfo' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / csqcmodel_hooks.qc
index 70e2c99fea001e291aca7f71427e0176a055198b..0c25e60064533141963afe43b98f957756279e2f 100644 (file)
@@ -1,4 +1,3 @@
-#include "csqcmodel_hooks.qh"
 #include "_all.qh"
 
 #include "gibs.qh"
@@ -51,7 +50,7 @@ void CSQCPlayer_LOD_Apply(void)
                if(fexists(s))
                {
                        precache_model(s);
-                       setmodel(self, s);
+                       _setmodel(self, s);
                        if(self.modelindex)
                                self.lodmodelindex1 = self.modelindex;
                }
@@ -60,12 +59,12 @@ void CSQCPlayer_LOD_Apply(void)
                if(fexists(s))
                {
                        precache_model(s);
-                       setmodel(self, s);
+                       _setmodel(self, s);
                        if(self.modelindex)
                                self.lodmodelindex2 = self.modelindex;
                }
 
-               setmodel(self, modelname); // make everything normal again
+               _setmodel(self, modelname); // make everything normal again
                setsize(self, mi, ma);
        }
 
@@ -150,7 +149,7 @@ void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer)
                entity e;
                e = spawn();
                precache_model(cvar_defstring("_cl_playermodel"));
-               setmodel(e, cvar_defstring("_cl_playermodel"));
+               _setmodel(e, cvar_defstring("_cl_playermodel"));
                forceplayermodels_goodmodel = e.model;
                forceplayermodels_goodmodelindex = e.modelindex;
                remove(e);
@@ -181,7 +180,7 @@ void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer)
                // only if this failed, find it out on our own
                entity e;
                e = spawn();
-               setmodel(e, autocvar__cl_playermodel); // this is harmless, see below
+               _setmodel(e, autocvar__cl_playermodel); // this is harmless, see below
                forceplayermodels_modelisgoodmodel = fexists(e.model);
                forceplayermodels_model = e.model;
                forceplayermodels_modelindex = e.modelindex;
@@ -193,7 +192,7 @@ void CSQCPlayer_ModelAppearance_Apply(bool islocalplayer)
        {
                entity e;
                e = spawn();
-               setmodel(e, autocvar_cl_forcemyplayermodel); // this is harmless, see below
+               _setmodel(e, autocvar_cl_forcemyplayermodel); // this is harmless, see below
                forceplayermodels_myisgoodmodel = fexists(e.model);
                forceplayermodels_mymodel = e.model;
                forceplayermodels_mymodelindex = e.modelindex;
@@ -591,7 +590,7 @@ void CSQCModel_Effects_Apply(void)
        {
                if(!self.snd_looping)
                {
-                       sound(self, CH_TRIGGER_SINGLE, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+                       sound(self, CH_TRIGGER_SINGLE, SND_JETPACK_FLY, VOL_BASE, autocvar_g_jetpack_attenuation);
                        self.snd_looping = CH_TRIGGER_SINGLE;
                }
        }
@@ -599,17 +598,12 @@ void CSQCModel_Effects_Apply(void)
        {
                if(self.snd_looping)
                {
-                       sound(self, self.snd_looping, "misc/null.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+                       sound(self, self.snd_looping, SND_Null, VOL_BASE, autocvar_g_jetpack_attenuation);
                        self.snd_looping = 0;
                }
        }
 }
 
-void CSQCPlayer_Precache()
-{
-       precache_sound("misc/jetpack_fly.wav");
-}
-
 // general functions
 .int csqcmodel_predraw_run;
 .int anim_frame;