EFFECT(0, EFFECT_LASER_MUZZLEFLASH, "laser_muzzleflash") \
EFFECT(0, EFFECT_MACHINEGUN_MUZZLEFLASH, "uzi_muzzleflash") \
EFFECT(0, EFFECT_RIFLE_MUZZLEFLASH, "rifle_muzzleflash") \
+ EFFECT(0, EFFECT_RAPTOR_MUZZLEFLASH, "raptor_cannon_muzzleflash") \
+ EFFECT(0, EFFECT_RACER_MUZZLEFLASH, "wakizashi_gun_muzzleflash") \
+ EFFECT(0, EFFECT_RACER_ROCKETLAUNCH, "wakizashi_rocket_launch") \
+ EFFECT(0, EFFECT_SPIDERBOT_ROCKETLAUNCH, "spiderbot_rocket_launch") \
+ EFFECT(0, EFFECT_BIGPLASMA_MUZZLEFLASH, "bigplasma_muzzleflash") \
EFFECT(1, EFFECT_RIFLE, "tr_rifle") \
EFFECT(1, EFFECT_RIFLE_WEAK, "tr_rifle_weak") \
EFFECT(0, EFFECT_SEEKER_MUZZLEFLASH, "seeker_muzzleflash") \
remove (self);
}
-entity vehicles_projectile(string _mzlfx, string _mzlsound,
+entity vehicles_projectile(int _mzlfx, string _mzlsound,
vector _org, vector _vel,
float _dmg, float _radi, float _force, float _size,
float _deahtype, float _projtype, float _health,
sound (self, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTEN_NORM);
if(_mzlfx)
- pointparticles(particleeffectnum(_mzlfx), proj.origin, proj.velocity, 1);
-
+ Send_Effect(_mzlfx, proj.origin, proj.velocity, 1);
setsize (proj, '-1 -1 -1' * _size, '1 1 1' * _size);
void bumblebee_fire_cannon(entity _gun, string _tagname, entity _owner)
{
vector v = gettaginfo(_gun, gettagindex(_gun, _tagname));
- vehicles_projectile("bigplasma_muzzleflash", W_Sound("flacexp3"),
+ vehicles_projectile(EFFECT_BIGPLASMA_MUZZLEFLASH, W_Sound("flacexp3"),
v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed,
autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force, 0,
DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, true, true, _owner);
entity bolt;
v = gettaginfo(self, gettagindex(self, tagname));
- bolt = vehicles_projectile("wakizashi_gun_muzzleflash", W_Sound("lasergun_fire"),
+ bolt = vehicles_projectile(EFFECT_RACER_MUZZLEFLASH, W_Sound("lasergun_fire"),
v, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed,
autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force, 0,
DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, true, true, self.owner);
void racer_fire_rocket(string tagname, entity trg)
{
vector v = gettaginfo(self, gettagindex(self, tagname));
- entity rocket = vehicles_projectile("wakizashi_rocket_launch", W_Sound("rocket_fire"),
+ entity rocket = vehicles_projectile(EFFECT_RACER_ROCKETLAUNCH, W_Sound("rocket_fire"),
v, v_forward * autocvar_g_vehicle_racer_rocket_speed,
autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3,
DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, false, false, self.owner);
void raptor_fire_cannon(entity gun, string tagname)
{
- vehicles_projectile("raptor_cannon_muzzleflash", W_Sound("lasergun_fire"),
+ vehicles_projectile(EFFECT_RAPTOR_MUZZLEFLASH, W_Sound("lasergun_fire"),
gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force, 0,
DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, true, true, self.owner);
switch(self.vehicle_weapon2mode)
{
case SBRM_VOLLY:
- rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+ rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH, W_Sound("rocket_fire"),
v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
self.wait = -10;
break;
case SBRM_GUIDE:
- rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+ rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH, W_Sound("rocket_fire"),
v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, false, self.owner);
break;
case SBRM_ARTILLERY:
- rocket = vehicles_projectile("spiderbot_rocket_launch", W_Sound("rocket_fire"),
+ rocket = vehicles_projectile(EFFECT_SPIDERBOT_ROCKETLAUNCH, W_Sound("rocket_fire"),
v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);