net_eff.eent_net_count = eff_cnt;
net_eff.eent_eff_trail = eff.eent_eff_trail;
- FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != ignore && !(IS_SPEC(it) && it.enemy == ignore), Net_Write_Effect(net_eff, it, 0));
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != ignore && !(IS_SPEC(it) && it.enemy && it.enemy == ignore), Net_Write_Effect(net_eff, it, 0));
delete(net_eff);
}
actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
- W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir);
if (autocvar_g_casings >= 2) // casing code
{
actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
- W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir);
if(autocvar_g_casings >= 2) // casing code
{
W_SetupShot(actor, weaponentity, false, 2, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR(arc, bolt_damage), WEP_ARC.m_id | HITTYPE_SECONDARY);
- W_MuzzleFlash(actor, weaponentity, EFFECT_ARC_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ARC_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
missile = new(missile);
missile.owner = missile.realowner = actor;
vector s_forward = v_forward * cos(atk_shotangle * DEG2RAD) + v_up * sin(atk_shotangle * DEG2RAD);
W_SetupShot_Dir(actor, weaponentity, s_forward, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_B, atk_damage, atk_deathtype);
- W_MuzzleFlash(actor, weaponentity, EFFECT_BLASTER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_BLASTER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
entity missile = new(blasterbolt);
missile.owner = missile.realowner = actor;
up = v_up;
shots = WEP_CVAR_PRI(crylink, shots);
- W_MuzzleFlash(actor, weaponentity, EFFECT_CRYLINK_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_CRYLINK_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
proj = prevproj = firstproj = NULL;
for(counter = 0; counter < shots; ++counter)
{
up = v_up;
shots = WEP_CVAR_SEC(crylink, shots);
- W_MuzzleFlash(actor, weaponentity, EFFECT_CRYLINK_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_CRYLINK_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
proj = prevproj = firstproj = NULL;
for(counter = 0; counter < shots; ++counter)
{
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(devastator, ammo), weaponentity);
W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 5, SND_ROCKET_FIRE, CH_WEAPON_A, WEP_CVAR(devastator, damage), thiswep.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_ROCKET_MUZZLEFLASH, MDL_DEVASTATOR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ROCKET_MUZZLEFLASH, MDL_DEVASTATOR_MUZZLEFLASH, w_shotorg, w_shotdir);
entity missile = WarpZone_RefSys_SpawnSameRefSys(actor);
missile.weaponentity_fld = weaponentity;
thiswep.m_id
);
- W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
proj = new(electro_bolt);
proj.owner = proj.realowner = actor;
w_shotdir = v_forward; // no TrueAim for grenades please
- W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
entity proj = new(electro_orb);
proj.owner = proj.realowner = actor;
{
W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 2, SND_FIREBALL_FIRE2, CH_WEAPON_A, WEP_CVAR_PRI(fireball, damage) + WEP_CVAR_PRI(fireball, bfgdamage), WEP_FIREBALL.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
entity proj = new(plasma_prim);
proj.owner = proj.realowner = actor;
{
W_SetupShot_ProjectileSize(actor, weaponentity, '-16 -16 -16', '16 16 16', false, 0, SND_Null, 0, 0, WEP_FIREBALL.m_id); // TODO: probably doesn't need deathtype, just a prefire effect
w_shotorg += f_diff.x * v_up + f_diff.y * v_right;
- W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_PRE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_PRE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
}
void W_Fireball_Attack1_Frame4(Weapon thiswep, entity actor, .entity weaponentity, int fire)
traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, actor);
w_shotorg = trace_endpos;
- W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_FIREBALL_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
proj = new(grenade);
proj.owner = proj.realowner = actor;
W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hagar, damage), thiswep.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
missile = new(missile);
missile.owner = missile.realowner = actor;
W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage), thiswep.m_id | HITTYPE_SECONDARY);
- W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
missile = new(missile);
missile.owner = missile.realowner = actor;
shots = actor.(weaponentity).hagar_load;
W_SetupShot(actor, weaponentity, false, 2, SND_HAGAR_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hagar, damage) * shots, thiswep.m_id | HITTYPE_SECONDARY);
- W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
forward = v_forward;
right = v_right;
spread = spread * WEP_CVAR_PRI(hlac, spread_crouchmod);
W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(hlac, damage), thiswep.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_BLASTER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_BLASTER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
if(!autocvar_g_norecoil)
{
actor.punchangle_x = random() - 0.5;
spread = spread * WEP_CVAR_SEC(hlac, spread_crouchmod);
W_SetupShot(actor, weaponentity, false, 3, SND_LASERGUN_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(hlac, damage), thiswep.m_id | HITTYPE_SECONDARY);
- W_MuzzleFlash(actor, weaponentity, EFFECT_BLASTER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_BLASTER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
missile = new(hlacbolt);
missile.owner = missile.realowner = actor;
else
fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), deathtype, EFFECT_BULLET);
- W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir);
// casing code
if(autocvar_g_casings >= 2)
actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
- W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir);
if(autocvar_g_casings >= 2) // casing code
{
fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), thiswep.m_id, EFFECT_BULLET);
- W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_MACHINEGUN_MUZZLEFLASH, MDL_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir);
if(autocvar_g_casings >= 2) // casing code
{
W_DecreaseAmmo(thiswep, actor, WEP_CVAR(minelayer, ammo), weaponentity);
W_SetupShot_ProjectileSize(actor, weaponentity, '-4 -4 -4', '4 4 4', false, 5, SND_MINE_FIRE, CH_WEAPON_A, WEP_CVAR(minelayer, damage), thiswep.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_ROCKET_MUZZLEFLASH, MDL_MINELAYER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ROCKET_MUZZLEFLASH, MDL_MINELAYER_MUZZLEFLASH, w_shotorg, w_shotdir);
entity mine = WarpZone_RefSys_SpawnSameRefSys(actor);
mine.weaponentity_fld = weaponentity;
W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_PRI(mortar, damage), thiswep.m_id);
w_shotdir = v_forward; // no TrueAim for grenades please
- W_MuzzleFlash(actor, weaponentity, EFFECT_GRENADE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_GRENADE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
entity gren = new(grenade);
gren.owner = gren.realowner = actor;
W_SetupShot_ProjectileSize(actor, weaponentity, '-3 -3 -3', '3 3 3', false, 4, SND_GRENADE_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(mortar, damage), thiswep.m_id | HITTYPE_SECONDARY);
w_shotdir = v_forward; // no TrueAim for grenades please
- W_MuzzleFlash(actor, weaponentity, EFFECT_GRENADE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_GRENADE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
gren = new(grenade);
gren.owner = gren.realowner = actor;
W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots, deathtype);
- W_MuzzleFlash(actor, weaponentity, EFFECT_RIFLE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 2000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_RIFLE_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 2);
if(PHYS_INPUT_BUTTON_ZOOM(actor) | PHYS_INPUT_BUTTON_ZOOMSCRIPT(actor)) // if zoomed, shoot from the eye
{
makevectors(actor.v_angle);
W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_SEEKER_FIRE, CH_WEAPON_A, 0, ((m_target != NULL) ? thiswep.m_id | HITTYPE_SECONDARY : thiswep.m_id));
w_shotorg += f_diff;
- W_MuzzleFlash(actor, weaponentity, EFFECT_SEEKER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_SEEKER_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
//actor.detornator = false;
W_SetupShot_ProjectileSize(actor, weaponentity, '-2 -2 -2', '2 2 2', false, 2, SND_FLAC_FIRE, CH_WEAPON_A, WEP_CVAR(seeker, flac_damage), thiswep.m_id | HITTYPE_SECONDARY);
w_shotorg += f_diff;
- W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_HAGAR_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
missile = new(missile);
missile.owner = missile.realowner = actor;
if(lag && bullets > 0)
antilag_restore_all(actor);
- W_MuzzleFlash(actor, weaponentity, EFFECT_SHOTGUN_MUZZLEFLASH, MDL_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_SHOTGUN_MUZZLEFLASH, MDL_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir);
// casing code
if(autocvar_g_casings >= 1)
FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, vaporizer_damage, WEP_CVAR_PRI(vaporizer, force), 0, 0, 0, 0, thiswep.m_id);
// do this now, as goodhits is disabled below
- W_MuzzleFlash(actor, weaponentity, EFFECT_VORTEX_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_VORTEX_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
SendCSQCVaporizerBeamParticle(actor, damage_goodhits);
if(yoda && flying)
W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_CRYLINK_FIRE, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
while(counter < total)
{
W_SetupShot_ProjectileSize (actor, weaponentity, '0 0 -3', '0 0 -3', false, 2, SND_ELECTRO_FIRE2, CH_WEAPON_A, autocvar_g_rm_laser_damage, WEP_ELECTRO.m_id);
- W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_ELECTRO_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
while(counter < total)
{
actor.vortex_lasthit = damage_goodhits;
//beam and muzzle flash done on client
- W_MuzzleFlash(actor, weaponentity, EFFECT_VORTEX_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir * 1000);
+ W_MuzzleFlash(actor, weaponentity, EFFECT_VORTEX_MUZZLEFLASH, MDL_Null, w_shotorg, w_shotdir);
SendCSQCVortexBeamParticle(charge);
W_DecreaseAmmo(thiswep, actor, myammo, weaponentity);