]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
get rid of CHAN_TRIGGER too
authorRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 15:33:48 +0000 (17:33 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 15:33:48 +0000 (17:33 +0200)
18 files changed:
qcsrc/client/particles.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc
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
qcsrc/server/t_teleporters.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc

index b33b81a018ca982638304afd5edcc3e5adf753d3..0c7750af0da4f4b8279538da33b57270d8f4ea0b 100644 (file)
@@ -58,7 +58,7 @@ void Draw_PointParticles()
                        if(self.noise != "")
                        {
                                self.origin = p;
-                               sound(self, CHAN_TRIGGER, self.noise, VOL_BASE * self.volume, self.atten);
+                               sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE * self.volume, self.atten);
                        }
                        self.just_toggled = 0;
                }
index ab42d619aa3906abc47214dc0b3ba488716b7aa4..514ee9087ac8f682cc75a57158a125b2c67834d2 100644 (file)
@@ -244,7 +244,7 @@ void CSQC_SPIDER_HUD()
         if(alarm2time < time)
         {
             alarm2time = time + 1;
-            sound(world, CHAN_TRIGGER, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     }
@@ -253,7 +253,7 @@ void CSQC_SPIDER_HUD()
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
         {            
-            sound(world, CHAN_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm2time = 0;
         }
     }
@@ -405,7 +405,7 @@ void CSQC_RAPTOR_HUD()
         if(alarm2time < time)
         {
             alarm2time = time + 1;
-            sound(world, CHAN_TRIGGER, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     }
@@ -414,7 +414,7 @@ void CSQC_RAPTOR_HUD()
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
         {            
-            sound(world, CHAN_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm2time = 0;
         }
     }
@@ -596,7 +596,7 @@ void CSQC_WAKIZASHI_HUD()
         if(alarm2time < time)
         {
             alarm2time = time + 1;
-            sound(world, CHAN_TRIGGER, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     }
@@ -605,7 +605,7 @@ void CSQC_WAKIZASHI_HUD()
         drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm2time)
         {            
-            sound(world, CHAN_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm2time = 0;
         }
     }
index 9f1aa13e3018a175cb21f005722ed084a577c38d..b28f5fe82957d0d5dcec9390d10b7bad01edf0bf 100644 (file)
@@ -431,20 +431,20 @@ const float STAT_DOM_PPS_YELLOW = 104;
 
 #ifdef XON020_CHANNELS
 float CH_INFO = 0; // only on world and csqc
-float CH_ITEMS = 0; // only on players
+float CH_TRIGGER = 0; // only on players
 float CH_WEAPON_A = 1; // only on players and entities
 float CH_VOICE = 2; // only on players
 float CH_BGM = 2; // only on csqc
-float CH_TRIGGERS_SINGLE = 3; // only on players, entities, csqc
+float CH_TRIGGER_SINGLE = 3; // only on players, entities, csqc
 float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
 float CH_WEAPON_B = 5; // only on players and entities
 float CH_PAIN = 6; // only on players and csqc
 float CH_PLAYER = 7; // only on players and entities
 #else
 float CH_INFO = 0;
-float CH_TRIGGERS_SINGLE = 3;
+float CH_TRIGGER_SINGLE = 3;
 float CH_SHOTS_SINGLE = 4;
-float CH_ITEMS = 256;
+float CH_TRIGGER = 256;
 float CH_WEAPON_A = 257;
 float CH_VOICE = 258;
 float CH_BGM = 260;
index 58dc6d350fbbcd36f7ab07ab61cb20c0d67d111e..7029db286cfd48d02a29cfd0eb0a5e02a6ccd516 100644 (file)
@@ -1060,7 +1060,7 @@ void PutClientInServer (void)
                //stuffcmd(self, "set viewsize $tmpviewsize \n");
 
                if (autocvar_g_spawnsound)
-                       sound (self, CHAN_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTN_NORM);
 
                if(g_assault) {
                        if(self.team == assault_attacker_team)
index 10e7148ec8598d0b8cd47d6d6b09b39dd85ef1df..21b062958d8adf62338d46523aaa15979122f2ab 100644 (file)
@@ -303,7 +303,7 @@ void DropFlag(entity e, entity penalty_receiver, entity attacker)
                backtrace("Flag carrier had no flag sprite?!?");
        }
        LogCTF("dropped", p.team, p);
-       sound (self, CHAN_TRIGGER, self.noise4, VOL_BASE, ATTN_NONE);
+       sound (p, CH_TRIGGER, self.noise4, VOL_BASE, ATTN_NONE);
 
        setattachment(e, world, "");
        e.damageforcescale = autocvar_g_balance_ctf_damageforcescale;
@@ -358,7 +358,7 @@ void FlagThink()
                {
                        bprint("The ", self.netname, " became impatient after ", ftos_decimals(flagcaptimerecord, 2), " seconds and returned itself\n");
 
-                       sound (self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
+                       sound (self, CH_TRIGGER_SINGLE, 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, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
+                       sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
                        LogCTF("returned", self.team, world);
                        ReturnFlag(self);
                }
index 3c13d03508db77c6d1a5a6be751c7bf8b6cf41ac..f0123adb0b9596089a4ecaa53f16aa10573c3ec2 100644 (file)
@@ -111,7 +111,7 @@ void dompoint_captured ()
                if(self.enemy)
                        sound(self.enemy, CH_ITEMS, head.noise, VOL_BASE, ATTN_NORM);
                else
-                       sound(self, CH_TRIGGERS_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
        if (head.noise1 != "")
                play2all(head.noise1);
 
index 7ab3df7a61bd4e24d13757d9f71a1765ab2caed3..4a0e8d922ce3a55fb4cbb60e433e6db27c33e7bc 100644 (file)
@@ -162,7 +162,7 @@ void func_breakable_destroy() {
        func_breakable_destroyed();
 
        if(self.noise)
-               sound (self, CH_TRIGGERS_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, 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 7247352dd6bb9a763a9851d20e5e7380cefea68d..bf7edbb0f1226b0dc395b13d718d37e3ef9e7bdf 100644 (file)
@@ -721,7 +721,7 @@ void target_speaker_use_activator()
        else
                snd = self.noise;
        msg_entity = activator;
-       soundto(MSG_ONE, self, CHAN_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
+       soundto(MSG_ONE, self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
 }
 void target_speaker_use_on()
 {
@@ -747,13 +747,13 @@ void target_speaker_use_on()
        }
        else
                snd = self.noise;
-       sound(self, CHAN_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
+       sound(self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
        if(self.spawnflags & 3)
                self.use = target_speaker_use_off;
 }
 void target_speaker_use_off()
 {
-       sound(self, CHAN_TRIGGER, "misc/null.wav", VOL_BASE * self.volume, self.atten);
+       sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASE * self.volume, self.atten);
        self.use = target_speaker_use_on;
 }
 void target_speaker_reset()
index c5cd4ccba417fa108dd3507282674d9cf761765c..e130a3b22b0359f5d6663942fcd319090990a7ff 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, CHAN_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
                else
-                       sound(self, CHAN_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
        else
-               sound(self, CHAN_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
 
        if (self.health < 0)
        {
-               sound(self, CHAN_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
+       sound(e, CH_TRIGGER_SINGLE, "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 5f006329042da284ac736afa9d8d49b3e8508745..2e1d80d7829de733d87fccbb0045fc8556da6ce0 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_TRIGGERS_SINGLE, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
+               sound(self, CH_TRIGGER_SINGLE, "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_TRIGGERS_SINGLE, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
                return; 
        }
        else if(self.wait > time) { return; }
index 0cbc5743c69389bc9f9aff9302826bfcb5955767..0fd13326e1e8b94df38af067d91c66309c37fa7b 100644 (file)
@@ -366,7 +366,7 @@ void GoalTouch (void)
                pscore = 1;
        }
 
-       sound (ball, CH_TRIGGERS_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
+       sound (ball, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
 
        if(ball.team && pscore)
        {
index c64de548b9aa67dc1280d4e2c34cf4351c94d659..b101c0202cc4b59ca3331e710c44c1350b8c2ea8 100644 (file)
@@ -146,11 +146,11 @@ void Item_Respawn (void)
 {
        Item_Show(self, 1);
        if(!g_minstagib && self.items == IT_STRENGTH)
-               sound (self, CHAN_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);   // play respawn sound
+               sound (self, CH_TRIGGER_SINGLE, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);      // play respawn sound
        else if(!g_minstagib && self.items == IT_INVINCIBLE)
-               sound (self, CHAN_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);     // play respawn sound
+               sound (self, CH_TRIGGER_SINGLE, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);        // play respawn sound
        else
-               sound (self, CHAN_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM);        // play respawn sound
+               sound (self, CH_TRIGGER_SINGLE, "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, CHAN_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM);       // play respawn sound
+               sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM);  // play respawn sound
                if(self.waypointsprite_attached)
                {
                        WaypointSprite_Ping(self.waypointsprite_attached);
index f90c812d9bd0691ed332e4817bc2dd216c6338aa..39d206696bf58adfc7dc9caea391b65ab4660a8c 100644 (file)
@@ -62,7 +62,7 @@ void plat_spawn_inside_trigger()
 
 void plat_hit_top()
 {
-       sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+       sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = 1;
        self.think = plat_go_down;
        self.nextthink = self.ltime + 3;
@@ -70,20 +70,20 @@ void plat_hit_top()
 
 void plat_hit_bottom()
 {
-       sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+       sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = 2;
 };
 
 void plat_go_down()
 {
-       sound (self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+       sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
        self.state = 3;
        SUB_CalcMove (self.pos2, self.speed, plat_hit_bottom);
 };
 
 void plat_go_up()
 {
-       sound (self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+       sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
        self.state = 4;
        SUB_CalcMove (self.pos1, self.speed, plat_hit_top);
 };
@@ -246,7 +246,7 @@ void() train_next;
 void train_wait()
 {
        if(self.noise != "")
-               stopsoundto(MSG_BROADCAST, self, CHAN_TRIGGER); // send this as unreliable only, as the train will resume operation shortly anyway
+               stopsoundto(MSG_BROADCAST, self, CH_TRIGGER_SINGLE); // send this as unreliable only, as the train will resume operation shortly anyway
 
        if(self.wait < 0)
        {
@@ -284,7 +284,7 @@ void train_next()
                SUB_CalcMove(targ.origin - self.mins, self.speed, train_wait);
 
        if(self.noise != "")
-               sound(self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+               sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
 };
 
 void func_train_find()
@@ -444,7 +444,7 @@ void spawnfunc_func_bobbing()
        if (self.noise != "")
        {
                precache_sound(self.noise);
-               soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+               soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
        }
        if (!self.speed)
                self.speed = 4;
@@ -521,7 +521,7 @@ void spawnfunc_func_pendulum()
        if (self.noise != "")
        {
                precache_sound(self.noise);
-               soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+               soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
        }
 
        self.active = ACTIVE_ACTIVE;
@@ -614,7 +614,7 @@ void button_fire()
                return;
 
        if (self.noise != "")
-               sound (self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
 
        self.state = STATE_UP;
        SUB_CalcMove (self.pos2, self.speed, button_wait);
@@ -825,7 +825,7 @@ void door_blocked()
 void door_hit_top()
 {
        if (self.noise1 != "")
-               sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = STATE_TOP;
        if (self.spawnflags & DOOR_TOGGLE)
                return;         // don't come down automatically
@@ -842,14 +842,14 @@ void door_hit_top()
 void door_hit_bottom()
 {
        if (self.noise1 != "")
-               sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = STATE_BOTTOM;
 };
 
 void door_go_down()
 {
        if (self.noise2 != "")
-               sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        if (self.max_health)
        {
                self.takedamage = DAMAGE_YES;
@@ -872,7 +872,7 @@ void door_go_up()
        }
 
        if (self.noise2 != "")
-               sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        self.state = STATE_UP;
        SUB_CalcMove (self.pos2, self.speed, door_hit_top);
 
@@ -1071,7 +1071,7 @@ void door_generic_plat_blocked()
 void door_rotating_hit_top()
 {
        if (self.noise1 != "")
-               sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.state = STATE_TOP;
        if (self.spawnflags & DOOR_TOGGLE)
                return;         // don't come down automatically
@@ -1082,7 +1082,7 @@ void door_rotating_hit_top()
 void door_rotating_hit_bottom()
 {
        if (self.noise1 != "")
-               sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        if (self.lip==666) // self.lip is used to remember reverse opening direction for door_rotating
        {
                self.pos2 = '0 0 0' - self.pos2;
@@ -1094,7 +1094,7 @@ void door_rotating_hit_bottom()
 void door_rotating_go_down()
 {
        if (self.noise2 != "")
-               sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        if (self.max_health)
        {
                self.takedamage = DAMAGE_YES;
@@ -1116,7 +1116,7 @@ void door_rotating_go_up()
                return;
        }
        if (self.noise2 != "")
-               sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        self.state = STATE_UP;
        SUB_CalcAngleMove (self.pos2, self.speed, door_rotating_hit_top);
 
@@ -1545,7 +1545,7 @@ void fd_secret_use()
        // Make a sound, wait a little...
 
        if (self.noise1 != "")
-               sound(self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
        self.nextthink = self.ltime + 0.1;
 
        temp = 1 - (self.spawnflags & SECRET_1ST_LEFT); // 1 or -1
@@ -1570,7 +1570,7 @@ void fd_secret_use()
        self.dest2 = self.dest1 + v_forward * self.t_length;
        SUB_CalcMove(self.dest1, self.speed, fd_secret_move1);
        if (self.noise2 != "")
-               sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
 };
 
 // Wait after first movement...
@@ -1579,14 +1579,14 @@ void fd_secret_move1()
        self.nextthink = self.ltime + 1.0;
        self.think = fd_secret_move2;
        if (self.noise3 != "")
-               sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
 };
 
 // Start moving sideways w/sound...
 void fd_secret_move2()
 {
        if (self.noise2 != "")
-               sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        SUB_CalcMove(self.dest2, self.speed, fd_secret_move3);
 };
 
@@ -1594,7 +1594,7 @@ void fd_secret_move2()
 void fd_secret_move3()
 {
        if (self.noise3 != "")
-               sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
        if (!(self.spawnflags & SECRET_OPEN_ONCE))
        {
                self.nextthink = self.ltime + self.wait;
@@ -1606,7 +1606,7 @@ void fd_secret_move3()
 void fd_secret_move4()
 {
        if (self.noise2 != "")
-               sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        SUB_CalcMove(self.dest1, self.speed, fd_secret_move5);
 };
 
@@ -1616,13 +1616,13 @@ void fd_secret_move5()
        self.nextthink = self.ltime + 1.0;
        self.think = fd_secret_move6;
        if (self.noise3 != "")
-               sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
 };
 
 void fd_secret_move6()
 {
        if (self.noise2 != "")
-               sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
        SUB_CalcMove(self.oldorigin, self.speed, fd_secret_done);
 };
 
@@ -1635,7 +1635,7 @@ void fd_secret_done()
                //self.th_pain = fd_secret_use;
        }
        if (self.noise3 != "")
-               sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
 };
 
 void secret_blocked()
@@ -1784,7 +1784,7 @@ void spawnfunc_func_fourier()
        if (self.noise != "")
        {
                precache_sound(self.noise);
-               soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+               soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
        }
 
        if (!self.speed)
@@ -1930,7 +1930,7 @@ void spawnfunc_func_vectormamamam()
        if (self.noise != "")
        {
                precache_sound(self.noise);
-               soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+               soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
        }
 
        if(!self.targetfactor)
index 5d87af3e299f3bb28e690facdb513c41decd3b33..4d7bd92cf86b3bbd4abf9daadc16537df796d5fe 100644 (file)
@@ -90,7 +90,7 @@ void TeleportPlayer(entity teleporter, entity player, vector to, vector to_angle
        if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps
        {
                if(tflags & TELEPORT_FLAG_SOUND)
-                       sound (player, CHAN_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
+                       sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
                if(tflags & TELEPORT_FLAG_PARTICLES)
                {
                        pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
index 237f0dce923f0b92d8c9f9edc4de775e854efe20..4836cf6666b98767f4d151334cdf5a7fa96b28bf 100644 (file)
@@ -322,7 +322,7 @@ float racer_frame()
         {        
             self.sounds = 1;
             self.sound_nexttime = time + 10.922667; //soundlength("vehicles/racer_move.wav");
-            sound (self, CHAN_TRIGGER, "vehicles/racer_move.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+            sound (self, CH_TRIGGER_SINGLE, "vehicles/racer_move.wav", VOL_VEHICLEENGINE, ATTN_NORM);
         }
     }
     else
@@ -331,7 +331,7 @@ float racer_frame()
         {        
             self.sounds = 0;
             self.sound_nexttime = time + 11.888604; //soundlength("vehicles/racer_idle.wav");
-            sound (self, CHAN_TRIGGER, "vehicles/racer_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+            sound (self, CH_TRIGGER_SINGLE, "vehicles/racer_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
         }        
     }
     
index ba6b5dd3ea3dde4b47c298700508efca61424871..5563c375641295244de8c63330c35e923697a670 100644 (file)
@@ -261,7 +261,7 @@ float raptor_takeoff()
     if(self.sound_nexttime < time)
     {        
         self.sound_nexttime = time + 7.955812; //soundlength("vehicles/raptor_fly.wav");
-        sound (self, CHAN_TRIGGER, "vehicles/raptor_speed.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+        sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", VOL_VEHICLEENGINE, ATTN_NORM);
     }   
 
     // Takeoff sequense
@@ -325,15 +325,15 @@ float raptor_frame()
     if(self.sound_nexttime < time)
     {        
         self.sound_nexttime = time + 7.955812; 
-        //sound (self.tur_head, CHAN_TRIGGER, "vehicles/raptor_fly.wav", 1 - ftmp,   ATTN_NORM );
-        sound (self, CHAN_TRIGGER, "vehicles/raptor_speed.wav", 1, ATTN_NORM);        
+        //sound (self.tur_head, CH_TRIGGER_SINGLE, "vehicles/raptor_fly.wav", 1 - ftmp,   ATTN_NORM );
+        sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", 1, ATTN_NORM);        
         self.wait = ftmp;
     }        
     /*
     else if(fabs(ftmp - self.wait) > 0.2)
     {
-        sound (self.tur_head, CHAN_TRIGGER, "", 1 - ftmp,   ATTN_NORM );
-        sound (self, CHAN_TRIGGER, "", ftmp, ATTN_NORM);        
+        sound (self.tur_head, CH_TRIGGER_SINGLE, "", 1 - ftmp,   ATTN_NORM );
+        sound (self, CH_TRIGGER_SINGLE, "", ftmp, ATTN_NORM);        
         self.wait = ftmp;
     }
     */
index e925023028e3c83329d5068b7b1c66232627aecf..19780c4f72586702696bc2c0e7f10fdbd81d8fa5 100644 (file)
@@ -238,13 +238,13 @@ float spiderbot_frame()
     {
         if(spider.frame == 4 && self.tur_head.wait != 0)
         {
-            sound (self, CHAN_TRIGGER, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+            sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTN_NORM);
             spider.frame = 5;            
         }
         
         if(player.BUTTON_JUMP && self.tur_head.wait < time)
         {        
-            sound (self, CHAN_TRIGGER, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+            sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTN_NORM);
             //dprint("spiderbot_jump:", ftos(soundlength("vehicles/spiderbot_jump.wav")), "\n");
             self.delay = 0;
 
@@ -262,7 +262,7 @@ float spiderbot_frame()
                     self.delay = 3;
                     self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_idle.wav");
                     //dprint("spiderbot_idle:", ftos(soundlength("vehicles/spiderbot_idle.wav")), "\n");
-                    sound (self, CHAN_TRIGGER, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+                    sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
                 }                
                 movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
                 spider.frame = 5;
@@ -291,7 +291,7 @@ float spiderbot_frame()
                     {                        
                         self.delay = 1;
                         self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_walk.wav");
-                        sound (self, CHAN_TRIGGER, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+                        sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTN_NORM);
                         //dprint("spiderbot_walk:", ftos(soundlength("vehicles/spiderbot_walk.wav")), "\n");
                     }
                 }
@@ -312,7 +312,7 @@ float spiderbot_frame()
                     {                        
                         self.delay = 2;
                         self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_strafe.wav");
-                        sound (self, CHAN_TRIGGER, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+                        sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTN_NORM);
                         //dprint("spiderbot_strafe:", ftos(soundlength("vehicles/spiderbot_strafe.wav")), "\n");
                     }
                 }
index 5785635954615196c167f99e2052dece173f3fe4..d06e1dab1e5a7449eec6f2a203588856de6739ed 100644 (file)
@@ -626,7 +626,7 @@ void vehicles_exit(float eject)
         setorigin(self.owner.flagcarried, FLAG_CARRY_POS);
     }
     
-    sound (self, CHAN_TRIGGER, "misc/null.wav", 1, ATTN_NORM);
+    sound (self, CH_TRIGGER_SINGLE, "misc/null.wav", 1, ATTN_NORM);
     self.vehicle_exit(eject);
     self.owner = world;