#endif
#ifdef SVQC
-void wframe_send(entity actor, .entity weaponentity, vector a, bool restartanim)
+void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim)
{
if (!IS_REAL_CLIENT(actor)) return;
int channel = MSG_ONE;
WriteCoord(channel, a.y);
WriteCoord(channel, a.z);
WriteByte(channel, restartanim);
- WriteByte(channel, actor.(weaponentity).state);
- WriteByte(channel, actor.(weaponentity).alpha * 255);
+ WriteByte(channel, weaponentity.state);
+ WriteByte(channel, weaponentity.alpha * 255);
}
#endif
self.switchweapon = spectatee.switchweapon;
self.switchingweapon = spectatee.switchingweapon;
self.weapon = spectatee.weapon;
+ self.weapon_nextthink = spectatee.weapon_nextthink;
self.vortex_charge = spectatee.vortex_charge;
self.vortex_chargepool_ammo = spectatee.vortex_chargepool_ammo;
self.hagar_load = spectatee.hagar_load;
if(frametime)
{
vector g;
- if(self.weapon == WEP_VORTEX.m_id && WEP_CVAR(vortex, charge))
+ if (IS_SPEC(self))
+ {
+ g = self.enemy.weaponentity_glowmod;
+ }
+ else if(self.weapon == WEP_VORTEX.m_id && WEP_CVAR(vortex, charge))
{
g.x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.vortex_charge / WEP_CVAR(vortex, charge_animlimit));
g.y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.vortex_charge / WEP_CVAR(vortex, charge_animlimit));
return false;
}
-void wframe_send(entity actor, .entity weaponentity, vector a, bool restartanim);
+void wframe_send(entity actor, entity weaponentity, vector a, bool restartanim);
void weapon_thinkf(entity actor, .entity weaponentity, float fr, float t, void(Weapon thiswep, entity actor,
.entity weaponentity, int fire) func)
else // if (fr == WFRAME_RELOAD)
a = actor.(weaponentity).anim_reload;
a.z *= g_weaponratefactor;
- wframe_send(actor, weaponentity, a, restartanim);
+ entity e; FOR_EACH_CLIENT(e) if (e == actor || (IS_SPEC(e) && e.enemy == actor)) {
+ wframe_send(e, actor.(weaponentity), a, restartanim);
+ }
}
v_forward = of;