#include "_all.qh"
#include "../common/movetypes/movetypes.qh"
+#include "../common/weapons/all.qh"
#include "prandom.qh"
#include "rubble.qh"
switch(self.state)
{
case 1:
- s = strcat("weapons/casings", itos(f), ".wav");
+ s = W_Sound(strcat("casings", itos(f)));
break;
default:
- s = strcat("weapons/brass", itos(f), ".wav");
+ s = W_Sound(strcat("brass", itos(f)));
break;
}
{
precache_model("models/casing_shell.mdl");
precache_model("models/casing_bronze.iqm");
- precache_sound("weapons/brass1.wav");
- precache_sound("weapons/brass2.wav");
- precache_sound("weapons/brass3.wav");
- precache_sound("weapons/casings1.wav");
- precache_sound("weapons/casings2.wav");
- precache_sound("weapons/casings3.wav");
+ precache_sound(W_Sound("brass1.wav"));
+ precache_sound(W_Sound("brass2.wav"));
+ precache_sound(W_Sound("brass3.wav"));
+ precache_sound(W_Sound("casings1.wav"));
+ precache_sound(W_Sound("casings2.wav"));
+ precache_sound(W_Sound("casings3.wav"));
}
// spiderbot
case DEATH_VH_SPID_MINIGUN:
string _snd;
- _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
+ _snd = W_Sound(strcat("ric", ftos(1 + rint(random() * 2))));
sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("spiderbot_minigun_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_SPID_ROCKET:
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("spiderbot_rocket_explode"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_SPID_DEATH:
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_WAKI_GUN:
- sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_WAKI_ROCKET:
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("wakizashi_rocket_explode"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_WAKI_DEATH:
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_RAPT_CANNON:
- sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_RAPT_FRAGMENT:
ang = vectoangles(vel);
RaptorCBShellfragToss(w_org, vel, ang + '0 0 1' * (120 * i));
}
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_RAPT_BOMB:
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_RAPT_DEATH:
- sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_VH_BUMB_GUN:
- sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("bigplasma_impact"), self.origin, w_backoff * 1000, 1);
break;
}
switch(w_deathtype)
{
case DEATH_TURRET_EWHEEL:
- sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("laser_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_TURRET_FLAC:
pointparticles(particleeffectnum("hagar_explode"), w_org, '0 0 0', 1);
- _snd = strcat("weapons/hagexp", ftos(1 + rint(random() * 2)), ".waw");
+ _snd = W_Sound(strcat("hagexp", ftos(1 + rint(random() * 2))));
sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
break;
case DEATH_TURRET_HK:
case DEATH_TURRET_WALK_ROCKET:
case DEATH_TURRET_HELLION:
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("rocket_explode"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_TURRET_MACHINEGUN:
case DEATH_TURRET_WALK_GUN:
- _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
+ _snd = W_Sound(strcat("ric", ftos(1 + rint(random() * 2))));
sound(self, CH_SHOTS, _snd, VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("machinegun_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_TURRET_PLASMA:
- sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
break;
case DEATH_TURRET_WALK_MELEE:
- sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTEN_MIN);
+ sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_MIN);
pointparticles(particleeffectnum("TE_SPARK"), self.origin, w_backoff * 1000, 1);
break;
precache_model("models/onslaught/ons_ray.md3");
precache_sound("onslaught/shockwave.wav");
- precache_sound("weapons/grenade_impact.wav");
- precache_sound("weapons/rocket_impact.wav");
+ precache_sound(W_Sound("grenade_impact"));
+ precache_sound(W_Sound("rocket_impact"));
precache_sound("onslaught/electricity_explode.wav");
generator_precached = true;
if(random() < 0.25)
{
te_explosion(self.origin);
- sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_TRIGGER, W_Sound("grenade_impact"), VOL_BASE, ATTEN_NORM);
}
// Particles
org = self.origin;
te_explosion(org);
pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
- sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_TRIGGER, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
}
self.move_time = time + 0.05;
self.drawmask = MASK_NORMAL;
break;
case ENT_CLIENT_ARC_BEAM:
- sound (self, CH_SHOTS_SINGLE, "weapons/lgbeam_fly.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS_SINGLE, W_Sound("lgbeam_fly"), VOL_BASE, ATTEN_NORM);
break;
}
}
void Hook_Precache()
{
- precache_sound("weapons/lgbeam_fly.wav");
+ precache_sound(W_Sound("lgbeam_fly"));
precache_model("models/hook.md3");
}
#include "../warpzonelib/mathlib.qh"
-#define TUBA_STARTNOTE(i, n) strcat("weapons/tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n), ".wav")
+#define TUBA_STARTNOTE(i, n) W_Sound(strcat("tuba", (i ? ftos(i) : ""), "_loopnote", ftos(n)))
const int TUBA_MIN = -18;
const int TUBA_MAX = 27;
case PROJECTILE_BUMBLE_GUN: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
case PROJECTILE_BUMBLE_BEAM: setmodel(self, "models/elaser.mdl");self.traileffect = particleeffectnum("TR_NEXUIZPLASMA"); break;
- case PROJECTILE_RPC: setmodel(self, "models/weapons/ok_rocket.md3");self.traileffect = particleeffectnum("TR_ROCKET"); break;
+ case PROJECTILE_RPC: setmodel(self, W_Model("ok_rocket"));self.traileffect = particleeffectnum("TR_ROCKET"); break;
default:
if(MUTATOR_CALLHOOK(Ent_Projectile, self))
if (Nade_FromProjectile(self.cnt) != NADE_TYPE_NULL)
{
- setmodel(self, "models/weapons/v_ok_grenade.md3");
+ setmodel(self, W_Model("v_ok_grenade"));
self.traileffect = particleeffectnum(Nade_TrailEffect(self.cnt, self.team));
break;
}
{
case PROJECTILE_ELECTRO:
// only new engines support sound moving with object
- loopsound(self, CH_SHOTS_SINGLE, "weapons/electro_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("electro_fly"), VOL_BASE, ATTEN_NORM);
self.mins = '0 0 -4';
self.maxs = '0 0 -4';
self.move_movetype = MOVETYPE_BOUNCE;
break;
case PROJECTILE_RPC:
case PROJECTILE_ROCKET:
- loopsound(self, CH_SHOTS_SINGLE, "weapons/rocket_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("rocket_fly"), VOL_BASE, ATTEN_NORM);
self.mins = '-3 -3 -3';
self.maxs = '3 3 3';
break;
break;
case PROJECTILE_NAPALM_FOUNTAIN:
case PROJECTILE_FIREBALL:
- loopsound(self, CH_SHOTS_SINGLE, "weapons/fireball_fly2.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("fireball_fly2"), VOL_BASE, ATTEN_NORM);
self.mins = '-16 -16 -16';
self.maxs = '16 16 16';
break;
case PROJECTILE_FIREMINE:
- loopsound(self, CH_SHOTS_SINGLE, "weapons/fireball_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("fireball_fly"), VOL_BASE, ATTEN_NORM);
self.move_movetype = MOVETYPE_BOUNCE;
self.move_touch = func_null;
self.mins = '-4 -4 -4';
self.maxs = '2 2 2';
break;
case PROJECTILE_SEEKER:
- loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("tag_rocket_fly"), VOL_BASE, ATTEN_NORM);
self.mins = '-4 -4 -4';
self.maxs = '4 4 4';
break;
case PROJECTILE_RAPTORCANNON:
break;
case PROJECTILE_SPIDERROCKET:
- loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("tag_rocket_fly"), VOL_BASE, ATTEN_NORM);
break;
case PROJECTILE_WAKIROCKET:
- loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("tag_rocket_fly"), VOL_BASE, ATTEN_NORM);
break;
/*
case PROJECTILE_WAKICANNON:
break;
case PROJECTILE_BUMBLE_GUN:
// only new engines support sound moving with object
- loopsound(self, CH_SHOTS_SINGLE, "weapons/electro_fly.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("electro_fly"), VOL_BASE, ATTEN_NORM);
self.mins = '0 0 -4';
self.maxs = '0 0 -4';
self.move_movetype = MOVETYPE_BOUNCE;
precache_model("models/tracer.mdl");
precache_model("models/sphere/sphere.md3");
- precache_model("models/weapons/v_ok_grenade.md3");
- precache_model("models/weapons/ok_rocket.md3");
+ precache_model(W_Model("v_ok_grenade"));
+ precache_model(W_Model("ok_rocket"));
- precache_sound("weapons/electro_fly.wav");
- precache_sound("weapons/rocket_fly.wav");
- precache_sound("weapons/fireball_fly.wav");
- precache_sound("weapons/fireball_fly2.wav");
- precache_sound("weapons/tag_rocket_fly.wav");
+ precache_sound(W_Sound("electro_fly"));
+ precache_sound(W_Sound("rocket_fly"));
+ precache_sound(W_Sound("fireball_fly"));
+ precache_sound(W_Sound("fireball_fly2"));
+ precache_sound(W_Sound("tag_rocket_fly"));
MUTATOR_CALLHOOK(PrecacheProjectiles);
}
{
precache_model("models/monsters/mage.dpm");
precache_sound (W_Sound("grenade_impact"));
- precache_sound ("weapons/tagexp1.wav");
+ precache_sound (W_Sound("tagexp1"));
return true;
}
}
{
float i;
- sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
for (i = 1; i < 5; i = i + 1)
void turret_die()
{
- sound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound (self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
if (!autocvar_cl_nogibs)
{
void turrets_common_precache()
{
- precache_sound ("weapons/rocket_impact.wav");
+ precache_sound (W_Sound("rocket_impact"));
precache_model ("models/turrets/base-gib1.md3");
precache_model ("models/turrets/base-gib2.md3");
precache_model ("models/turrets/base-gib3.md3");
}
#endif
-#ifdef SVQC
string W_Sound(string w_snd)
{
string output = strcat("weapons/", w_snd, ".wav");
+#ifdef SVQC
MUTATOR_CALLHOOK(WeaponSound, w_snd, output);
+#endif
return output;
}
string W_Model(string w_mdl)
{
string output = strcat("models/weapons/", w_mdl);
+#ifdef SVQC
MUTATOR_CALLHOOK(WeaponModel, w_mdl, output);
+#endif
return output;
}
-#endif
#endif
int GetAmmoStat(.int ammotype);
#endif
-#ifdef SVQC
string W_Sound(string w_snd);
string W_Model(string w_mdl);
-#endif
// ammo types
.int ammo_shells;
this.bot_pickupbasevalue = pickupbasevalue;
this.wpcolor = clr;
this.mdl = modelname;
- #ifdef SVQC
this.model = strzone(W_Model(strcat("g_", modelname, ".md3")));
- #elif defined(CSQC)
- this.model = strzone(strcat("models/weapons/g_", modelname, ".md3"));
- #endif
this.w_simplemdl = strzone(simplemdl); // simpleitems weapon model/image
this.w_crosshair = strzone(car(crosshair));
string s = cdr(crosshair);
self.draw = Draw_ArcBeam;
self.entremove = Remove_ArcBeam;
self.move_time = time;
- loopsound(self, CH_SHOTS_SINGLE, "weapons/arc_loop.wav", VOL_BASE, ATTEN_NORM);
+ loopsound(self, CH_SHOTS_SINGLE, W_Sound("arc_loop"), VOL_BASE, ATTEN_NORM);
flash = spawn();
flash.owner = self;
}
case WR_INIT:
{
- precache_sound("weapons/arc_loop.wav");
+ precache_sound(W_Sound("arc_loop"));
return true;
}
case WR_ZOOMRETICLE:
vector org2;
org2 = w_org + w_backoff * 6;
pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
- if(!w_issilent) { sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); }
+ if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
return true;
}
case WR_INIT:
{
- precache_sound("weapons/laserimpact.wav");
+ precache_sound(W_Sound("laserimpact"));
return true;
}
case WR_ZOOMRETICLE:
{
pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("crylink_impact2"), VOL_BASE, ATTN_NORM);
}
else
{
pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("crylink_impact"), VOL_BASE, ATTN_NORM);
}
return true;
}
case WR_INIT:
{
- precache_sound("weapons/crylink_impact2.wav");
- precache_sound("weapons/crylink_impact.wav");
+ precache_sound(W_Sound("crylink_impact2"));
+ precache_sound(W_Sound("crylink_impact"));
return true;
}
case WR_ZOOMRETICLE:
org2 = w_org + w_backoff * 12;
pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/rocket_impact.wav");
+ precache_sound(W_Sound("rocket_impact"));
return true;
}
case WR_ZOOMRETICLE:
{
pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
}
else
{
// this is sent as "primary (w_deathtype & HITTYPE_BOUNCE)" to distinguish it from (w_deathtype & HITTYPE_SECONDARY) bounced balls
pointparticles(particleeffectnum("electro_combo"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/electro_impact_combo.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("electro_impact_combo"), VOL_BASE, ATTEN_NORM);
}
else
{
pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("electro_impact"), VOL_BASE, ATTEN_NORM);
}
}
}
case WR_INIT:
{
- precache_sound("weapons/electro_impact.wav");
- precache_sound("weapons/electro_impact_combo.wav");
+ precache_sound(W_Sound("electro_impact"));
+ precache_sound(W_Sound("electro_impact_combo"));
return true;
}
case WR_ZOOMRETICLE:
org2 = w_org + w_backoff * 16;
pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTEN_NORM * 0.25); // long range boom
+ sound(self, CH_SHOTS, W_Sound("fireball_impact2"), VOL_BASE, ATTEN_NORM * 0.25); // long range boom
}
return true;
}
case WR_INIT:
{
- precache_sound("weapons/fireball_impact2.wav");
+ precache_sound(W_Sound("fireball_impact2"));
return true;
}
case WR_ZOOMRETICLE:
if(!w_issilent)
{
if(w_random<0.15)
- sound(self, CH_SHOTS, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("hagexp1"), VOL_BASE, ATTN_NORM);
else if(w_random<0.7)
- sound(self, CH_SHOTS, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("hagexp2"), VOL_BASE, ATTN_NORM);
else
- sound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("hagexp3"), VOL_BASE, ATTN_NORM);
}
return true;
}
case WR_INIT:
{
- precache_sound("weapons/hagexp1.wav");
- precache_sound("weapons/hagexp2.wav");
- precache_sound("weapons/hagexp3.wav");
+ precache_sound(W_Sound("hagexp1"));
+ precache_sound(W_Sound("hagexp2"));
+ precache_sound(W_Sound("hagexp3"));
return true;
}
case WR_ZOOMRETICLE:
org2 = w_org + w_backoff * 6;
pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/laserimpact.wav");
+ precache_sound(W_Sound("laserimpact"));
return true;
}
case WR_ZOOMRETICLE:
pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
if(!w_issilent)
if(w_random < 0.05)
- sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_NORM);
else if(w_random < 0.1)
- sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric2"), VOL_BASE, ATTEN_NORM);
else if(w_random < 0.2)
- sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric3"), VOL_BASE, ATTEN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/ric1.wav");
- precache_sound("weapons/ric2.wav");
- precache_sound("weapons/ric3.wav");
+ precache_sound(W_Sound("ric1"));
+ precache_sound(W_Sound("ric2"));
+ precache_sound(W_Sound("ric3"));
return true;
}
case WR_ZOOMRETICLE:
org2 = w_org + w_backoff * 2;
pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("hookbomb_impact"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/hookbomb_impact.wav");
+ precache_sound(W_Sound("hookbomb_impact"));
return true;
}
case WR_ZOOMRETICLE:
}
case WR_RELOAD:
{
- W_Reload(min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), "weapons/reload.wav");
+ W_Reload(min(max(WEP_CVAR(machinegun, sustained_ammo), WEP_CVAR(machinegun, first_ammo)), WEP_CVAR(machinegun, burst_ammo)), W_Sound("reload"));
return true;
}
case WR_SUICIDEMESSAGE:
pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
if(!w_issilent)
if(w_random < 0.05)
- sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTN_NORM);
else if(w_random < 0.1)
- sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric2"), VOL_BASE, ATTN_NORM);
else if(w_random < 0.2)
- sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric3"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/ric1.wav");
- precache_sound("weapons/ric2.wav");
- precache_sound("weapons/ric3.wav");
+ precache_sound(W_Sound("ric1"));
+ precache_sound(W_Sound("ric2"));
+ precache_sound(W_Sound("ric3"));
return true;
}
case WR_ZOOMRETICLE:
org2 = w_org + w_backoff * 12;
pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/mine_exp.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("mine_exp"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/mine_exp.wav");
+ precache_sound(W_Sound("mine_exp"));
return true;
}
case WR_ZOOMRETICLE:
org2 = w_org + w_backoff * 12;
pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("grenade_impact"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/grenade_impact.wav");
+ precache_sound(W_Sound("grenade_impact"));
return true;
}
case WR_ZOOMRETICLE:
if(!w_issilent)
{
if(w_random < 0.2)
- sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTN_NORM);
else if(w_random < 0.4)
- sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric2"), VOL_BASE, ATTN_NORM);
else if(w_random < 0.5)
- sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric3"), VOL_BASE, ATTN_NORM);
}
return true;
}
case WR_INIT:
{
- precache_sound("weapons/ric1.wav");
- precache_sound("weapons/ric2.wav");
- precache_sound("weapons/ric3.wav");
+ precache_sound(W_Sound("ric1"));
+ precache_sound(W_Sound("ric2"));
+ precache_sound(W_Sound("ric3"));
if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
{
precache_pic("gfx/reticle_nex");
org2 = w_org + w_backoff * 12;
pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("rocket_impact"), VOL_BASE, ATTEN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/rocket_impact.wav");
+ precache_sound(W_Sound("rocket_impact"));
return true;
}
case WR_ZOOMRETICLE:
if(w_deathtype & HITTYPE_SECONDARY)
{
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("tag_impact"), 1, ATTEN_NORM);
}
else
{
if(!w_issilent)
{
if(w_random<0.15)
- sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("tagexp1"), 1, ATTEN_NORM);
else if(w_random<0.7)
- sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("tagexp2"), 1, ATTEN_NORM);
else
- sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("tagexp3"), 1, ATTEN_NORM);
}
}
}
if(!w_issilent)
{
if(w_random<0.15)
- sound(self, CH_SHOTS, "weapons/seekerexp1.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("seekerexp1"), 1, ATTEN_NORM);
else if(w_random<0.7)
- sound(self, CH_SHOTS, "weapons/seekerexp2.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("seekerexp2"), 1, ATTEN_NORM);
else
- sound(self, CH_SHOTS, "weapons/seekerexp3.wav", 1, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("seekerexp3"), 1, ATTEN_NORM);
}
}
return true;
}
case WR_INIT:
{
- precache_sound("weapons/seekerexp1.wav");
- precache_sound("weapons/seekerexp2.wav");
- precache_sound("weapons/seekerexp3.wav");
- precache_sound("weapons/tagexp1.wav");
- precache_sound("weapons/tagexp2.wav");
- precache_sound("weapons/tagexp3.wav");
- precache_sound("weapons/tag_impact.wav");
+ precache_sound(W_Sound("seekerexp1"));
+ precache_sound(W_Sound("seekerexp2"));
+ precache_sound(W_Sound("seekerexp3"));
+ precache_sound(W_Sound("tagexp1"));
+ precache_sound(W_Sound("tagexp2"));
+ precache_sound(W_Sound("tagexp3"));
+ precache_sound(W_Sound("tag_impact"));
return true;
}
case WR_ZOOMRETICLE:
}
case WR_INIT:
{
- //precache_sound("weapons/ric1.wav");
- //precache_sound("weapons/ric2.wav");
- //precache_sound("weapons/ric3.wav");
+ //precache_sound(W_Sound("ric1"));
+ //precache_sound(W_Sound("ric2"));
+ //precache_sound(W_Sound("ric3"));
return false;
}
case WR_ZOOMRETICLE:
if(!w_issilent && time - self.prevric > 0.25)
{
if(w_random < 0.0165)
- sound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric1"), VOL_BASE, ATTEN_NORM);
else if(w_random < 0.033)
- sound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric2"), VOL_BASE, ATTEN_NORM);
else if(w_random < 0.05)
- sound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTEN_NORM);
+ sound(self, CH_SHOTS, W_Sound("ric3"), VOL_BASE, ATTEN_NORM);
self.prevric = time;
}
}
case WR_INIT:
{
- precache_sound("weapons/ric1.wav");
- precache_sound("weapons/ric2.wav");
- precache_sound("weapons/ric3.wav");
+ precache_sound(W_Sound("ric1"));
+ precache_sound(W_Sound("ric2"));
+ precache_sound(W_Sound("ric3"));
return true;
}
case WR_ZOOMRETICLE:
if(w_deathtype & HITTYPE_SECONDARY)
{
pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
- if(!w_issilent) { sound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM); }
+ if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("laserimpact"), VOL_BASE, ATTN_NORM); }
}
else
{
pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
- if(!w_issilent) { sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM); }
+ if(!w_issilent) { sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM); }
}
return true;
}
case WR_INIT:
{
- precache_sound("weapons/laserimpact.wav");
- precache_sound("weapons/neximpact.wav");
+ precache_sound(W_Sound("laserimpact"));
+ precache_sound(W_Sound("neximpact"));
if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
{
precache_pic("gfx/reticle_nex");
org2 = w_org + w_backoff * 6;
pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
if(!w_issilent)
- sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_SHOTS, W_Sound("neximpact"), VOL_BASE, ATTN_NORM);
return true;
}
case WR_INIT:
{
- precache_sound("weapons/neximpact.wav");
+ precache_sound(W_Sound("neximpact"));
if(autocvar_cl_reticle && autocvar_cl_reticle_weapon)
{
precache_pic("gfx/reticle_nex");