]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
sort out CH_TRIGGER_SINGLE vs CH_TRIGGER use
authorRudolf Polzer <divverent@xonotic.org>
Fri, 8 Jul 2011 18:24:11 +0000 (20:24 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 8 Jul 2011 18:24:11 +0000 (20:24 +0200)
qcsrc/server/ctf.qc
qcsrc/server/domination.qc
qcsrc/server/func_breakable.qc
qcsrc/server/g_triggers.qc
qcsrc/server/mode_onslaught.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/nexball.qc
qcsrc/server/t_items.qc
qcsrc/server/t_plats.qc

index d88ae5d375ca8258224b187fd06f428aeaf0bc9f..a54ee6a8ac68ced40bc09fa337f0a80cf1dddcf0 100644 (file)
@@ -358,7 +358,7 @@ void FlagThink()
                {
                        bprint("The ", self.netname, " became impatient after ", ftos_decimals(flagcaptimerecord, 2), " seconds and returned itself\n");
 
-                       sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
+                       sound (self, CH_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
                        self.owner.impulse = 141; // returning!
 
                        e = self;
@@ -385,7 +385,7 @@ void FlagThink()
                if (time > self.pain_finished)
                {
                        bprint("The ", self.netname, " has returned to base\n");
-                       sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
+                       sound (self, CH_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
                        LogCTF("returned", self.team, world);
                        ReturnFlag(self);
                }
index a6cc9a88de0ac6d9f90f0775f3673d01d94c753f..cf0584b7283b6cea20f933597a4a156799f1cb5d 100644 (file)
@@ -111,7 +111,7 @@ void dompoint_captured ()
                if(self.enemy)
                        sound(self.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTN_NORM);
                else
-                       sound(self, CH_TRIGGER_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER, head.noise, VOL_BASE, ATTN_NORM);
        if (head.noise1 != "")
                play2all(head.noise1);
 
index 4a0e8d922ce3a55fb4cbb60e433e6db27c33e7bc..1e474c0d641a34764fb55578f77614927f280f33 100644 (file)
@@ -162,7 +162,7 @@ void func_breakable_destroy() {
        func_breakable_destroyed();
 
        if(self.noise)
-               sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
 
        if(self.dmg)
                RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, self.dmg_force, DEATH_HURTTRIGGER, world);
index 2b96b967a065bd25a959b33c4311177f49cdbac4..6407cefaa901351ada791a7e5e2dffb084d0fb18 100644 (file)
@@ -721,7 +721,7 @@ void target_speaker_use_activator()
        else
                snd = self.noise;
        msg_entity = activator;
-       soundto(MSG_ONE, self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
+       soundto(MSG_ONE, self, CH_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
 }
 void target_speaker_use_on()
 {
index 5662f95bd29149fec1b8c2a1385c6e2e71ce50ab..457141f74a5fc4042a7ee6fce50a434987a16a08 100644 (file)
@@ -384,7 +384,7 @@ void onslaught_generator_think()
                {
                        // self.max_health / 300 gives 5 minutes of overtime.
                        // control points reduce the overtime duration.
-                       sound(self, CH_TRIGGER_SINGLE, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
                        d = 1;
                        e = findchain(classname, "onslaught_controlpoint");
                        while (e)
@@ -455,7 +455,7 @@ void onslaught_generator_damage_think()
                if(random() < 0.01)
                {
                        pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
-                       sound(self, CH_TRIGGER_SINGLE, "onslaught/electricity_explode.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTN_NORM);
                }
                else
                        pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
@@ -484,7 +484,7 @@ void onslaught_generator_deaththink()
        if(self.count==40||self.count==20)
        {
                onslaught_generator_ring_spawn(self.origin);
-               sound(self, CH_TRIGGER_SINGLE, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
        }
 
        // Throw some gibs
@@ -510,7 +510,7 @@ void onslaught_generator_deaththink()
        if(random() < 0.25)
        {
                te_explosion(self.origin);
-               sound(self, CH_TRIGGER_SINGLE, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
        }
 
        // Particles
@@ -530,7 +530,7 @@ void onslaught_generator_deaththink()
                te_explosion(org);
                onslaught_generator_shockwave_spawn(org);
                pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
-               sound(self, CH_TRIGGER_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
        }
        else
                self.nextthink = time + 0.05;
@@ -631,7 +631,7 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
        // Throw some flaming gibs on damage, more damage = more chance for gib
        if(random() < damage/220)
        {
-               sound(self, CH_TRIGGER_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                i = random();
                if(i < 0.3)
                        ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib1.md3", 5, TRUE);
@@ -647,9 +647,9 @@ void onslaught_generator_damage(entity inflictor, entity attacker, float damage,
 
                //sound on every hit
                if (random() < 0.5)
-                       sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
                else
-                       sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit2.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE, ATTN_NORM);
        }
 
        //throw some gibs on damage
@@ -977,13 +977,13 @@ void onslaught_controlpoint_icon_damage(entity inflictor, entity attacker, float
        pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
        //sound on every hit
        if (random() < 0.5)
-               sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
+               sound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
        else
-               sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
+               sound(self, CH_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
 
        if (self.health < 0)
        {
-               sound(self, CH_TRIGGER_SINGLE, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
                pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
                {
                        string t;
@@ -1129,7 +1129,7 @@ void onslaught_controlpoint_icon_buildthink()
                self.health = self.max_health;
                self.count = autocvar_g_onslaught_cp_regen * sys_frametime; // slow repair rate from now on
                self.think = onslaught_controlpoint_icon_think;
-               sound(self, CH_TRIGGER_SINGLE, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
                bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
                self.owner.iscaptured = TRUE;
 
@@ -1192,7 +1192,7 @@ void onslaught_controlpoint_touch()
        e.think = onslaught_controlpoint_icon_buildthink;
        e.nextthink = time + sys_frametime;
        e.count = (e.max_health - e.health) * sys_frametime / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
-       sound(e, CH_TRIGGER_SINGLE, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
+       sound(e, CH_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
        self.team = e.team;
        self.colormap = e.colormap;
        WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / sys_frametime));
index ac6d5dccdb86fa63bcd504b0f1a9bbc13718efc1..e71c2d7ef6ecd20f04faa06627c041f7673ed225 100644 (file)
@@ -78,7 +78,7 @@ void ka_RespawnBall() // runs whenever the ball needs to be relocated
                WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
                WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);    
 
-               sound(self, CH_TRIGGER_SINGLE, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
+               sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        }
        else
        {
@@ -99,7 +99,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        if(other.classname != "player") 
        {  // The ball just touched an object, most likely the world
                pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
-               sound(self, CH_TRIGGER_SINGLE, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
                return; 
        }
        else if(self.wait > time) { return; }
index 3ee7b5597d82d3752c55927d52d6bd389b775478..61385f6b5e86bd233dee19d7ee7ca523c495fc4a 100644 (file)
@@ -222,7 +222,7 @@ void InitBall (void)
        self.teamtime = 0;
        self.pusher = world;
        self.team = FALSE;
-       sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
+       sound (self, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
        WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
        LogNB("init", world);
 }
@@ -262,7 +262,7 @@ void football_touch (void)
        if (other.solid == SOLID_BSP) {
                if (time > self.lastground + 0.1)
                {
-                       sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                        self.lastground = time;
                }
                if (vlen(self.velocity) && !self.cnt)
@@ -308,7 +308,7 @@ void basketball_touch (void)
                LogNB("caught", other);
                GiveBall(other, self);
        } else if (other.solid == SOLID_BSP) {
-               sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                if (vlen(self.velocity) && !self.cnt)
                        self.nextthink = min(time + g_nexball_delay_idle, self.teamtime);
        }
@@ -366,7 +366,7 @@ void GoalTouch (void)
                pscore = 1;
        }
 
-       sound (ball, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
+       sound (ball, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
 
        if(ball.team && pscore)
        {
index 001063585b107faa2411b76a6500d0f4799e549f..99ddc018b95a08352eabb2df2a3ac8fc14b276fc 100644 (file)
@@ -146,11 +146,11 @@ void Item_Respawn (void)
 {
        Item_Show(self, 1);
        if(!g_minstagib && self.items == IT_STRENGTH)
-               sound (self, CH_TRIGGER_SINGLE, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);      // play respawn sound
+               sound (self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);     // play respawn sound
        else if(!g_minstagib && self.items == IT_INVINCIBLE)
-               sound (self, CH_TRIGGER_SINGLE, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);        // play respawn sound
+               sound (self, CH_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);       // play respawn sound
        else
-               sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM);   // play respawn sound
+               sound (self, CH_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM);  // play respawn sound
        setorigin (self, self.origin);
 
        //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
@@ -203,7 +203,7 @@ void Item_RespawnCountdown (void)
                                        WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, time + ITEM_RESPAWN_TICKS);
                        }
                }
-               sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM);  // play respawn sound
+               sound (self, CH_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM); // play respawn sound
                if(self.waypointsprite_attached)
                {
                        WaypointSprite_Ping(self.waypointsprite_attached);
index 39d206696bf58adfc7dc9caea391b65ab4660a8c..e2d801fa491fe9c011da08a22fea8ae1beccceac 100644 (file)
@@ -614,7 +614,7 @@ void button_fire()
                return;
 
        if (self.noise != "")
-               sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
 
        self.state = STATE_UP;
        SUB_CalcMove (self.pos2, self.speed, button_wait);