]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/csqcmodel_hooks.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / csqcmodel_hooks.qc
index d2b28e9b08f2a9b4cacd3a49bc0f45076a52de8e..6499a683e8f4c2cf198be39cb0bee2c9eb9e9a3f 100644 (file)
@@ -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 <common/ent_cs.qh>
 #include <common/physics/movetypes/movetypes.qh>
 #include <common/viewloc.qh>
+#include <common/effects/all.qh>
+#include <common/effects/all.inc>
 #include <lib/csqcmodel/cl_model.qh>
 #include <lib/csqcmodel/cl_player.qh>
 #include <lib/csqcmodel/interpolate.qh>
@@ -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;