]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
legacy networking: bring glowmod back, accidentally it
authorTimePath <andrew.hardaker1995@gmail.com>
Sat, 9 Jan 2016 10:57:04 +0000 (21:57 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Sat, 9 Jan 2016 10:57:04 +0000 (21:57 +1100)
qcsrc/client/view.qc
qcsrc/common/weapons/all.qh
qcsrc/server/weapons/throwing.qc
qcsrc/server/weapons/weaponsystem.qc

index 4eab4c5c551d2b9dcfffc41a2ec21bd662e60260..7288f253e768207f0376705948ba8b260d1509ed 100644 (file)
@@ -278,10 +278,9 @@ void viewmodel_draw(entity this)
        if (invehicle) a = -1;
        else if (wasinvehicle) a = 1;
        wasinvehicle = invehicle;
-       int c = stof(getplayerkeyvalue(current_player, "colors"));
-       vector g;
        Weapon wep = activeweapon;
-       if (!(g = wep.wr_glow(wep))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+       int c = stof(getplayerkeyvalue(current_player, "colors"));
+       vector g = weaponentity_glowmod(wep, c);
        entity me = CSQCModel_server2csqc(player_localentnum - 1);
        int fx = ((me.csqcmodel_effects & EFMASK_CHEAP)
                | EF_NODEPTHTEST)
index 4819f2c255d379144cd32f44031d9bfa496a50a4..6429ff899325e504aa99aeb398e9bc5da19a634c 100644 (file)
@@ -325,7 +325,12 @@ STATIC_INIT(register_weapons_done)
 
 .entity weaponchild;
 .entity exteriorweaponentity;
-.vector weaponentity_glowmod;
+vector weaponentity_glowmod(Weapon wep, int c)
+{
+    vector g;
+    if (!(g = wep.wr_glow(wep))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+    return g;
+}
 
 //.int weapon; // current weapon
 .string weaponname; // name of .weapon
index e36825e4825c5100176e1a241e265bbd7c1339e5..df0f7b691f26769573ae87a7b2753df6b82df93f 100644 (file)
@@ -78,7 +78,7 @@ string W_ThrowNewWeapon(entity own, float wpn, float doreduce, vector org, vecto
        weapon_defaultspawnfunc(wep, info);
        if(startitem_failed)
                return string_null;
-       wep.glowmod = own.weaponentity_glowmod;
+       wep.glowmod = weaponentity_glowmod(wep, own.clientcolors);
        wep.think = thrown_wep_think;
        wep.savenextthink = wep.nextthink;
        wep.nextthink = min(wep.nextthink, time + 0.5);
index d58e19148ca4872ca9df61eab68a64c6ef1e2b16..4972d818f3a8db4be0c27a0076cef39d2f11f509 100644 (file)
@@ -147,7 +147,7 @@ void CL_ExteriorWeaponentity_Think()
        else if (this.owner.alpha != 0) this.alpha = this.owner.alpha;
        else this.alpha = 1;
 
-       this.glowmod = this.owner.weaponentity_glowmod;
+       this.glowmod = weaponentity_glowmod(PS(this.owner).m_weapon, this.owner.clientcolors);
        this.colormap = this.owner.colormap;
 
        CSQCMODEL_AUTOUPDATE(this);