wasinvehicle = invehicle;
Weapon wep = activeweapon;
int c = entcs_GetClientColors(current_player);
- vector g = weaponentity_glowmod(wep, c);
+ vector g = weaponentity_glowmod(wep, NULL, c);
entity me = CSQCModel_server2csqc(player_localentnum - 1);
int fx = ((me.csqcmodel_effects & EFMASK_CHEAP)
| EF_NODEPTHTEST)
.entity weaponchild;
.entity exteriorweaponentity;
-vector weaponentity_glowmod(Weapon wep, int c)
+vector weaponentity_glowmod(Weapon wep, entity actor, int c)
{
vector g;
- if (!(g = wep.wr_glow(wep))) g = colormapPaletteColor(c & 0x0F, true) * 2;
+ if (!(g = wep.wr_glow(wep, actor))) g = colormapPaletteColor(c & 0x0F, true) * 2;
return g;
}
return false;
}
/** (CLIENT) weapon specific glow */
- METHOD(Weapon, wr_glow, vector(Weapon this)) { return '0 0 0'; }
+ METHOD(Weapon, wr_glow, vector(Weapon this, entity actor)) { return '0 0 0'; }
/** (SERVER) the weapon is dropped */
METHOD(Weapon, wr_drop, void(Weapon this, entity actor)) {}
/** (SERVER) a weapon is picked up */
REGISTER_STAT(WEP_CVAR_vortex_charge, bool, WEP_CVAR(vortex, charge))
REGISTER_STAT(WEP_CVAR_vortex_charge_animlimit, float, WEP_CVAR(vortex, charge_animlimit))
-#if defined(CSQC)
+#if defined(GAMEQC)
float autocvar_g_weapon_charge_colormod_red_full;
float autocvar_g_weapon_charge_colormod_red_half;
float autocvar_g_weapon_charge_colormod_green_full;
float autocvar_g_weapon_charge_colormod_green_half;
float autocvar_g_weapon_charge_colormod_hdrmultiplier;
-METHOD(Vortex, wr_glow, vector(Vortex this))
+METHOD(Vortex, wr_glow, vector(Vortex this, entity actor))
{
- if (!STAT(WEP_CVAR_vortex_charge)) return '0 0 0';
- float charge = STAT(VORTEX_CHARGE);
- float animlimit = STAT(WEP_CVAR_vortex_charge_animlimit);
+ if (!STAT(WEP_CVAR_vortex_charge, actor)) return '0 0 0';
+ float charge = STAT(VORTEX_CHARGE, actor);
+ float animlimit = STAT(WEP_CVAR_vortex_charge_animlimit, actor);
vector g;
g.x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, charge / animlimit);
g.y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, charge / animlimit);
wep.owner = wep.enemy = own;
wep.flags |= FL_TOSSED;
wep.colormap = own.colormap;
- wep.glowmod = weaponentity_glowmod(info, own.clientcolors);
+ wep.glowmod = weaponentity_glowmod(info, own, own.clientcolors);
W_DropEvent(wr_drop,own,wpn,wep);
else this.alpha = 1;
Weapon wep = PS(this.owner).m_weapon;
- if (wep) this.glowmod = weaponentity_glowmod(wep, this.owner.clientcolors);
+ if (wep) this.glowmod = weaponentity_glowmod(wep, this.owner, this.owner.clientcolors);
this.colormap = this.owner.colormap;
CSQCMODEL_AUTOUPDATE(this);