]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also get rid of CHAN_WEAPON2
authorRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 16:00:58 +0000 (18:00 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 16:00:58 +0000 (18:00 +0200)
qcsrc/server/bot/scripting.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/g_hook.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_hagar.qc
qcsrc/server/w_laser.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_tuba.qc

index ef25a958d21f8908545ad4c51ba32dfb11754818..a70e55bf643f7c1a375eb05d665e8a5a85d82e4f 100644 (file)
@@ -1061,7 +1061,7 @@ float bot_cmd_sound()
        f = bot_cmd.bot_cmd_parm_string;
 
        precache_sound(f);
-       sound(self, CHAN_WEAPON2, f, VOL_BASE, ATTN_MIN);
+       sound(self, CH_WEAPON_B, f, VOL_BASE, ATTN_MIN);
 
        return CMD_STATUS_FINISHED;
 }
index cab6ec6e75c5adcb56a8d7b07b417875a2a251c6..9e59a4c5554edb9205d74ea6549893aff2641b06 100644 (file)
@@ -374,8 +374,8 @@ void W_WeaponFrame()
                        if(ATTACK_FINISHED(self) <= time + self.weapon_frametime * 0.5)
                        {
 #endif
-                       // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
-                       sound (self, CHAN_WEAPON2, "weapons/weapon_switch.wav", VOL_BASE, ATTN_NORM);
+                       // UGLY WORKAROUND: play this on CH_WEAPON_B so it can't cut off fire sounds
+                       sound (self, CH_WEAPON_B, "weapons/weapon_switch.wav", VOL_BASE, ATTN_NORM);
                        self.weaponentity.state = WS_DROP;
                        // set up weapon switch think in the future, and start drop anim
                        weapon_thinkf(WFRAME_DONTCHANGE, autocvar_g_balance_weaponswitchdelay, w_clear);
index 7f6265f9027bfdce88fc48d245331f0a80aa1f83..8cf41bd2608d33e8b238b22ee6fe0ecd3a7fb1e7 100644 (file)
@@ -1733,7 +1733,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
 
        // now begin the reloading process
 
-       sound (self, CHAN_WEAPON2, self.reload_sound, VOL_BASE, ATTN_NORM);
+       sound (self, CH_WEAPON_B, self.reload_sound, VOL_BASE, ATTN_NORM);
 
        // do not set ATTACK_FINISHED in reload code any more. This causes annoying delays if eg: You start reloading a weapon,
        // then quickly switch to another weapon and back. Reloading is canceled, but the reload delay is still there,
index 64fa049db8a5112d02116214b05ef6dbd5e256b5..0437f804328410e2ebb609443c80d451c552241b 100644 (file)
@@ -299,8 +299,8 @@ void FireGrapplingHook (void)
        --s;
        vs = hook_shotorigin[s];
 
-       // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
-       sound (self, CHAN_WEAPON2, "weapons/hook_fire.wav", VOL_BASE, ATTN_NORM);
+       // UGLY WORKAROUND: play this on CH_WEAPON_B so it can't cut off fire sounds
+       sound (self, CH_WEAPON_B, "weapons/hook_fire.wav", VOL_BASE, ATTN_NORM);
        org = self.origin + self.view_ofs + v_forward * vs_x + v_right * -vs_y + v_up * vs_z;
 
        tracebox(self.origin + self.view_ofs, '-3 -3 -3', '3 3 3', org, MOVE_NORMAL, self);
index ef31c647f294b8ce0065f89c4b3584cadbce6ab5..6f79b3435c629459f7ee48dab649d84d410ee1fa 100644 (file)
@@ -310,7 +310,7 @@ float w_glauncher(float req)
                                        }
                                }
                                if(nadefound)
-                                       sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
+                                       sound (self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                        }
                        else if (weapon_prepareattack(1, autocvar_g_balance_grenadelauncher_secondary_refire))
                        {
index 3374ce071d52f65dabb59180de562170e45e2b8f..cb555ab3fa4d1db5cc43d79e6e6e4b46cbf6dc37 100644 (file)
@@ -221,7 +221,7 @@ void W_Hagar_Attack2_Load (void)
                                {
                                        W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo, autocvar_g_balance_hagar_reload_ammo);
                                        self.hagar_load += 1;
-                                       sound(self, CHAN_WEAPON2, "weapons/hagar_load.wav", VOL_BASE, ATTN_NORM);
+                                       sound(self, CH_WEAPON_B, "weapons/hagar_load.wav", VOL_BASE, ATTN_NORM);
 
                                        self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed;
                                }
index bad89b304e1fdaa6ba54f4c1960005e94a550550..ac7dbb12fd6fe513f02af3f995bd0e5ae6d102d7 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", CHAN_WEAPON2, 0);
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, 0);
        else if(issecondary == 1)
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, autocvar_g_balance_laser_secondary_damage);
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, autocvar_g_balance_laser_secondary_damage);
        else
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CHAN_WEAPON2, autocvar_g_balance_laser_primary_damage);
+               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, autocvar_g_balance_laser_primary_damage);
        pointparticles(particleeffectnum("laser_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        missile = spawn ();
index 2f96e82f1569ca579a820a5cf82a81be99fcd709..4dafe80e2518ad67d6f8ac28b8a3a236c5bb3706 100644 (file)
@@ -459,7 +459,7 @@ float w_minelayer(float req)
                if (self.BUTTON_ATCK2)
                {
                        if(W_PlacedMines(TRUE))
-                               sound (self, CHAN_WEAPON2, "weapons/mine_det.wav", VOL_BASE, ATTN_NORM);
+                               sound (self, CH_WEAPON_B, "weapons/mine_det.wav", VOL_BASE, ATTN_NORM);
                }
        }
        else if (req == WR_PRECACHE)
index 8e01140e5d0cec50aa830de3fbe2d590eae5503b..91ec0ef372a6a484d5e349e3ccd313012e2761f5 100644 (file)
@@ -59,7 +59,7 @@ void W_Nex_Attack (float issecondary)
        W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
        if(charge > autocvar_g_balance_nex_charge_animlimit && autocvar_g_balance_nex_charge_animlimit) // if the Nex is overcharged, we play an extra sound
        {
-               sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_animlimit) / (1 - 0.5 * autocvar_g_balance_nex_charge_animlimit), ATTN_NORM);
+               sound (self, CH_WEAPON_B, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_animlimit) / (1 - 0.5 * autocvar_g_balance_nex_charge_animlimit), ATTN_NORM);
        }
 
        yoda = 0;
index fd82aac5ab94dbaf7f9bff7fd30d2dd338a54c63..9f0623684caea1140723ad4f50cf8b109d19577d 100644 (file)
@@ -209,7 +209,7 @@ void W_Rocket_Think (void)
                        {
                                pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
                                // TODO add a better sound here
-                               sound (self.realowner, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
+                               sound (self.realowner, CH_WEAPON_B, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
                                self.count = 1;
                        }
                }
@@ -433,7 +433,7 @@ float w_rlauncher(float req)
                                        }
                                }
                                if(rockfound)
-                                       sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
+                                       sound (self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                        }
                }
        }
index 46197204026359c0de9a914c109e63da86d15779..693612de95ee93329e7fb348c0c3746165c1be9b 100644 (file)
@@ -130,18 +130,8 @@ void W_Tuba_NoteThink()
 void W_Tuba_Attack(float hittype)
 {
        vector o;
-       float c, n;
+       float n;
        W_SetupShot(self, FALSE, 2, "", 0, autocvar_g_balance_tuba_damage);
-       if(self.tuba_notecount)
-       {
-               self.tuba_notecount = FALSE;
-               c = CHAN_WEAPON;
-       }
-       else
-       {
-               self.tuba_notecount = TRUE;
-               c = CHAN_WEAPON2;
-       }
 
        n = Tuba_GetNote(self, hittype);