]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use the function in client code too
authorMario <zacjardine@y7mail.com>
Mon, 24 Aug 2015 06:51:38 +0000 (16:51 +1000)
committerMario <zacjardine@y7mail.com>
Mon, 24 Aug 2015 06:51:38 +0000 (16:51 +1000)
31 files changed:
qcsrc/client/casings.qc
qcsrc/client/damage.qc
qcsrc/client/generator.qc
qcsrc/client/hook.qc
qcsrc/client/tuba.qc
qcsrc/client/weapons/projectile.qc
qcsrc/common/monsters/monster/mage.qc
qcsrc/common/turrets/cl_turrets.qc
qcsrc/common/turrets/turrets.qc
qcsrc/common/weapons/all.qc
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/w_arc.qc
qcsrc/common/weapons/w_blaster.qc
qcsrc/common/weapons/w_crylink.qc
qcsrc/common/weapons/w_devastator.qc
qcsrc/common/weapons/w_electro.qc
qcsrc/common/weapons/w_fireball.qc
qcsrc/common/weapons/w_hagar.qc
qcsrc/common/weapons/w_hlac.qc
qcsrc/common/weapons/w_hmg.qc
qcsrc/common/weapons/w_hook.qc
qcsrc/common/weapons/w_machinegun.qc
qcsrc/common/weapons/w_minelayer.qc
qcsrc/common/weapons/w_mortar.qc
qcsrc/common/weapons/w_rifle.qc
qcsrc/common/weapons/w_rpc.qc
qcsrc/common/weapons/w_seeker.qc
qcsrc/common/weapons/w_shockwave.qc
qcsrc/common/weapons/w_shotgun.qc
qcsrc/common/weapons/w_vaporizer.qc
qcsrc/common/weapons/w_vortex.qc

index 8961af2241a34dc489001a1f867a9b1c924da694..09c2e685365f8915633d7c954e96d2af62dfd7ba 100644 (file)
@@ -2,6 +2,7 @@
 #include "_all.qh"
 
 #include "../common/movetypes/movetypes.qh"
+#include "../common/weapons/all.qh"
 #include "prandom.qh"
 #include "rubble.qh"
 
@@ -63,10 +64,10 @@ void Casing_Touch()
                                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;
                                }
 
@@ -145,10 +146,10 @@ void Casings_Precache()
 {
        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"));
 }
index 9479f5786ca6218b7550601328a10de72252dbd8..05d9dfe6fec0c5bbea2b1654f2a56c5ef871cfa7 100644 (file)
@@ -232,34 +232,34 @@ void Ent_DamageInfo(float isNew)
                        // 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:
@@ -271,19 +271,19 @@ void Ent_DamageInfo(float isNew)
                                        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;
                }
@@ -304,13 +304,13 @@ void Ent_DamageInfo(float isNew)
                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;
 
@@ -318,24 +318,24 @@ void Ent_DamageInfo(float isNew)
                         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;
 
index 0c2ce4681c28a3b12976dfdc1ed03b207bcd9ead..ed4b356817fdebf3c33002e62b299dccbc71a99e 100644 (file)
@@ -34,8 +34,8 @@ void generator_precache()
 
        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;
@@ -132,7 +132,7 @@ void generator_draw()
        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
@@ -145,7 +145,7 @@ void generator_draw()
                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;
index 2a9be2e0e26602faacaae72f8154aab64b61e487..3da79866d874a4926033db89cd349562d6566a99 100644 (file)
@@ -257,7 +257,7 @@ void Ent_ReadHook(float bIsNew, float type)
                                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;
                }
        }
@@ -267,7 +267,7 @@ void Ent_ReadHook(float bIsNew, float type)
 
 void Hook_Precache()
 {
-       precache_sound("weapons/lgbeam_fly.wav");
+       precache_sound(W_Sound("lgbeam_fly"));
        precache_model("models/hook.md3");
 }
 
index b9f372db9d9e128d64ecdfda23a2fc336aad33b3..0b300d3b2e17364b889d5939143cbdf9431a2e7e 100644 (file)
@@ -6,7 +6,7 @@
 
 #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;
index 1d0083e28e2ce7a40ac2b04981a390331943c25e..12f1714bfb6aaedb808c4af86f17ec37bcc72490 100644 (file)
@@ -315,7 +315,7 @@ void Ent_Projectile()
                        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))
@@ -323,7 +323,7 @@ void Ent_Projectile()
 
                                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;
                                }
@@ -342,7 +342,7 @@ void Ent_Projectile()
                {
                        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;
@@ -352,7 +352,7 @@ void Ent_Projectile()
                                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;
@@ -400,12 +400,12 @@ void Ent_Projectile()
                                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';
@@ -420,7 +420,7 @@ void Ent_Projectile()
                                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;
@@ -433,17 +433,17 @@ void Ent_Projectile()
             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;
@@ -516,14 +516,14 @@ void Projectile_Precache()
        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);
 }
index f6dcb022e763d949e51e0f6d3b3a1bd57baea5e4..e2258dbd4956c42e52529a862b238e249584c85e 100644 (file)
@@ -400,7 +400,7 @@ float m_mage(float req)
                {
                        precache_model("models/monsters/mage.dpm");
                        precache_sound (W_Sound("grenade_impact"));
-                       precache_sound ("weapons/tagexp1.wav");
+                       precache_sound (W_Sound("tagexp1"));
                        return true;
                }
        }
index f0b3bdf0e017dc178597b2e524c30eb8d6e6a26e..1e75506ab1e46636152fb064a771c156d013575e 100644 (file)
@@ -272,7 +272,7 @@ void turret_gibboom()
 {
        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)
@@ -318,7 +318,7 @@ entity turret_gibtoss(string _model, vector _from, vector _to, vector _cmod, flo
 
 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)
        {
index e37de95e672e919f598a39f8be124ce5a9fdbba9..46ecf5bf1d71c6021ec7b44feb4c4ec9dc09e141 100644 (file)
@@ -6,7 +6,7 @@ entity dummy_turret_info;
 
 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");
index 4dcb2d6e7c2446b006a960c862c7cfaa52421c9d..5ee9aaa3bd052c6b60c125ccd62a4495df5f0563 100644 (file)
@@ -331,20 +331,22 @@ int GetAmmoStat(.int ammotype)
 }
 #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
index e00b38c0154df658bf3284c401583cb2e411198b..081e13a7e58e64f4c5205d047b58fa8f3f7ea0d0 100644 (file)
@@ -90,10 +90,8 @@ string GetAmmoPicture(.int ammotype);
 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;
@@ -214,11 +212,7 @@ CLASS(Weapon, Object)
                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);
index 63a80c45ef8490ea03a45146877487c6d5c2b28e..893311441c82d5f0b6c52b453572e0857c518ef7 100644 (file)
@@ -1187,7 +1187,7 @@ void Ent_ReadArcBeam(float isnew)
                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;
@@ -1531,7 +1531,7 @@ bool W_Arc(int req)
                }
                case WR_INIT:
                {
-                       precache_sound("weapons/arc_loop.wav");
+                       precache_sound(W_Sound("arc_loop"));
                        return true;
                }
                case WR_ZOOMRETICLE:
index 85e78e7a8a6f930708fae455f982b7959aa1fc07..23cb071ea05bd980d079d70f3d65ff332741c3b8 100644 (file)
@@ -276,13 +276,13 @@ bool W_Blaster(int request)
                        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:
index c688b8ef2b548f42957c493e47996b492d5de48b..3c13a91db9c39bda54218489bc11b516e5c9bddf 100644 (file)
@@ -702,21 +702,21 @@ bool W_Crylink(int req)
                        {
                                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:
index 1591d2ed5694f9fdd48d57b6d91e04b4c58da335..e79e38461c4117d365fc666ed8ab0f05b9065d40 100644 (file)
@@ -666,13 +666,13 @@ bool W_Devastator(int req)
                        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:
index 2c614c771c046f70a765d4f423d28eb5edafed83..bfe6edc32a63a7f5d8b7fa0e0c3a5939ee1aae38 100644 (file)
@@ -582,7 +582,7 @@ bool W_Electro(int req)
                        {
                                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
                        {
@@ -591,13 +591,13 @@ bool W_Electro(int req)
                                        // 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);
                                }
                        }
 
@@ -605,8 +605,8 @@ bool W_Electro(int req)
                }
                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:
index 7ea22e07ff4ecef1ec378d853d851b16120cea3a..5f426086fac9f09994d519ed07da14fa9f3a2eb2 100644 (file)
@@ -464,14 +464,14 @@ bool W_Fireball(int req)
                                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:
index 2b1cb08c1cb6f079ace39844aeb718d93234f867..79c37abdca11b31fb16f252aa48fbfd8081bb3cb 100644 (file)
@@ -535,20 +535,20 @@ bool W_Hagar(int req)
                        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:
index d2428ffb4c7220e2ca4ceeeca91cd29bcb946023..ebcd5d2f179a776918891eaf8e572d0944468cc9 100644 (file)
@@ -293,13 +293,13 @@ bool W_HLAC(int req)
                        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:
index 2c315f1044d89f5166314c721558e062c6f91ca0..3af3a486409bd1d3fc14b24f4915bcfcd83158c7 100644 (file)
@@ -181,19 +181,19 @@ bool W_HeavyMachineGun(int req)
                        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:
index b877254c3d53740be925b358fb02b0470b7bb273..068805cf31656814cd39ef3893e22603e0c94ff4 100644 (file)
@@ -347,13 +347,13 @@ bool W_Hook(int req)
                        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:
index ac5bc2cb33d5b7c0506b35cafc443c1f9ea9aafd..cb87ad0725aa97b9f91a8ea6c63464b58c89dc5a 100644 (file)
@@ -351,7 +351,7 @@ bool W_MachineGun(int req)
                }
                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:
@@ -381,19 +381,19 @@ bool W_MachineGun(int req)
                        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:
index 61ae5362ab49262eb924f6cbc1e2e1192348f829..d8f0a48e3be1d2689e448e0dc0514ae688d028fc 100644 (file)
@@ -602,13 +602,13 @@ bool W_MineLayer(int req)
                        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:
index 1bea5edf7b244470f6c7f3828b9e93afc6762c18..64bd3d97c93c7cc95f59f427fee07b3a8d891964 100644 (file)
@@ -470,13 +470,13 @@ bool W_Mortar(int req)
                        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:
index 687a20cf4894e7f6cb26e1af3b20ccc296846f28..a879bf342330defec4aca88d858bf61446e6e577 100644 (file)
@@ -277,20 +277,20 @@ bool W_Rifle(int req)
                        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");
index f879fdd64f45d4b059cb6a57a545d687457f1f93..de051d9870a00404af4e817b8be4a26d952ee1a3 100644 (file)
@@ -243,13 +243,13 @@ bool W_RocketPropelledChainsaw(int req)
                        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:
index f94984daa3b265ca99703c28848e71663c3283bd..8d8a24194d6eb18da941774188c5cd8068f9abc6 100644 (file)
@@ -739,7 +739,7 @@ bool W_Seeker(int req)
                                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
                                {
@@ -747,11 +747,11 @@ bool W_Seeker(int req)
                                        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);
                                        }
                                }
                        }
@@ -761,24 +761,24 @@ bool W_Seeker(int req)
                                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:
index 1c5d080d3c38894761fc6b07a64fa755c19adaff..40faf04025ea6fd51d60e2c4b5cac01ad3f9c518 100644 (file)
@@ -879,9 +879,9 @@ bool W_Shockwave(int req)
                }
                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:
index 76738a98a604d701354c3108f6388045b4e86642..1c20423df3b4871551e57995599dbe36e785d363 100644 (file)
@@ -363,11 +363,11 @@ float W_Shotgun(float req)
                        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;
                        }
 
@@ -375,9 +375,9 @@ float W_Shotgun(float req)
                }
                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:
index 9e4f08d405b0cc61cb6fb8d0ecd307dbca9d0c9a..c5dd7826b6afa3cebf06773e09ad4de909deb3dc 100644 (file)
@@ -267,19 +267,19 @@ float W_Vaporizer(float req)
                        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");
index 616bf89d77902da0c6ecadb0afd2c29f9aa9ce4c..d47cebde462504361bf615f0fcf20589f70e116c 100644 (file)
@@ -329,13 +329,13 @@ bool W_Vortex(int req)
                        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");