}
self = oldself;
-
- // TODO spawn particle effects and sounds based on w_deathtype
+ if(DEATH_ISVEHICLE(w_deathtype))
+ {
+ traceline(w_org - normalize(force) * 16, w_org + normalize(force) * 16, MOVE_NOMONSTERS, world);
+ if(trace_plane_normal != '0 0 0')
+ w_backoff = trace_plane_normal;
+ else
+ w_backoff = -1 * normalize(w_org - (w_org + normalize(force) * 16));
+
+ setorigin(self, w_org + w_backoff * 2); // for sound() calls
+
+ switch(w_deathtype)
+ {
+ case DEATH_VHCRUSH:
+ break;
+
+ case DEATH_SBMINIGUN:
+ string _snd;
+ _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
+ sound(self, CHAN_PROJECTILE, _snd, VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("spiderbot_minigun_impact"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_SBROCKET:
+ sound(self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("spiderbot_rocket_explode"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_SBBLOWUP:
+ sound(self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
+ pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+ break;
+
+ case DEATH_WAKIGUN:
+ sound(self, CHAN_PROJECTILE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_WAKIROCKET:
+ sound(self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("wakizashi_rocket_explode"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_WAKIBLOWUP:
+ sound(self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
+ pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+ break;
+
+ case DEATH_RAPTOR_CANNON:
+ sound(self, CHAN_PROJECTILE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_RAPTOR_BOMB_SPLIT:
+ sound(self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_RAPTOR_BOMB:
+ sound(self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, w_backoff * 1000, 1);
+ break;
+ case DEATH_RAPTOR_DEATH:
+ sound(self, CHAN_PROJECTILE, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
+ pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
+ break;
+ }
+ }
+
+ // TODO spawn particle effects and sounds based on w_deathtype
if(!DEATH_ISSPECIAL(w_deathtype))
{
float hitwep;
#define DEATH_WAKIBLOWUP 10036
#define DEATH_RAPTOR_CANNON 10037
#define DEATH_RAPTOR_BOMB 10038
-#define DEATH_RAPTOR_DEATH 10039
-#define DEATH_VHLAST 10039
-#define DEATH_ISVEHICLE(t) ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
+#define DEATH_RAPTOR_BOMB_SPLIT 10039
+#define DEATH_RAPTOR_DEATH 10040
+#define DEATH_VHLAST 10040
+#define DEATH_ISVEHICLE(t) ((t) >= DEATH_VHFIRST && (t) <= DEATH_VHLAST)
float DEATH_GENERIC = 10050;
entity bolt;
v = gettaginfo(self, gettagindex(self, tagname));
- bolt = vehicles_projectile("wakizashi_gun_impact", "weapons/laserimpact.wav", "wakizashi_gun_muzzleflash", "weapons/lasergun_fire.wav",
+ bolt = vehicles_projectile("wakizashi_gun_muzzleflash", "weapons/lasergun_fire.wav",
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_WAKIGUN, PROJECTILE_WAKICANNON, 0);
entity rocket;
v = gettaginfo(self, gettagindex(self, tagname));
- rocket = vehicles_projectile("wakizashi_rocket_explode", "weapons/rocket_impact.wav", "wakizashi_rocket_launch", "weapons/rocket_fire.wav",
+ rocket = vehicles_projectile("wakizashi_rocket_launch", "weapons/rocket_fire.wav",
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_WAKIROCKET, PROJECTILE_WAKIROCKET, 20);
void raptor_bomblet_boom()
{
- sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, trace_plane_normal * 1000, 1);
RadiusDamage (self, self.realowner, autocvar_g_vehicle_raptor_bomblet_damage,
autocvar_g_vehicle_raptor_bomblet_edgedamage,
autocvar_g_vehicle_raptor_bomblet_radius, world,
- autocvar_g_vehicle_raptor_bomblet_force, DEATH_SBROCKET, world);
+ autocvar_g_vehicle_raptor_bomblet_force, DEATH_RAPTOR_BOMB, world);
remove(self);
}
entity bomblet;
float i;
- sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, self.velocity, 1);
-
+ //sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ //pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, self.velocity, 1);
+
+ Damage_DamageInfo(self.origin, 0, 0, 0, '0 0 0', DEATH_RAPTOR_BOMB_SPLIT, self);
+
for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
{
bomblet = spawn();
entity bolt;
vector b_org;
b_org = gettaginfo(gun, gettagindex(gun, tagname));
- bolt = vehicles_projectile("raptor_cannon_impact", "weapons/laserimpact.wav", "raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav",
+ bolt = vehicles_projectile("raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav",
b_org, 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_WAKIGUN, PROJECTILE_RAPTORCANNON, 0);
+ DEATH_RAPTOR_CANNON, PROJECTILE_RAPTORCANNON, 0);
}
void raptor_think()
crosshair_trace(self.owner);
//normalize(v_forward + (v_up * 0.5) + randomvec() * 0.25) * autocvar_g_vehicle_spiderbot_rocket_speed,
v = gettaginfo(self.tur_head,gettagindex(self.tur_head,"tag_fire"));
- rocket = vehicles_projectile("spiderbot_rocket_explode", "weapons/rocket_impact.wav", "spiderbot_rocket_launch", "weapons/rocket_fire.wav",
+ rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
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_SBROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health);
sound (gun, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
- pointparticles(particleeffectnum("spiderbot_minigun_impact"), trace_endpos, trace_plane_normal * 2500,1);
+ //pointparticles(particleeffectnum("spiderbot_minigun_impact"), trace_endpos, trace_plane_normal * 2500,1);
}
}
}
}
-
#define VEHICLE_UPDATE_PLAYER(fld,vhname) \
self.owner.vehicle_##fld = self.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld
PROJECTILE_TOUCH;
self.event_damage = SUB_Null;
- sound (self, CHAN_PROJECTILE, self.target2, VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum(self.target3), findbetterlocation (self.origin, 16), '0 0 0', 1);
RadiusDamage (self, self.realowner, self.shot_dmg, 0, self.shot_radius, self, self.shot_force, self.totalfrags, other);
remove (self);
}
-entity vehicles_projectile(string _impactfx, string _impactsnd, string _mzlfx, string _mzlsound,
+entity vehicles_projectile(string _mzlfx, string _mzlsound,
vector _org, vector _vel,
float _dmg, float _radi, float _force, float _size,
float _deahtype, float _projtype, float _health)
proj.shot_radius = _radi;
proj.shot_force = _force;
proj.totalfrags = _deahtype;
- proj.target2 = _impactsnd;
- proj.target3 = _impactfx;
proj.solid = SOLID_BBOX;
proj.movetype = MOVETYPE_FLYMISSILE;
proj.flags = FL_PROJECTILE;
if ((trace_fraction != 1.0) && (pointcontents (trace_endpos) != CONTENT_SKY))
{
- if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
- Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, self);
+ if not (trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
+ Damage_DamageInfo(trace_endpos, damage, 0, 0, dir * max(1, force), dtype, self);
Damage (trace_ent, self, self, damage, dtype, trace_endpos, dir * force);
}