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)
.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
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);
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);