]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add an additional arg to the W_SetupShot* functions for adjusting the sound channel...
authorFruitieX <fruitiex@gmail.com>
Thu, 25 Nov 2010 14:46:26 +0000 (16:46 +0200)
committerFruitieX <fruitiex@gmail.com>
Thu, 25 Nov 2010 14:46:26 +0000 (16:46 +0200)
21 files changed:
qcsrc/server/cheats.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/nexball.qc
qcsrc/server/w_campingrifle.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_electro.qc
qcsrc/server/w_fireball.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_hlac.qc
qcsrc/server/w_hook.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_porto.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_seeker.qc
qcsrc/server/w_shotgun.qc
qcsrc/server/w_tuba.qc
qcsrc/server/w_uzi.qc

index 8d837b801453091e65b6443b00ea3a1ed4991721..0104f89b3f2bcfe5742fc0abb5ee6582880d5642 100644 (file)
@@ -303,7 +303,7 @@ float CheatCommand(float argc)
                                // arguments:
                                //   effectname
                                effectnum = particleeffectnum(argv(1));
-                               W_SetupShot(self, FALSE, FALSE, "",0);
+                               W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, MOVE_NORMAL, self);
                                trailparticles(self, effectnum, w_shotorg, trace_endpos);
                                DID_CHEAT();
@@ -318,7 +318,7 @@ float CheatCommand(float argc)
                                // arguments:
                                //   modelname mode
                                f = stof(argv(2));
-                               W_SetupShot(self, FALSE, FALSE, "", 0);
+                               W_SetupShot(self, FALSE, FALSE, "", CHAN_WEAPON, 0);
                                traceline(w_shotorg, w_shotorg + w_shotdir * 2048, MOVE_NORMAL, self);
                                if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT) || trace_fraction == 1)
                                {
index 271dff6291e551d75075d3eefc84db9d3bf32efc..5bfad53530b8b7446c14c33ef4fdaca68510f41c 100644 (file)
@@ -132,7 +132,7 @@ vector w_shotend;
 // make sure you call makevectors first (FIXME?)
 .float prevstrengthsound;
 .float prevstrengthsoundattempt;
-void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float maxdamage, float range)
+void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector mi, vector ma, float antilag, float recoil, string snd, float chan, float maxdamage, float range)
 {
        float nudge = 1; // added to traceline target and subtracted from result
        local float oldsolid;
@@ -237,7 +237,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                ent.punchangle_x = recoil * -1;
 
        if (snd != "")
-               sound (ent, CHAN_WEAPON, snd, VOL_BASE, ATTN_NORM);
+               sound (ent, chan, snd, VOL_BASE, ATTN_NORM);
 
        if(ent.items & IT_STRENGTH)
        if(!g_minstagib)
@@ -256,11 +256,11 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
        w_shotend = w_shotend + normalize(w_shotend - w_shotorg) * nudge;
 };
 
-#define W_SetupShot_Dir_ProjectileSize(ent,s_forward,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, s_forward, mi, ma, antilag, recoil, snd, maxdamage, MAX_SHOT_DISTANCE)
-#define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, maxdamage)
-#define W_SetupShot_Dir(ent,s_forward,antilag,recoil,snd,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
-#define W_SetupShot(ent,antilag,recoil,snd,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
-#define W_SetupShot_Range(ent,antilag,recoil,snd,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage, range)
+#define W_SetupShot_Dir_ProjectileSize(ent,s_forward,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize_Range(ent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, MAX_SHOT_DISTANCE)
+#define W_SetupShot_ProjectileSize(ent,mi,ma,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot_Dir(ent,s_forward,antilag,recoil,snd,chan,maxdamage) W_SetupShot_Dir_ProjectileSize(ent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot(ent,antilag,recoil,snd,chan,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage)
+#define W_SetupShot_Range(ent,antilag,recoil,snd,chan,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range)
 
 float CL_Weaponentity_CustomizeEntityForClient()
 {
index ff9cfd35533013241403bc372078fd184f6bb30f..eb2bed54bd32ab7f55d1710d14427aaae72b24e8 100644 (file)
@@ -630,7 +630,7 @@ void W_Nexball_Attack (float t)
        if (!(ball = self.ballcarried))
                return;
 
-       W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav",0);
+       W_SetupShot (self, FALSE, 4, "nexball/shoot1.wav", CHAN_WEAPON, 0);
        tracebox(w_shotorg, BALL_MINS, BALL_MAXS, w_shotorg, MOVE_WORLDONLY, world);
        if(trace_startsolid)
        {
@@ -661,7 +661,7 @@ void W_Nexball_Attack2 (void)
        local entity missile;
        if (!(balls & BALL_BASKET))
                return;
-       W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav",0);
+       W_SetupShot (self, FALSE, 2, "nexball/shoot2.wav", CHAN_WEAPON, 0);
 //     pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
        missile = spawn ();
 
index 4a1919d23a4cc428b6984e668ade514013d1fcf0..309717305052fefb239085d85a8ed1ff41b5b103 100644 (file)
@@ -84,9 +84,9 @@ void W_CampingRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAdde
                self.ammo_nails -= pAmmo;
 
        if(deathtype & HITTYPE_SECONDARY)
-               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire2.wav", cvar("g_balance_campingrifle_secondary_damage") + cvar("g_balance_campingrifle_secondary_headshotaddeddamage"));
+               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire2.wav", CHAN_WEAPON, cvar("g_balance_campingrifle_secondary_damage") + cvar("g_balance_campingrifle_secondary_headshotaddeddamage"));
        else
-               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire.wav", cvar("g_balance_campingrifle_primary_damage") + cvar("g_balance_campingrifle_primary_headshotaddeddamage"));
+               W_SetupShot (self, cvar("g_antilag_bullets") && pSpeed >= cvar("g_antilag_bullets"), 2, "weapons/campingrifle_fire.wav", CHAN_WEAPON, cvar("g_balance_campingrifle_primary_damage") + cvar("g_balance_campingrifle_primary_headshotaddeddamage"));
 
        pointparticles(particleeffectnum("shotgun_muzzleflash"), w_shotorg, w_shotdir * 2000, 1);
 
index 5a6910c8682baa61b2a8efc08117e29eeb04fde2..092cb10e49b389c7a5ffa0610b7904ac8d19bbb6 100644 (file)
@@ -327,7 +327,7 @@ void W_Crylink_Attack (void)
        if(cvar("g_balance_crylink_primary_joinexplode"))
                maxdmg += cvar("g_balance_crylink_primary_joinexplode_damage");
 
-       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", maxdmg);
+       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire.wav", CHAN_WEAPON, maxdmg);
        forward = v_forward;
        right = v_right;
        up = v_up;
@@ -429,7 +429,7 @@ void W_Crylink_Attack2 (void)
        if(cvar("g_balance_crylink_secondary_joinexplode"))
                maxdmg += cvar("g_balance_crylink_secondary_joinexplode_damage");
 
-       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", maxdmg);
+       W_SetupShot (self, FALSE, 2, "weapons/crylink_fire2.wav", CHAN_WEAPON, maxdmg);
 
        shots = cvar("g_balance_crylink_secondary_shots");
        pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
index 225fc69132aceaea6eb31dd72069f729a1674a00..11f97f07062ed16e4253914f98802642c3b7d29e 100644 (file)
@@ -110,7 +110,7 @@ void W_Electro_Attack()
 {
        local entity proj;
 
-       W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", cvar("g_balance_electro_primary_damage"));
+       W_SetupShot_ProjectileSize (self, '0 0 -3', '0 0 -3', FALSE, 2, "weapons/electro_fire.wav", CHAN_WEAPON, cvar("g_balance_electro_primary_damage"));
 
        pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -147,8 +147,8 @@ void W_Electro_Attack2()
 {
        local entity proj;
 
-       W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "", cvar("g_balance_electro_secondary_damage"));
-       sound(self, CHAN_WEAPON2, "weapons/electro_fire2.wav", VOL_BASE, ATTN_NORM);
+       W_SetupShot_ProjectileSize (self, '0 0 -4', '0 0 -4', FALSE, 2, "weapons/electro_fire2.wav", CHAN_WEAPON, cvar("g_balance_electro_secondary_damage"));
+
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("electro_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -255,7 +255,7 @@ void lgbeam_think()
                }
        }
 
-       W_SetupShot_Range(self.owner, TRUE, 0, "", cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
+       W_SetupShot_Range(self.owner, TRUE, 0, "", 0, cvar("g_balance_electro_primary_damage") * dt, cvar("g_balance_electro_primary_range"));
        WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
 
        // apply the damage
index 3905ac95f37ae9e6c7245f83832b912dec4412e2..b0ccd4e6d7ee61118537199a89788372bd343096 100644 (file)
@@ -127,7 +127,7 @@ void W_Fireball_Attack1()
 {
        local entity proj;
 
-       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", cvar("g_balance_fireball_primary_damage") + cvar("g_balance_fireball_primary_bfgdamage"));
+       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 2, "weapons/fireball_fire2.wav", CHAN_WEAPON, cvar("g_balance_fireball_primary_damage") + cvar("g_balance_fireball_primary_bfgdamage"));
 
        pointparticles(particleeffectnum("fireball_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -163,7 +163,7 @@ void W_Fireball_Attack1()
 
 void W_Fireball_AttackEffect(float i, vector f_diff)
 {
-       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0);
+       W_SetupShot_ProjectileSize (self, '-16 -16 -16', '16 16 16', FALSE, 0, "", 0, 0);
        w_shotorg += f_diff_x * v_up + f_diff_y * v_right;
        pointparticles(particleeffectnum("fireball_preattack_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 }
@@ -266,7 +266,7 @@ void W_Fireball_Attack2()
                        f_diff = '+1.25 +3.75 0';
                        break;
        }
-       W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", cvar("g_balance_fireball_secondary_damage"));
+       W_SetupShot_ProjectileSize(self, '-4 -4 -4', '4 4 4', FALSE, 2, "weapons/fireball_fire.wav", CHAN_WEAPON, cvar("g_balance_fireball_secondary_damage"));
        traceline(w_shotorg, w_shotorg + f_diff_x * v_up + f_diff_y * v_right, MOVE_NORMAL, self);
        w_shotorg = trace_endpos;
 
index 75d3d7e7bb8925c55d36ce8f114e26e25cda6dba..cab8f49505c927d15a6325879a71c36e35191aa0 100644 (file)
@@ -163,7 +163,7 @@ void W_Grenade_Attack (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_primary_ammo");
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_primary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_primary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
@@ -210,7 +210,7 @@ void W_Grenade_Attack2 (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_grenadelauncher_secondary_ammo");
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", cvar("g_balance_grenadelauncher_secondary_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 4, "weapons/grenade_fire.wav", CHAN_WEAPON, cvar("g_balance_grenadelauncher_secondary_damage"));
        w_shotdir = v_forward; // no TrueAim for grenades please
 
        pointparticles(particleeffectnum("grenadelauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
index 587c9fccc04b4a2de5528d23aa394f63dda06ec0..d5b2592e2ed34fe1ea9f8e003fc04764ccc8e649 100644 (file)
@@ -46,7 +46,7 @@ void W_Hagar_Attack (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_primary_ammo");
-       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_primary_damage"));
+       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_primary_damage"));
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -81,8 +81,7 @@ void W_Hagar_Attack2 (void)
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_hagar_secondary_ammo");
-       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", cvar("g_balance_hagar_secondary_damage"));
-       //W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav"); // TODO: move model a little to the right
+       W_SetupShot (self, FALSE, 2, "weapons/hagar_fire.wav", CHAN_WEAPON, cvar("g_balance_hagar_secondary_damage"));
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
index 6aaf174147142b1f70212fd276274cbec9c5c053..a92727fbeec7024c21f7a749e939a676ca53a845 100644 (file)
@@ -40,7 +40,7 @@ void W_HLAC_Attack (void)
     if(self.crouch)
         spread = spread * cvar("g_balance_hlac_primary_spread_crouchmod");
 
-       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_hlac_primary_damage"));
+       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON, cvar("g_balance_hlac_primary_damage"));
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
        if (!g_norecoil)
        {
@@ -89,7 +89,7 @@ void W_HLAC_Attack2f (void)
     if(self.crouch)
         spread = spread * cvar("g_balance_hlac_secondary_spread_crouchmod");
 
-       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_hlac_secondary_damage"));
+       W_SetupShot (self, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON, cvar("g_balance_hlac_secondary_damage"));
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn ();
index 334e434c8afa9526774aab288d2ad2dfcbfa6dd5..5b1cf61350a1421b379f2a5f52846bc253e3365b 100644 (file)
@@ -64,7 +64,7 @@ void W_Hook_Attack2()
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_cells = self.ammo_cells - cvar("g_balance_hook_secondary_ammo");
-       W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", cvar("g_balance_hook_secondary_damage"));
+       W_SetupShot (self, FALSE, 4, "weapons/hookbomb_fire.wav", CHAN_WEAPON, cvar("g_balance_hook_secondary_damage"));
 
        gren = spawn ();
        gren.owner = self;
index 022788adc04a8a4ccdce7b33f0d8aee02741e88e..f743c426dfb32e0e11e9a58150d36bfea1ee6430 100644 (file)
@@ -44,11 +44,11 @@ void W_Laser_Attack (float issecondary)
        s_forward = v_forward * cos(a * DEG2RAD) + v_up * sin(a * DEG2RAD);
 
        if(nodamage)
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", 0);
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, 0);
        else if(issecondary == 1)
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_secondary_damage"));
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_secondary_damage"));
        else
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", cvar("g_balance_laser_primary_damage"));
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, cvar("g_balance_laser_primary_damage"));
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn ();
@@ -139,7 +139,7 @@ void gauntletbeam_think()
        float dt;
        dt = frametime;
 
-       W_SetupShot_Range(self.owner, TRUE, 0, "", damage * dt, myradius);
+       W_SetupShot_Range(self.owner, TRUE, 0, "", 0, damage * dt, myradius);
        WarpZone_traceline_antilag(self.owner, w_shotorg, w_shotend, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
 
        // apply the damage
index 135073bf55c8333b0098f19220dff399f7041581..0a06064632deae27be38ad60391fd434326c480a 100644 (file)
@@ -217,7 +217,7 @@ void W_Mine_Attack (void)
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_minelayer_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", cvar("g_balance_minelayer_damage"));
+       W_SetupShot_ProjectileSize (self, '-4 -4 -4', '4 4 4', FALSE, 5, "weapons/mine_fire.wav", CHAN_WEAPON, cvar("g_balance_minelayer_damage"));
        pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        mine = WarpZone_RefSys_SpawnSameRefSys(self);
index f1d9df9cbd831f888cc39463649494e940904c86..ce97b02451210d7db63a342db4eb03254e98b2b8 100644 (file)
@@ -9,7 +9,7 @@ void W_MinstaNex_Attack (void)
        float flying;
        flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
 
-       W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", 10000);
+       W_SetupShot (self, TRUE, 0, "weapons/minstanexfire.wav", CHAN_WEAPON, 10000);
 
        yoda = 0;
        damage_goodhits = 0;
index 31998e5092a632d0a30ceaae5c2f88847e3e6d54..61f4dc2929feacf92f54270c8c185171aac8e666 100644 (file)
@@ -54,7 +54,7 @@ void W_Nex_Attack (float issecondary)
        mydmg *= charge;
        myforce *= charge;
 
-       W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg);
+       W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
 
        yoda = 0;
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
index 65442b21b957caa3b667202c422d9add5497e82b..fc7fde3fb8d0e623991cfb4c95df67d6f389e9d2 100644 (file)
@@ -160,7 +160,7 @@ void W_Porto_Attack (void)
 
        if not(self.items & IT_UNLIMITED_SUPERWEAPONS)
                self.weapons = self.weapons - (self.weapons & WEPBIT_PORTO);
-       W_SetupShot (self, FALSE, 4, "porto/fire.wav", 0);
+       W_SetupShot (self, FALSE, 4, "porto/fire.wav", CHAN_WEAPON, 0);
        // always shoot from the eye
        w_shotdir = v_forward;
        w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
index c29fda3a2af78575b5d18b9acfbe5db1ce57a425..b42a4482899571dbf2967c8519855f3478e8b59c 100644 (file)
@@ -262,7 +262,7 @@ void W_Rocket_Attack (void)
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_rocketlauncher_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", cvar("g_balance_rocketlauncher_damage"));
+       W_SetupShot_ProjectileSize (self, '-3 -3 -3', '3 3 3', FALSE, 5, "weapons/rocket_fire.wav", CHAN_WEAPON, cvar("g_balance_rocketlauncher_damage"));
        pointparticles(particleeffectnum("rocketlauncher_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = WarpZone_RefSys_SpawnSameRefSys(self);
index 3e479f621976cf52efb26270bb031cecd4b1c4a0..09c7ec85acd080acec35f836b77eb8c3cb8482ae 100644 (file)
@@ -164,7 +164,7 @@ void Seeker_Fire_Missile(vector f_diff)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_seeker_missile_ammo");
 
        makevectors(self.v_angle);
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", 0);
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CHAN_WEAPON, 0);
        w_shotorg += f_diff;
        pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
@@ -300,7 +300,7 @@ void Seeker_Fire_Tag()
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                self.ammo_rockets = self.ammo_rockets - cvar("g_balance_seeker_tag_ammo");
 
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", cvar("g_balance_seeker_missile_damage") * cvar("g_balance_seeker_missile_count"));
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CHAN_WEAPON, cvar("g_balance_seeker_missile_damage") * cvar("g_balance_seeker_missile_count"));
 
        missile                 = spawn();
        missile.owner           = self;
@@ -376,7 +376,7 @@ void Seeker_Fire_Flac()
                        f_diff = '+1.25 +3.75 0';
                        break;
        }
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", cvar("g_balance_seeker_flac_damage"));
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", CHAN_WEAPON, cvar("g_balance_seeker_flac_damage"));
        w_shotorg += f_diff;
 
        pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
index 573fb12068f04a84206e90642dd41e2996752fce..17bce7f77aa497020ff33486f38b47e0e30d834c 100644 (file)
@@ -22,7 +22,7 @@ void W_Shotgun_Attack (void)
        bulletspeed = cvar("g_balance_shotgun_primary_speed");
        bulletconstant = cvar("g_balance_shotgun_primary_bulletconstant");
 
-       W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", d * bullets);
+       W_SetupShot (self, cvar("g_antilag_bullets") && bulletspeed >= cvar("g_antilag_bullets"), 5, "weapons/shotgun_fire.wav", CHAN_WEAPON, d * bullets);
        for (sc = 0;sc < bullets;sc = sc + 1)
                fireBallisticBullet(w_shotorg, w_shotdir, spread, bulletspeed, 5, d, 0, f, WEP_SHOTGUN, 0, 1, bulletconstant);
        endFireBallisticBullet();
@@ -90,7 +90,7 @@ void W_Shotgun_Attack2 (void)
        meleetemp.owner = self;
        meleetemp.think = shotgun_meleethink;
        meleetemp.nextthink = time + cvar("g_balance_shotgun_secondary_melee_delay");
-       W_SetupShot_Range(self, TRUE, 0, "", cvar("g_balance_shotgun_secondary_damage"), cvar("g_balance_shotgun_secondary_melee_range"));
+       W_SetupShot_Range(self, TRUE, 0, "", 0, cvar("g_balance_shotgun_secondary_damage"), cvar("g_balance_shotgun_secondary_melee_range"));
 }
 
 void spawnfunc_weapon_shotgun(); // defined in t_items.qc
index 491030fcbcc486cfde1249c03d5d560e09b22bb4..c9cfdc4a49951c1f848394f1c727132717bb5490 100644 (file)
@@ -131,7 +131,7 @@ void W_Tuba_Attack(float hittype)
 {
        vector o;
        float c, n;
-       W_SetupShot(self, FALSE, 2, "", cvar("g_balance_tuba_damage"));
+       W_SetupShot(self, FALSE, 2, "", 0, cvar("g_balance_tuba_damage"));
        if(self.tuba_notecount)
        {
                self.tuba_notecount = FALSE;
index 4f85836149c7adadd54aee8f871b08642631b3b4..1b1ab55a211798be1c18930c55d3dad1cd7331ca 100644 (file)
@@ -50,7 +50,7 @@ void W_Uzi_Attack (float deathtype)
                else
                        self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_sustained_ammo");
        }
-       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", ((self.uzi_bulletcounter == 1) ? cvar("g_balance_uzi_first_damage") : cvar("g_balance_uzi_sustained_damage")));
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, ((self.uzi_bulletcounter == 1) ? cvar("g_balance_uzi_first_damage") : cvar("g_balance_uzi_sustained_damage")));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;
@@ -121,7 +121,7 @@ void uzi_mode1_fire_auto()
                return;
        }
        
-       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_sustained_damage"));
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, cvar("g_balance_uzi_sustained_damage"));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;
@@ -149,7 +149,7 @@ void uzi_mode1_fire_auto()
 
 void uzi_mode1_fire_burst()
 {
-       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_sustained_damage"));
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", CHAN_WEAPON, cvar("g_balance_uzi_sustained_damage"));
        if (!g_norecoil)
        {
                self.punchangle_x = random () - 0.5;