]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'terencehill/cl_forceplayercolors_3' into 'master'
authorMario <mario.mario@y7mail.com>
Mon, 3 Aug 2020 07:55:59 +0000 (07:55 +0000)
committerMario <mario.mario@y7mail.com>
Mon, 3 Aug 2020 07:55:59 +0000 (07:55 +0000)
cl_forceplayercolors 3 forces player colors to mine only in Duel

See merge request xonotic/xonotic-data.pk3dir!848

1  2 
qcsrc/client/csqcmodel_hooks.qc

index 10287ce6e69f96c3206a147bde1db00f071cc3f0,048669bd22ffbd061d59588e97a46cb00934db37..82b045801429a2f750c2513db28fa0b148d552b8
@@@ -1,15 -1,14 +1,17 @@@
  #include "csqcmodel_hooks.qh"
  #include "autocvars.qh"
 +#include "main.qh"
  #include "miscfunctions.qh"
  #include <client/mutators/_mod.qh>
 +#include <client/main.qh>
  #include "player_skeleton.qh"
  #include "weapons/projectile.qh"
  #include <common/animdecide.qh>
  #include <common/ent_cs.qh>
+ #include <common/gamemodes/_mod.qh>
+ #include <common/mapinfo.qh>
  #include <common/physics/movetypes/movetypes.qh>
 +#include <common/physics/player.qh>
  #include <common/viewloc.qh>
  #include <common/effects/all.qh>
  #include <common/effects/all.inc>
@@@ -245,7 -244,8 +247,8 @@@ void CSQCPlayer_ModelAppearance_Apply(e
  
                if(autocvar_cl_forcemyplayercolors)
                        forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors;
-               if(autocvar_cl_forceplayercolors == 2 && team_count == 2)
+               if((autocvar_cl_forceplayercolors == 2 && team_count == 2)
+                       || (autocvar_cl_forceplayercolors == 3 && IS_GAMETYPE(DUEL)))
                        forcecolor_enemy = 1024 + autocvar__cl_color;
  
                if(forcecolor_enemy && !forcecolor_friend)
@@@ -528,15 -528,9 +531,15 @@@ void CSQCModel_Effects_Apply(entity thi
        if(eff & EF_FULLBRIGHT)
                this.renderflags |= RF_FULLBRIGHT;
        if(eff & EF_FLAME)
 -              pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1));
 +      {
 +              boxparticles(particleeffectnum(EFFECT_EF_FLAME), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0);
 +              //pointparticles(EFFECT_EF_FLAME, this.origin, '0 0 0', bound(0, frametime, 0.1));
 +      }
        if(eff & EF_STARDUST)
 -              pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1));
 +      {
 +              boxparticles(particleeffectnum(EFFECT_EF_STARDUST), this, this.absmin, this.absmax, this.velocity, this.velocity, bound(0, frametime, 0.1), 0);
 +              //pointparticles(EFFECT_EF_STARDUST, this.origin, '0 0 0', bound(0, frametime, 0.1));
 +      }
        if(eff & EF_NOSHADOW)
                this.renderflags |= RF_NOSHADOW;
        if(eff & EF_NODEPTHTEST)