]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/glowmod_color_fix
authorterencehill <piuntn@gmail.com>
Sat, 12 Dec 2020 16:58:08 +0000 (17:58 +0100)
committerterencehill <piuntn@gmail.com>
Sat, 12 Dec 2020 16:58:08 +0000 (17:58 +0100)
1  2 
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/weapons/all.qh

index 6a31b85bc5e8af537364f41b5e6c4d4deeacb7ce,f53ea725c7d537403a7d785b7e21caf66cc82599..70b5b59b537c66f3032ce9bbb4575971c9fac8b4
@@@ -1,6 -1,5 +1,5 @@@
  #include "csqcmodel_hooks.qh"
  
- #include <client/autocvars.qh>
  #include <client/mutators/_mod.qh>
  #include <client/player_skeleton.qh>
  #include <client/weapons/projectile.qh>
@@@ -300,7 -299,7 +299,7 @@@ void CSQCPlayer_ModelAppearance_Apply(e
  
        // GLOWMOD AND DEATH FADING
        if(this.colormap > 0)
 -              this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true) * 2;
 +              this.glowmod = colormapPaletteColor(((this.colormap >= 1024) ? this.colormap : entcs_GetClientColors(this.colormap - 1)) & 0x0F, true);
        else
                this.glowmod = '1 1 1';
  
@@@ -619,7 -618,7 +618,7 @@@ void CSQCModel_Hook_PreDraw(entity this
                return;
        this.csqcmodel_predraw_run = framecount;
  
-       if(!this.modelindex || this.model == "null" || this.alpha < 0)
+       if(!this.modelindex || this.model == "null")
        {
                this.drawmask = 0;
                if(this.snd_looping > 0)
                                tracebox(this.origin + '0 0 1', this.mins, this.maxs, this.origin - '0 0 4', MOVE_NORMAL, this);
                                if(trace_startsolid || trace_fraction < 1)
                                        onground = 1;
+                               // predicted clients handle smoothing in the prediction code
+                               this.origin = CSQCModel_ApplyStairSmoothing(this, onground, this.origin);
                        }
                        animdecide_load_if_needed(this);
                        animdecide_setimplicitstate(this, onground);
index a8cdcf90c5724877f25a045e16dcb25800eeaae4,4e457dabab9bcf24f2dbe4338b29d9e8c0e5e6bc..8a2feca7b08cca41795ef13397fd6bdd0fbf5eaa
@@@ -1,6 -1,5 +1,5 @@@
  #include "projectile.qh"
  
- #include <client/autocvars.qh>
  #include <client/mutators/_mod.qh>
  #include <common/constants.qh>
  #include <common/effects/all.qh>
@@@ -276,7 -275,7 +275,7 @@@ NET_HANDLE(ENT_CLIENT_PROJECTILE, bool 
                // TODO: projectiles use glowmaps for their color, not teams
                #if 0
                if(this.colormap > 0)
 -                      this.glowmod = colormapPaletteColor(this.colormap & 0x0F, true) * 2;
 +                      this.glowmod = colormapPaletteColor(this.colormap & 0x0F, true);
                else
                        this.glowmod = '1 1 1';
                #endif
                        HANDLE(GRENADE_BOUNCING)   this.traileffect = EFFECT_TR_GRENADE.m_id; break;
                        HANDLE(MINE)               this.traileffect = EFFECT_TR_GRENADE.m_id; break;
                        HANDLE(BLASTER)            this.traileffect = EFFECT_Null.m_id; break;
-                       HANDLE(ARC_BOLT)           this.traileffect = EFFECT_Null.m_id; break;
+                       HANDLE(ARC_BOLT)           this.traileffect = EFFECT_TR_WIZSPIKE.m_id; break;
                        HANDLE(HLAC)               this.traileffect = EFFECT_Null.m_id; break;
                        HANDLE(PORTO_RED)          this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break;
                        HANDLE(PORTO_BLUE)         this.traileffect = EFFECT_TR_WIZSPIKE.m_id; this.scale = 4; break;
                                this.mins = '-4 -4 -4';
                                this.maxs = '4 4 4';
                                break;
+                       case PROJECTILE_ARC_BOLT:
+                               set_movetype(this, MOVETYPE_BOUNCE);
+                               settouch(this, func_null);
+                               break;
                        case PROJECTILE_RAPTORBOMB:
                                this.mins = '-3 -3 -3';
                                this.maxs = '3 3 3';
index 6e63832d3c9433d0bbe030fd70b7fb543aab3e4b,479c0b6b39069c7171f51ab969415dc6840414a9..d5605a4fdff6462ea34753da373f6e074d11dd48
@@@ -347,7 -347,7 +347,7 @@@ STATIC_INIT(register_weapons_done
  vector weaponentity_glowmod(Weapon wep, entity actor, int c, entity wepent)
  {
      vector g;
 -    if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true) * 2;
 +    if (!(g = wep.wr_glow(wep, actor, wepent))) g = colormapPaletteColor(c & 0x0F, true);
      return g;
  }
  
@@@ -381,6 -381,7 +381,7 @@@ ENUMCLASS_END(WFRAME
  .WFRAME wframe;
  
  #ifdef SVQC
+     string autocvar_g_shootfromfixedorigin;
      #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
  #elif defined(CSQC)
      string autocvar_cl_shootfromfixedorigin;