X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fclient%2Fcsqcmodel_hooks.qc;h=6499a683e8f4c2cf198be39cb0bee2c9eb9e9a3f;hb=f570e338e4f861aa53cd44a4014a077105cefe72;hp=0643bb09d5b37e3bdd7b014f13964959ab837484;hpb=6cb6858aba996eda91792becb2a7caa94a0f8141;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 0643bb09d..6499a683e 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -1,4 +1,7 @@ #include "csqcmodel_hooks.qh" +#include "autocvars.qh" +#include "csqcmodel_hooks.qh" +#include "miscfunctions.qh" #include "mutators/events.qh" #include "player_skeleton.qh" #include "weapons/projectile.qh" @@ -6,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -129,11 +134,14 @@ void CSQCPlayer_ModelAppearance_PostUpdate(entity this) this.forceplayermodels_isgoodmodel = fexists(this.forceplayermodels_savemodel); this.forceplayermodels_isgoodmodel_mdl = this.forceplayermodels_savemodel; if(!this.forceplayermodels_isgoodmodel) - LOG_INFOF("Warning: missing model %s has been used\n", this.forceplayermodels_savemodel); + LOG_INFOF("Warning: missing model %s has been used", this.forceplayermodels_savemodel); } } void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) { + if(MUTATOR_CALLHOOK(ForcePlayermodels_Skip, this, islocalplayer)) + goto skipforcemodels; + // FORCEMODEL // which one is ALWAYS good? if (!forceplayermodels_goodmodel) @@ -278,6 +286,8 @@ void CSQCPlayer_ModelAppearance_Apply(entity this, bool islocalplayer) this.colormap = player_localnum + 1; } + LABEL(skipforcemodels) + // GLOWMOD AND DEATH FADING if(this.colormap > 0) this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true) * 2; @@ -392,8 +402,6 @@ void CSQCModel_AutoTagIndex_Apply(entity this) if(this.tag_entity && wasfreed(this.tag_entity)) this.tag_entity = NULL; - viewloc_SetTags(this); - MUTATOR_CALLHOOK(TagIndex_Update, this); if(this.tag_networkentity) @@ -563,7 +571,7 @@ void CSQCModel_Effects_Apply(entity this) { if(!this.snd_looping) { - sound(this, CH_TRIGGER_SINGLE, SND_JETPACK_FLY, VOL_BASE, autocvar_g_jetpack_attenuation); + sound(this, CH_TRIGGER_SINGLE, SND_JETPACK_FLY, VOL_BASE, autocvar_cl_jetpack_attenuation); this.snd_looping = CH_TRIGGER_SINGLE; } } @@ -571,7 +579,7 @@ void CSQCModel_Effects_Apply(entity this) { if(this.snd_looping) { - sound(this, this.snd_looping, SND_Null, VOL_BASE, autocvar_g_jetpack_attenuation); + sound(this, this.snd_looping, SND_Null, VOL_BASE, autocvar_cl_jetpack_attenuation); this.snd_looping = 0; } }