]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "change ALL sound calls AGAIN (damn Spike)"
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 5 Jul 2011 07:42:46 +0000 (09:42 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 5 Jul 2011 07:42:46 +0000 (09:42 +0200)
This reverts commit 70b696e4e2bbe7322bf580be42961b2d5a159f31.

72 files changed:
qcsrc/client/View.qc
qcsrc/client/casings.qc
qcsrc/client/csqc_builtins.qc
qcsrc/client/damage.qc
qcsrc/client/gibs.qc
qcsrc/client/hook.qc
qcsrc/client/mapvoting.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/particles.qc
qcsrc/client/projectile.qc
qcsrc/client/target_music.qc
qcsrc/client/tturrets.qc
qcsrc/client/tuba.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/common/constants.qh
qcsrc/common/util.qh
qcsrc/server/bot/scripting.qc
qcsrc/server/cheats.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weapons.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/ctf.qc
qcsrc/server/domination.qc
qcsrc/server/extensions.qh
qcsrc/server/func_breakable.qc
qcsrc/server/g_hook.qc
qcsrc/server/g_triggers.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mode_onslaught.qc
qcsrc/server/monsters/ai.qc
qcsrc/server/monsters/m_monsters.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/nexball.qc
qcsrc/server/portals.qc
qcsrc/server/sv_main.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc
qcsrc/server/t_plats.qc
qcsrc/server/t_teleporters.qc
qcsrc/server/tturrets/units/unit_ewheel.qc
qcsrc/server/tturrets/units/unit_flac.qc
qcsrc/server/tturrets/units/unit_hellion.qc
qcsrc/server/tturrets/units/unit_hk.qc
qcsrc/server/tturrets/units/unit_mlrs.qc
qcsrc/server/tturrets/units/unit_phaser.qc
qcsrc/server/tturrets/units/unit_plasma.qc
qcsrc/server/tturrets/units/unit_walker.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/vehicles/raptor.qc
qcsrc/server/vehicles/spiderbot.qc
qcsrc/server/vehicles/vehicles.qc
qcsrc/server/w_common.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_rifle.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 16c388f8bad4c743ca647e5d01394649d7f7ce03..dfefe96ff596d400fdeb70d327ab1eb0cfa7e593 100644 (file)
@@ -93,7 +93,7 @@ void CheckForGamestartChange() {
        if (previous_game_starttime != startTime) {
                if ((time + 5.0) < startTime) {
                        //if connecting to server while restart was active don't always play prepareforbattle
-                       asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
+                       sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/prepareforbattle.wav"), VOL_BASEVOICE, ATTN_NONE);
                }
                if (time < startTime) {
                        restartAnnouncer = spawn();
@@ -945,13 +945,13 @@ void CSQC_UpdateView(float w, float h)
        hit_time = getstatf(STAT_HIT_TIME);
        if(hit_time > nextsound_hit_time && autocvar_cl_hitsound)
        {
-               asound(world, CH_INFO, "misc/hit.wav", VOL_BASE, ATTN_NONE);
+               sound(world, CH_INFO, "misc/hit.wav", VOL_BASE, ATTN_NONE);
                nextsound_hit_time = time + autocvar_cl_hitsound_antispam_time;
        }
        typehit_time = getstatf(STAT_TYPEHIT_TIME);
        if(typehit_time > nextsound_typehit_time)
        {
-               asound(world, CH_INFO, "misc/typehit.wav", VOL_BASE, ATTN_NONE);
+               sound(world, CH_INFO, "misc/typehit.wav", VOL_BASE, ATTN_NONE);
                nextsound_typehit_time = time + autocvar_cl_hitsound_antispam_time;
        }
 
index 18602fee02e749c1beaa5a45cbba0599d3e21cd3..9234b4743414ba73002a7a566832f7d4cf3785a6 100644 (file)
@@ -55,7 +55,7 @@ void Casing_Touch()
                                                break;
                                }
 
-                               asound (self, CH_SHOTS, s, VOL_BASE, ATTN_NORM);
+                               sound (self, CH_SHOTS_SINGLE, s, VOL_BASE, ATTN_NORM);
                        }
                }
        }
index 1f98029608c9d049b05a4c943519950ce9cb6a55..b7e4b39713a011224633c67d93953921f63c4c4d 100644 (file)
@@ -329,6 +329,3 @@ float CVAR_TYPEFLAG_PRIVATE = 4;
 float CVAR_TYPEFLAG_ENGINE = 8;
 float CVAR_TYPEFLAG_HASDESCRIPTION = 16;
 float CVAR_TYPEFLAG_READONLY = 32;
-
-float SOUNDFLAG_AUTO = 128;
-void(entity e, float chan, string samp, float vol, float atten, float speed, float flags) sound7 = #8;
index cc52cf3be0b33b9ef8c45dc7f20bc1506c60f26b..daff7554e0b2beff745a542bff13570abfe2abc9 100644 (file)
@@ -78,7 +78,7 @@ void Ent_DamageInfo(float isNew)
         else
             w_backoff = -1 * normalize(w_org - (w_org + normalize(force) * 16));
            
-           setorigin(self, w_org + w_backoff * 2); // for sound calls
+           setorigin(self, w_org + w_backoff * 2); // for sound() calls
            
            switch(w_deathtype)
            {            
@@ -88,33 +88,33 @@ void Ent_DamageInfo(float isNew)
             case DEATH_SBMINIGUN:
                 string _snd;
                 _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
-                asound(self, CH_SHOTS, _snd, VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, _snd, VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("spiderbot_minigun_impact"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_SBROCKET:
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("spiderbot_rocket_explode"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_SBBLOWUP:
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                 break;
                 
             case DEATH_WAKIGUN:
-                asound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("wakizashi_gun_impact"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_WAKIROCKET:
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("wakizashi_rocket_explode"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_WAKIBLOWUP:
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                 break;
                 
             case DEATH_RAPTOR_CANNON:
-                asound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("raptor_cannon_impact"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_RAPTOR_BOMB_SPLIT:
@@ -128,15 +128,15 @@ void Ent_DamageInfo(float isNew)
                 }
                     
                 
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_RAPTOR_BOMB:
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, w_backoff * 1000, 1);
                 break;
             case DEATH_RAPTOR_DEATH:
-                asound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("explosion_big"), self.origin, w_backoff * 1000, 1);
                 break;
            }
@@ -151,12 +151,12 @@ void Ent_DamageInfo(float isNew)
         else
             w_backoff = -1 * normalize(w_org - (w_org + normalize(force) * 16));
            
-           setorigin(self, w_org + w_backoff * 2); // for sound calls
+           setorigin(self, w_org + w_backoff * 2); // for sound() calls
            
            switch(w_deathtype)
            {   
              case DEATH_TURRET_EWHEEL:
-                asound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
                 break;
              
@@ -165,11 +165,11 @@ void Ent_DamageInfo(float isNew)
                 org2 = w_org + w_backoff * 6;
                 pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
                 if (w_random<0.15)
-                    asound(self, CH_SHOTS, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
+                    sound(self, CH_SHOTS_SINGLE, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
                 else if (w_random<0.7)
-                    asound(self, CH_SHOTS, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
+                    sound(self, CH_SHOTS_SINGLE, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
                 else
-                    asound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
+                    sound(self, CH_SHOTS_SINGLE, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
                 
                 break;
                 
@@ -177,7 +177,7 @@ void Ent_DamageInfo(float isNew)
              case DEATH_TURRET_HK:
              case DEATH_TURRET_WALKER_ROCKET:
              case DEATH_TURRET_HELLION:
-                asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("rocket_explode"), self.origin, w_backoff * 1000, 1);
                 break;
              
@@ -185,17 +185,17 @@ void Ent_DamageInfo(float isNew)
              case DEATH_TURRET_WALKER_GUN:
                 string _snd;
                 _snd = strcat("weapons/ric", ftos(1 + rint(random() * 2)), ".waw");
-                asound(self, CH_SHOTS, _snd, VOL_BASE, ATTN_NORM);
+                sound(self, CH_SHOTS_SINGLE, _snd, VOL_BASE, ATTN_NORM);
                 pointparticles(particleeffectnum("machinegun_impact"), self.origin, w_backoff * 1000, 1);
                 break;
                           
              case DEATH_TURRET_PLASMA:
-                asound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/electro_impact.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("electro_impact"), self.origin, w_backoff * 1000, 1);
                 break;
                           
              case DEATH_TURRET_WALKER_MEELE:
-                asound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_MIN);
+                sound(self, CH_SHOTS_SINGLE, "weapons/ric1.wav", VOL_BASE, ATTN_MIN);
                 pointparticles(particleeffectnum("TE_SPARK"), self.origin, w_backoff * 1000, 1);
                 break;
 
@@ -222,7 +222,7 @@ void Ent_DamageInfo(float isNew)
                        w_backoff = trace_plane_normal;
                else
                        w_backoff = -1 * normalize(force);
-               setorigin(self, w_org + w_backoff * 2); // for sound calls
+               setorigin(self, w_org + w_backoff * 2); // for sound() calls
 
                (get_weaponinfo(hitwep)).weapon_func(WR_IMPACTEFFECT);
        }
index c422dfaa8c1632b78ce4d13a1cdf3671f29f17c2..4041bacc1b0ea6921f1cdd08d95750b03c9e5878 100644 (file)
@@ -73,7 +73,7 @@ void Gib_Touch()
        }
 
        if(!self.silent)
-               asound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTN_NORM);
+               sound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTN_NORM);
        pointparticles(particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
 
        Gib_Delete();
@@ -192,7 +192,7 @@ void Ent_GibSplash(float isNew)
        {
                case 0x01:
                        if(!issilent)
-                               asound (self, CH_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM);
+                               sound (self, CH_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM);
 
                        if(prandom() < amount)
                                TossGib ("models/gibs/eye.md3", org, vel, prandomvec() * 150, specnum, 0, issilent);
index 9707bd62cb6bbe6c57ed84c79bceef8121e0c811..4971fa3aa1705a126428729db0e2804ea6a65742 100644 (file)
@@ -59,7 +59,7 @@ void Draw_GrapplingHook()
        if(self.teleport_time)
        if(time > self.teleport_time)
        {
-               csound (self, CH_SHOTS, "misc/null.wav", VOL_BASE, ATTN_NORM); // safeguard
+               sound (self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM); // safeguard
                self.teleport_time = 0;
        }
 
@@ -215,7 +215,7 @@ void Draw_GrapplingHook()
 
 void Remove_GrapplingHook()
 {
-       csound (self, CH_SHOTS, "misc/null.wav", VOL_BASE, ATTN_NORM);
+       sound (self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM);
 }
 
 void Ent_ReadHook(float bIsNew, float type)
@@ -275,10 +275,10 @@ void Ent_ReadHook(float bIsNew, float type)
                                self.drawmask = MASK_NORMAL;
                                break;
                        case ENT_CLIENT_LGBEAM:
-                               csound (self, CH_SHOTS, "weapons/lgbeam_fly.wav", VOL_BASE, ATTN_NORM);
+                               sound (self, CH_SHOTS_SINGLE, "weapons/lgbeam_fly.wav", VOL_BASE, ATTN_NORM);
                                break;
                        case ENT_CLIENT_GAUNTLET:
-                               csound (self, CH_SHOTS, "weapons/gauntletbeam_fly.wav", VOL_BASE, ATTN_NORM);
+                               sound (self, CH_SHOTS_SINGLE, "weapons/gauntletbeam_fly.wav", VOL_BASE, ATTN_NORM);
                                break;
                }
        }
index d4786e7b02bbd848d9254e565262339a1305ad55..b40dd49ee177da1587efb86372a871ccf2aa025a 100644 (file)
@@ -436,7 +436,7 @@ void MapVote_UpdateMask()
 
        if(oldmask & mv_maps_mask != oldmask)
                if(oldmask & mv_maps_mask == mv_maps_mask)
-                        asound(world, CH_INFO, "misc_invshot.wav", VOL_BASE, ATTN_NONE);
+                        sound(world, CH_INFO, "misc_invshot.wav", VOL_BASE, ATTN_NONE);
 
        // remove votes that no longer apply
        for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2)
index 6f3f0ab6427b3620cdfc9585fd916203859199ba..da09230dbc1965cab6b3f3310fe633b4e43f24c2 100644 (file)
@@ -8,7 +8,7 @@ void serverAnnouncer()
        // check for pending announcement, play it and remove it
        if(announce_snd != "")
        {
-               asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
+               sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
                strunzone(announce_snd);
                announce_snd = "";
        }
@@ -22,7 +22,7 @@ void restartAnnouncer_Think() {
                if (!spectatee_status) //do cprint only for players
                        centerprint(_("^1Begin!"));
 
-               asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
+               sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
                //reset maptime announcers now as well
                announcer_5min = announcer_1min = FALSE;
 
@@ -34,7 +34,7 @@ void restartAnnouncer_Think() {
                        centerprint(sprintf(_("^1Game starts in %d seconds"), countdown_rounded));
 
                if(countdown_rounded <= 3 && countdown_rounded >= 1) {
-                       asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
+                       sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
                }
 
                self.nextthink = getstatf(STAT_GAMESTARTTIME) - (countdown - 1);
@@ -71,7 +71,7 @@ void maptimeAnnouncer() {
                        //if we're in warmup mode, check whether there's a warmup timelimit
                        if not (warmuplimit == -1 && warmup_stage) {
                                announcer_5min = TRUE;
-                               asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
+                               sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/5minutesremain.wav"), VOL_BASEVOICE, ATTN_NONE);
                        }
        }
 
@@ -86,7 +86,7 @@ void maptimeAnnouncer() {
                        //if we're in warmup mode, check whether there's a warmup timelimit
                        if not (warmuplimit == -1 && warmup_stage) {
                                announcer_1min = TRUE;
-                               asound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
+                               sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/1minuteremains.wav"), VOL_BASEVOICE, ATTN_NONE);
                        }
        }
 }
index 4b1cbc16441c5ad72bfa0345caec91d19ce4a7ab..b7233eee14b8c1a5e29a21b1e22b6c59c7584664 100644 (file)
@@ -58,7 +58,7 @@ void Draw_PointParticles()
                        if(self.noise != "")
                        {
                                self.origin = p;
-                               asound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
+                               sound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
                        }
                        self.just_toggled = 0;
                }
index e9f271bd66acfa2c3dfb10c6eb69cd58055ddcb0..31fecfaee2287e81131ebb5e5319c33983a02f7b 100644 (file)
@@ -164,14 +164,14 @@ void loopsound(entity e, float ch, string samp, float vol, float attn)
        if(self.silent)
                return;
 
-       csound(e, ch, samp, vol, attn);
+       sound(e, ch, samp, vol, attn);
        e.snd_looping = 1;
 }
 
 void Ent_RemoveProjectile()
 {
        if(self.snd_looping)
-               csound(self, CH_SHOTS, "misc/null.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_SHOTS_SINGLE, "misc/null.wav", VOL_BASE, ATTN_NORM);
 
        if(self.count & 0x80)
        {
@@ -320,7 +320,7 @@ void Ent_Projectile()
                {
                        case PROJECTILE_ELECTRO:
                                // only new engines support sound moving with object
-                               loopsound(self, CH_SHOTS, "weapons/electro_fly.wav", VOL_BASE, ATTN_NORM);
+                               loopsound(self, CH_SHOTS_SINGLE, "weapons/electro_fly.wav", VOL_BASE, ATTN_NORM);
                                self.mins = '0 0 -4';
                                self.maxs = '0 0 -4';
                                self.move_movetype = MOVETYPE_BOUNCE;
@@ -329,7 +329,7 @@ void Ent_Projectile()
                                self.move_bounce_stopspeed = g_balance_electro_secondary_bouncestop;
                                break;
                        case PROJECTILE_ROCKET:
-                               loopsound(self, CH_SHOTS, "weapons/rocket_fly.wav", VOL_BASE, ATTN_NORM);
+                               loopsound(self, CH_SHOTS_SINGLE, "weapons/rocket_fly.wav", VOL_BASE, ATTN_NORM);
                                self.mins = '-3 -3 -3';
                                self.maxs = '3 3 3';
                                break;
@@ -370,12 +370,12 @@ void Ent_Projectile()
                                self.move_touch = SUB_Null;
                                break;
                        case PROJECTILE_FIREBALL:
-                               loopsound(self, CH_SHOTS, "weapons/fireball_fly2.wav", VOL_BASE, ATTN_NORM);
+                               loopsound(self, CH_SHOTS_SINGLE, "weapons/fireball_fly2.wav", VOL_BASE, ATTN_NORM);
                                self.mins = '-16 -16 -16';
                                self.maxs = '16 16 16';
                                break;
                        case PROJECTILE_FIREMINE:
-                               loopsound(self, CH_SHOTS, "weapons/fireball_fly.wav", VOL_BASE, ATTN_NORM);
+                               loopsound(self, CH_SHOTS_SINGLE, "weapons/fireball_fly.wav", VOL_BASE, ATTN_NORM);
                                self.move_movetype = MOVETYPE_BOUNCE;
                                self.move_touch = SUB_Null;
                                self.mins = '-4 -4 -4';
@@ -390,7 +390,7 @@ void Ent_Projectile()
                                self.maxs = '2 2 2';
                                break;
                        case PROJECTILE_SEEKER:
-                               loopsound(self, CH_SHOTS, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
+                               loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
                                self.mins = '-4 -4 -4';
                                self.maxs = '4 4 4';
                                break;
@@ -403,10 +403,10 @@ void Ent_Projectile()
             case PROJECTILE_RAPTORCANNON:
                                break;
             case PROJECTILE_SPIDERROCKET:
-                loopsound(self, CH_SHOTS, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
+                loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
                                break;
             case PROJECTILE_WAKIROCKET:
-                loopsound(self, CH_SHOTS, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
+                loopsound(self, CH_SHOTS_SINGLE, "weapons/tag_rocket_fly.wav", VOL_BASE, ATTN_NORM);
                                break;
             case PROJECTILE_WAKICANNON:
                                break;
index 909b75ea3fa8aba5acb3738dac648f212a6d8ee7..c4573296a6bb0af9f35dedf39ae177855fc847bb 100644 (file)
@@ -19,7 +19,7 @@ void TargetMusic_Advance()
        for(e = world; (e = findfloat(e, enttype, ENT_CLIENT_TRIGGER_MUSIC)); ) if(e.noise)
        {
                vol0 = e.lastvol;
-               if(getsoundtime(e, CH_BGM) < 0)
+               if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
                        vol0 = -1;
                }
@@ -43,16 +43,16 @@ void TargetMusic_Advance()
                if(vol != vol0)
                {
                        if(vol0 < 0)
-                               csound(e, CH_BGM, e.noise, vol, ATTN_NONE); // restart
+                               sound(e, CH_BGM_SINGLE, e.noise, vol, ATTN_NONE); // restart
                        else
-                               csound(e, CH_BGM, "", vol, ATTN_NONE);
+                               sound(e, CH_BGM_SINGLE, "", vol, ATTN_NONE);
                        e.lastvol = vol;
                }
        }
        music_trigger = world;
 
        if(best)
-               bgmtime = getsoundtime(best, CH_BGM);
+               bgmtime = getsoundtime(best, CH_BGM_SINGLE);
        else
                bgmtime = gettime(GETTIME_CDTRACK);
 }
@@ -87,8 +87,8 @@ void Net_TargetMusic()
                        strunzone(e.noise);
                e.noise = strzone(noi);
                precache_sound(e.noise);
-               csound(e, CH_BGM, e.noise, 0, ATTN_NONE);
-               if(getsoundtime(e, CH_BGM) < 0)
+               sound(e, CH_BGM_SINGLE, e.noise, 0, ATTN_NONE);
+               if(getsoundtime(e, CH_BGM_SINGLE) < 0)
                {
                        print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
                        strunzone(e.noise);
@@ -175,8 +175,8 @@ void Ent_ReadTriggerMusic()
                if(self.noise != s)
                {
                        precache_sound(self.noise);
-                       csound(self, CH_BGM, self.noise, 0, ATTN_NONE);
-                       if(getsoundtime(self, CH_BGM) < 0)
+                       sound(self, CH_BGM_SINGLE, self.noise, 0, ATTN_NONE);
+                       if(getsoundtime(self, CH_BGM_SINGLE) < 0)
                        {
                                print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
                                strunzone(self.noise);
index e7d9cbe5d833886acd2fec43ba02379b68560c01..d625804908117d421904ca4608abdf6c154691b9 100644 (file)
@@ -355,7 +355,7 @@ void turret_gibboom()
 {
     float i;
     
-    asound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
 
     for (i = 1; i < 5; i = i + 1)
@@ -399,7 +399,7 @@ void turret_die()
     
     setmodel(self, "");
     setmodel(self.tur_head, "");
-    asound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
     pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
     turret_tid2info(self.turret_type);
     dprint("Turret ", tid2info_name, " dies.\n");
index a45c33a8e2cdf0e8593e6c2755a68592284043c5..06edec4da0e00a82982093323a63ee5f84546548 100644 (file)
@@ -13,18 +13,18 @@ void Ent_TubaNote_Think()
        self.nextthink = time;
        if(self.cnt <= 0)
        {
-               csound(self, CH_SHOTS, "misc/null.wav", 0, 0);
+               sound(self, CH_SHOTS_SINGLE, "misc/null.wav", 0, 0);
                remove(self);
        }
        else
-               csound(self, CH_SHOTS, "", self.cnt, self.attenuate * autocvar_g_balance_tuba_attenuation);
+               sound(self, CH_SHOTS_SINGLE, "", self.cnt, self.attenuate * autocvar_g_balance_tuba_attenuation);
 }
 
 void Ent_TubaNote_UpdateSound()
 {
        self.enemy.cnt = bound(0, VOL_BASE * autocvar_g_balance_tuba_volume, 1);
        self.enemy.count = self.enemy.cnt;
-       csound(self.enemy, CH_SHOTS, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation);
+       sound(self.enemy, CH_SHOTS_SINGLE, TUBA_STARTNOTE(self.cnt), self.enemy.cnt, self.enemy.attenuate * autocvar_g_balance_tuba_attenuation);
 }
 
 void Ent_TubaNote_StopSound()
index 67690e11ff84d9cbfa76d36828d48a7fc3454769..a06190b3ded7c21dec7800d60693e910e8268107 100644 (file)
@@ -217,7 +217,7 @@ void CSQC_SPIDER_HUD()
         if(alarm1time < time)
         {
             alarm1time = time + 2;
-            csound(world, CH_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
         }        
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     }        
@@ -226,7 +226,7 @@ void CSQC_SPIDER_HUD()
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm1time)
         {
-            csound(world, CH_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm1time = 0;
         }        
     }
@@ -244,7 +244,7 @@ void CSQC_SPIDER_HUD()
         if(alarm2time < time)
         {
             alarm2time = time + 1;
-            csound(world, CH_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)
         {            
-            csound(world, CH_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm2time = 0;
         }
     }
@@ -376,7 +376,7 @@ void CSQC_RAPTOR_HUD()
         if(alarm1time < time)
         {
             alarm1time = time + 2;
-            csound(self, CH_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
@@ -386,7 +386,7 @@ void CSQC_RAPTOR_HUD()
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm1time)
         {
-            csound(self, CH_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm1time = 0;
         }
     }
@@ -405,7 +405,7 @@ void CSQC_RAPTOR_HUD()
         if(alarm2time < time)
         {
             alarm2time = time + 1;
-            csound(world, CH_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)
         {            
-            csound(world, CH_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm2time = 0;
         }
     }
@@ -566,7 +566,7 @@ void CSQC_WAKIZASHI_HUD()
         if(alarm1time < time)
         {
             alarm1time = time + 2;
-            csound(self, CH_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
@@ -576,7 +576,7 @@ void CSQC_WAKIZASHI_HUD()
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm1time)
         {
-            csound(self, CH_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm1time = 0;
         }        
     }
@@ -596,7 +596,7 @@ void CSQC_WAKIZASHI_HUD()
         if(alarm2time < time)
         {
             alarm2time = time + 1;
-            csound(world, CH_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)
         {            
-            csound(world, CH_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm2time = 0;
         }
     }
index f789d21802e2aaa37b6645ea84b71ffdda715225..de0edbb31f3a6eba94c9bc38381a8f753388c668 100644 (file)
@@ -431,28 +431,32 @@ const float STAT_DOM_PPS_YELLOW = 104;
 
 #ifdef COMPAT_XON010_CHANNELS
 float CH_INFO = 0; // only on world and csqc
-float CH_TRIGGER_LONG = 0; // auto channel for triggers
+float CH_TRIGGER = 0; // only on players; compat: FALSELY CONTROLLED BY "Info"
 float CH_WEAPON_A = 1; // only on players and entities
+float CH_WEAPON_SINGLE = 1; // only on players and entities
 float CH_VOICE = 2; // only on players
-float CH_BGM = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
+float CH_BGM_SINGLE = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
 float CH_AMBIENT = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
-float CH_TRIGGER = 3; // only on players, entities, csqc
-float CH_SHOTS = 4; // 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_PAIN_SINGLE = 6; // only on players and csqc
 float CH_PLAYER = 7; // only on players and entities
 #else
 float CH_INFO = 0;
-float CH_TRIGGER_LONG = 3; // differs from 0.1.0
-float CH_WEAPON_A = 1;
-float CH_VOICE = 2;
-float CH_BGM = 8; // differs from 0.1.0
-float CH_AMBIENT = 9; // differs from 0.1.0
-float CH_TRIGGER = 3;
-float CH_SHOTS = 4;
-float CH_WEAPON_B = 1; // differs from 0.1.0
-float CH_PAIN = 6;
-float CH_PLAYER = 7;
+float CH_TRIGGER = -3;
+float CH_WEAPON_A = -1;
+float CH_WEAPON_SINGLE = 1;
+float CH_VOICE = -2;
+float CH_BGM_SINGLE = 8;
+float CH_AMBIENT = -9;
+float CH_TRIGGER_SINGLE = 3;
+float CH_SHOTS_SINGLE = 4;
+float CH_WEAPON_B = -1;
+float CH_PAIN = -6;
+float CH_PAIN_SINGLE = 6;
+float CH_PLAYER = -7;
 #endif
 
 float  ATTN_NONE                               = 0;
index 9bfccb81836c72f8c3999d792b9c9698fa7b3ad5..9071c1c7cc1ae5aa4ab29d592e713e6621195be2 100644 (file)
@@ -266,10 +266,6 @@ const float XENCODE_LEN = 5;
 string xencode(float f);
 float xdecode(string s);
 
-#ifdef COMPAT_XON010_CHANNELS
-#define asound(e,c,s,v,a) sound(e,c,s,v,a)
-#define csound(e,c,s,v,a) sound(e,c,s,v,a)
-#else
-#define asound(e,c,s,v,a) sound7(e,c,s,v,a,0,SOUNDFLAG_AUTO)
-#define csound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
+#ifndef COMPAT_XON010_CHANNELS
+#define sound(e,c,s,v,a) sound7(e,c,s,v,a,0,0)
 #endif
index 4cffc08793d6c1981cd5f8a81340b8937d5614f9..a70e55bf643f7c1a375eb05d665e8a5a85d82e4f 100644 (file)
@@ -1061,7 +1061,7 @@ float bot_cmd_sound()
        f = bot_cmd.bot_cmd_parm_string;
 
        precache_sound(f);
-       asound(self, CH_WEAPON_B, f, VOL_BASE, ATTN_MIN);
+       sound(self, CH_WEAPON_B, f, VOL_BASE, ATTN_MIN);
 
        return CMD_STATUS_FINISHED;
 }
index 1f1b5319a490b6a00c1c3287c0b3c5833b7a90cf..1d22cc7282713db37ab5cfa01b6cdb4e5a538e1b 100644 (file)
@@ -249,7 +249,7 @@ float CheatImpulse(float i)
                                e2 = spawn();
                                setorigin(e2, org);
                                pointparticles(particleeffectnum("rocket_explode"), org, '0 0 0', 1);
-                               asound(e2, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                               sound(e2, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
                                RadiusDamage(e2, e, 1000, 0, 128, e, 500, DEATH_CHEAT, world);
                                remove(e2);
                        }
index 5581aa4cc250fb2c141d5f88db65370869291f59..5b9c8d907eab2796fef9b546761472e28b32f450 100644 (file)
@@ -1060,7 +1060,7 @@ void PutClientInServer (void)
                //stuffcmd(self, "set viewsize $tmpviewsize \n");
 
                if (autocvar_g_spawnsound)
-                       asound (self, CH_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)
@@ -1987,7 +1987,7 @@ void play_countdown(float finished, string samp)
        if(clienttype(self) == CLIENTTYPE_REAL)
                if(floor(finished - time - frametime) != floor(finished - time))
                        if(finished - time < 6)
-                               asound (self, CH_INFO, samp, VOL_BASE, ATTN_NORM);
+                               sound (self, CH_INFO, samp, VOL_BASE, ATTN_NORM);
 }
 
 /**
@@ -2038,12 +2038,12 @@ void player_powerups (void)
 
        if((self.items & IT_USING_JETPACK) && !self.deadflag)
        {
-               SoundEntity_StartSound(self, CH_TRIGGER, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
+               SoundEntity_StartSound(self, CH_TRIGGER_SINGLE, "misc/jetpack_fly.wav", VOL_BASE, autocvar_g_jetpack_attenuation);
                self.modelflags |= MF_ROCKET;
        }
        else
        {
-               SoundEntity_StopSound(self, CH_TRIGGER);
+               SoundEntity_StopSound(self, CH_TRIGGER_SINGLE);
                self.modelflags &~= MF_ROCKET;
        }
 
index f66d5b34b6032fdc2fec2c2ceeb81c4cc0f026a8..0ba5f1d1055d68605fe6e117585c5e4257dd7fe0 100644 (file)
@@ -341,11 +341,11 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float
        if(sound_allowed(MSG_BROADCAST, attacker))
        {
                if (save > 10)
-                       asound (self, CH_SHOTS, "misc/armorimpact.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_SHOTS_SINGLE, "misc/armorimpact.wav", VOL_BASE, ATTN_NORM);
                else if (take > 30)
-                       asound (self, CH_SHOTS, "misc/bodyimpact2.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_SHOTS_SINGLE, "misc/bodyimpact2.wav", VOL_BASE, ATTN_NORM);
                else if (take > 10)
-                       asound (self, CH_SHOTS, "misc/bodyimpact1.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_SHOTS_SINGLE, "misc/bodyimpact1.wav", VOL_BASE, ATTN_NORM);
        }
 
        if (take > 50)
@@ -458,11 +458,11 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
        if(sound_allowed(MSG_BROADCAST, attacker))
        {
                if (save > 10)
-                       asound (self, CH_SHOTS, "misc/armorimpact.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_SHOTS_SINGLE, "misc/armorimpact.wav", VOL_BASE, ATTN_NORM);
                else if (take > 30)
-                       asound (self, CH_SHOTS, "misc/bodyimpact2.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_SHOTS_SINGLE, "misc/bodyimpact2.wav", VOL_BASE, ATTN_NORM);
                else if (take > 10)
-                       asound (self, CH_SHOTS, "misc/bodyimpact1.wav", VOL_BASE, ATTN_NORM); // FIXME possibly remove them?
+                       sound (self, CH_SHOTS_SINGLE, "misc/bodyimpact1.wav", VOL_BASE, ATTN_NORM); // FIXME possibly remove them?
        }
 
        if (take > 50)
@@ -1163,15 +1163,15 @@ void FakeGlobalSound(string sample, float chan, float voicetype)
                        {
                                msg_entity = self;
                                if(clienttype(msg_entity) == CLIENTTYPE_REAL)
-                                       soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NONE);
                        }
                        break;
                case VOICETYPE_TEAMRADIO:
                        msg_entity = self;
                        if(msg_entity.cvar_cl_voice_directional == 1)
-                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN, 0, SOUNDFLAG_AUTO);
+                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);
                        else
-                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                        break;
                case VOICETYPE_AUTOTAUNT:
                        if(!sv_autotaunt)
@@ -1185,9 +1185,9 @@ void FakeGlobalSound(string sample, float chan, float voicetype)
                        if (tauntrand < msg_entity.cvar_cl_autotaunt)
                        {
                                if (msg_entity.cvar_cl_voice_directional >= 1)
-                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX), 0, SOUNDFLAG_AUTO);
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));
                                else
-                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                        }
                        break;
                case VOICETYPE_TAUNT:
@@ -1200,13 +1200,13 @@ void FakeGlobalSound(string sample, float chan, float voicetype)
                                break;
                        msg_entity = self;
                        if (msg_entity.cvar_cl_voice_directional >= 1)
-                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX), 0, SOUNDFLAG_AUTO);
+                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));
                        else
-                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                        break;
                case VOICETYPE_PLAYERSOUND:
                        msg_entity = self;
-                       soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NORM, 0, SOUNDFLAG_AUTO);
+                       soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NORM);
                        break;
                default:
                        backtrace("Invalid voice type!");
@@ -1238,9 +1238,9 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if(clienttype(msg_entity) == CLIENTTYPE_REAL)
                                {
                                        if(msg_entity.cvar_cl_voice_directional == 1)
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);
                                        else
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                                }
                        }
                        break;
@@ -1251,13 +1251,13 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if(clienttype(msg_entity) == CLIENTTYPE_REAL)
                                {
                                        if(msg_entity.cvar_cl_voice_directional == 1)
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);
                                        else
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                                }
                                msg_entity = self;
                                if(clienttype(msg_entity) == CLIENTTYPE_REAL)
-                                       soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASE, ATTN_NONE);
                        }
                        break;
                case VOICETYPE_TEAMRADIO:
@@ -1265,9 +1265,9 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if(!teamplay || msg_entity.team == self.team)
                                {
                                        if(msg_entity.cvar_cl_voice_directional == 1)
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN);
                                        else
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                                }
                        break;
                case VOICETYPE_AUTOTAUNT:
@@ -1282,9 +1282,9 @@ void GlobalSound(string sample, float chan, float voicetype)
                                if (tauntrand < msg_entity.cvar_cl_autotaunt)
                                {
                                        if (msg_entity.cvar_cl_voice_directional >= 1)
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX), 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));
                                        else
-                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                               soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                                }
                        break;
                case VOICETYPE_TAUNT:
@@ -1298,13 +1298,13 @@ void GlobalSound(string sample, float chan, float voicetype)
                        FOR_EACH_REALCLIENT(msg_entity)
                        {
                                if (msg_entity.cvar_cl_voice_directional >= 1)
-                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX), 0, SOUNDFLAG_AUTO);
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, bound(ATTN_MIN, msg_entity.cvar_cl_voice_directional_taunt_attenuation, ATTN_MAX));
                                else
-                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+                                       soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_NONE);
                        }
                        break;
                case VOICETYPE_PLAYERSOUND:
-                       asound(self, chan, sample, VOL_BASE, ATTN_NORM);
+                       sound(self, chan, sample, VOL_BASE, ATTN_NORM);
                        break;
                default:
                        backtrace("Invalid voice type!");
index 044bdba1f398276bd8df5b320081a36cf5df0f0b..9e59a4c5554edb9205d74ea6549893aff2641b06 100644 (file)
@@ -375,7 +375,7 @@ void W_WeaponFrame()
                        {
 #endif
                        // UGLY WORKAROUND: play this on CH_WEAPON_B so it can't cut off fire sounds
-                       asound (self, CH_WEAPON_B, "weapons/weapon_switch.wav", VOL_BASE, ATTN_NORM);
+                       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 8203a3191c7be774224d4c7b4de5af0fd6c840ae..3d7a33278d15201ce89b789f1a03f9441e0d0be8 100644 (file)
@@ -245,7 +245,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                ent.punchangle_x = recoil * -1;
 
        if (snd != "")
-               asound (ent, chan, snd, VOL_BASE, ATTN_NORM);
+               sound (ent, chan, snd, VOL_BASE, ATTN_NORM);
 
        if(ent.items & IT_STRENGTH)
        if(!g_minstagib)
@@ -255,7 +255,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                (time > ent.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)
        ) // prevent insane sound spam
        {
-               asound(ent, CH_TRIGGER, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM);
+               sound(ent, CH_TRIGGER, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM);
                ent.prevstrengthsound = time;
        }
        ent.prevstrengthsoundattempt = time;
@@ -1063,7 +1063,7 @@ float weapon_prepareattack_checkammo(float secondary)
 
                if(self.weapon == self.switchweapon && time - self.prevdryfire > 1) // only play once BEFORE starting to switch weapons
                {
-                       asound (self, CH_WEAPON_A, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
+                       sound (self, CH_WEAPON_A, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
                        self.prevdryfire = time;
                }
 
@@ -1733,7 +1733,7 @@ void W_Reload(float sent_ammo_min, float sent_ammo_amount, float sent_time, stri
 
        // now begin the reloading process
 
-       asound (self, CH_WEAPON_B, 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 3ea9f903ef96502cc0f4ef2df0bd24dab6e424f6..d88ae5d375ca8258224b187fd06f428aeaf0bc9f 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);
-       asound (p, CH_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");
 
-                       asound (self, CH_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");
-                       asound (self, CH_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);
                }
@@ -493,7 +493,7 @@ void FlagTouch()
                        }
                }
 
-               asound (other, CH_TRIGGER, self.noise2, VOL_BASE, ATTN_NONE);
+               sound (other, CH_TRIGGER, self.noise2, VOL_BASE, ATTN_NONE);
                WaypointSprite_DetachCarrier(other);
                if(self.speedrunning)
                        FakeTimeLimit(other, -1);
@@ -531,7 +531,7 @@ void FlagTouch()
                self.dropperid = other.playerid;
                PlayerScore_Add(other, SP_CTF_PICKUPS, 1);
                LogCTF("steal", self.team, other);
-               asound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
+               sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
 
                FOR_EACH_PLAYER(player)
                        if(player.team == self.team)
@@ -586,7 +586,7 @@ void FlagTouch()
                        }
                        PlayerScore_Add(other, SP_CTF_RETURNS, 1);
                        LogCTF("return", self.team, other);
-                       asound (other, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NONE);
+                       sound (other, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NONE);
                        ReturnFlag(self);
                }
                else if (!other.flagcarried && (other.playerid != self.dropperid || time > self.ctf_droptime + autocvar_g_balance_ctf_delay_collect))
@@ -618,7 +618,7 @@ void FlagTouch()
                        UpdateFrags(other, f);
                        PlayerScore_Add(other, SP_CTF_PICKUPS, 1);
                        LogCTF("pickup", self.team, other);
-                       asound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
 
                        FOR_EACH_PLAYER(player)
                                if(player.team == self.team)
index 96e4b5f07dc190b3909fcf0b082716fb310c6270..a6cc9a88de0ac6d9f90f0775f3673d01d94c753f 100644 (file)
@@ -109,9 +109,9 @@ void dompoint_captured ()
 
        if (head.noise != "")
                if(self.enemy)
-                       asound(self.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTN_NORM);
+                       sound(self.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTN_NORM);
                else
-                       asound(self, CH_TRIGGER, head.noise, VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
        if (head.noise1 != "")
                play2all(head.noise1);
 
index 76b16de967cc06c67f5d75aa7789c686d2182084..2240d8f1c1357ea5a5b9f56d0581de0bdce31a00 100644 (file)
@@ -296,6 +296,29 @@ float EF_LOWPRECISION = 4194304;
 //description:
 //this is a very special capability, attachs the entity to the view of the client specified, origin and angles become relative to the view of that client, all effects can be used (multiple skins on a weapon model etc)...  the entity is not visible to any other client.
 
+//DP_GECKO_SUPPORT
+//idea: Res2k, BlackHC
+//darkplaces implementation: Res2k, BlackHC
+//constant definitions:
+float GECKO_BUTTON_DOWN         = 0;
+float GECKO_BUTTON_UP           = 1;
+// either use down and up or just press but not all of them!
+float GECKO_BUTTON_PRESS        = 2;
+// use this for mouse events if needed?
+float GECKO_BUTTON_DOUBLECLICK  = 3;
+//builtin definitions:
+float(string name) gecko_create( string name ) = #487;
+void(string name) gecko_destroy( string name ) = #488;
+void(string name) gecko_navigate( string name, string URI ) = #489;
+float(string name) gecko_keyevent( string name, float key, float eventtype ) = #490;
+void gecko_mousemove( string name, float x, float y ) = #491;
+void gecko_resize( string name, float w, float h ) = #492;
+vector gecko_get_texture_extent( string name ) = #493;
+//engine-called QC prototypes:
+//string(string name, string query) Qecko_Query;
+//description:
+//provides an interface to the offscreengecko library and allows for internet browsing in games
+
 //DP_GFX_EXTERNALTEXTURES
 //idea: LordHavoc
 //darkplaces implementation: LordHavoc
@@ -1212,30 +1235,29 @@ float(string name, string value) registercvar = #93;
 //builtin definitions:
 void(entity e, float chan, string samp, float vol, float atten, float speed, float flags) sound7 = #8;
 float SOUNDFLAG_RELIABLE = 1;
-float SOUNDFLAG_AUTO = 128;
 //description:
 //plays a sound, with some more flags
 //extensions to sound():
-//- channel may be in the range from 0 to 127; channel 0 is NOT magic in any
-//  way
+//- channel may be in the range from -128 to +127; channels -128 to 0 are
+//  "automatic" channels, i.e. they can run multiple voices at once
+//  like CHAN_AUTO does
 //- a speed parameter has been reserved for later addition of pitch shifting.
 //  it MUST be set to 0 for now, meaning "no pitch change"
 //- the flag SOUNDFLAG_RELIABLE can be specified, which makes the sound send
 //  to MSG_ALL (reliable) instead of MSG_BROADCAST (unreliable, default);
 //  similarily, SOUNDFLAG_RELIABLE_TO_ONE sends to MSG_ONE
-//- the flag SOUNDFLAG_AUTO can be specified, which makes the sound not stop
-//  other sounds on the same channel, and not be stopped by other sounds on the
-//  same channel
-//- channel 0 is controlled by snd_channel0volume; channel 1 by
-//  snd_channel1volume, etc.; however, the mod MUST define snd_channel8volume and
-//  upwards in default.cfg if they are to be used, as the engine does not create
-//  them to not litter the cvar list
+//- channel 0 is controlled by snd_channel0volume; channels +1 and -1 are
+//  controlled by snd_channel1volume, etc. (so positive and negative same numbered
+//  channel use the same control cvar); however, the mod MUST define
+//  snd_channel8volume and upwards in default.cfg if they are to be used,
+//  as the engine does not create them to not litter the cvar list
 //- this extension applies to CSQC as well; CSQC_Event_Sound will get speed and
 //  flags as extra 7th and 8th argument
 //- WIP2 ideas: SOUNDFLAG_RELIABLE_TO_ONE, SOUNDFLAG_NOPHS, SOUNDFLAG_FORCELOOP
 //- NOTE: to check for this, ALSO OR a check with DP_SND_SOUND7 to also support
 //  the finished extension once done
 
+
 //DP_SND_OGGVORBIS
 //idea: Transfusion
 //darkplaces implementation: Elric
index b4594f37cb4fe46ace96a9fec5761f6a9bfc2975..4a0e8d922ce3a55fb4cbb60e433e6db27c33e7bc 100644 (file)
@@ -162,7 +162,7 @@ void func_breakable_destroy() {
        func_breakable_destroyed();
 
        if(self.noise)
-               asound (self, CH_TRIGGER, 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 5dafc1055aacb24175dcd7e58ce9b19b31e86302..0437f804328410e2ebb609443c80d451c552241b 100644 (file)
@@ -66,7 +66,7 @@ void GrapplingHookThink();
 void GrapplingHook_Stop()
 {
        pointparticles(particleeffectnum("grapple_impact"), self.origin, '0 0 0', 1);
-       asound (self, CH_SHOTS, "weapons/hook_impact.wav", VOL_BASE, ATTN_NORM);
+       sound (self, CH_SHOTS_SINGLE, "weapons/hook_impact.wav", VOL_BASE, ATTN_NORM);
 
        self.state = 1;
        self.think = GrapplingHookThink;
@@ -300,7 +300,7 @@ void FireGrapplingHook (void)
        vs = hook_shotorigin[s];
 
        // UGLY WORKAROUND: play this on CH_WEAPON_B so it can't cut off fire sounds
-       asound (self, CH_WEAPON_B, "weapons/hook_fire.wav", VOL_BASE, ATTN_NORM);
+       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 1d88d838949dac28ce20660396061193cb950584..2b96b967a065bd25a959b33c4311177f49cdbac4 100644 (file)
@@ -171,7 +171,7 @@ void multi_trigger()
        }
 
        if (self.noise)
-               asound (self.enemy, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self.enemy, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
 
 // don't trigger again until reset
        self.takedamage = DAMAGE_NO;
@@ -554,7 +554,7 @@ void trigger_heal_touch()
                        {
                                other.health = min(other.health + self.health, self.max_health);
                                other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
-                               asound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+                               sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                        }
                }
        }
@@ -665,7 +665,7 @@ void trigger_gravity_touch()
        {
                other.gravity = g;
                if(self.noise != "")
-                       asound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                UpdateCSQCProjectile(self.owner);
        }
 };
@@ -691,7 +691,7 @@ void spawnfunc_trigger_gravity()
 
 //=============================================================================
 
-// TODO add a way to do looped sounds with csound(); then complete this entity
+// TODO add a way to do looped sounds with sound(); then complete this entity
 .float volume, atten;
 void target_speaker_use_off();
 void target_speaker_use_activator()
@@ -721,7 +721,7 @@ void target_speaker_use_activator()
        else
                snd = self.noise;
        msg_entity = activator;
-       soundto(MSG_ONE, self, CH_TRIGGER, snd, VOL_BASE * self.volume, self.atten, 0, SOUNDFLAG_AUTO);
+       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;
-       csound(self, CH_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()
 {
-       csound(self, CH_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 ac8cf59b96a31aac25427dca6505c3f0ae4642ef..69704999725bf1cb45e5a198a6b32b63af719707 100644 (file)
@@ -1344,41 +1344,25 @@ float sound_allowed(float dest, entity e)
     return TRUE;
 }
 
-#undef asound
-#undef csound
 #ifdef COMPAT_XON010_CHANNELS
 void(entity e, float chan, string samp, float vol, float atten) sound_builtin = #8;
-void asound(entity e, float chan, string samp, float vol, float atten)
-{
-    if (!sound_allowed(MSG_BROADCAST, e))
-        return;
-    if(chan == CH_TRIGGER && e.flags & FL_CLIENT)
-           chan = 0;
-    sound_builtin(e, chan, samp, vol, atten);
-}
-void csound(entity e, float chan, string samp, float vol, float atten)
+void sound(entity e, float chan, string samp, float vol, float atten)
 {
     if (!sound_allowed(MSG_BROADCAST, e))
         return;
     sound_builtin(e, chan, samp, vol, atten);
 }
 #else
-void asound(entity e, float chan, string samp, float vol, float atten)
-{
-    if (!sound_allowed(MSG_BROADCAST, e))
-        return;
-    sound7(e, chan, samp, vol, atten, 0, SOUNDFLAG_AUTO);
-}
-void csound(entity e, float chan, string samp, float vol, float atten)
+#undef sound
+void sound(entity e, float chan, string samp, float vol, float atten)
 {
     if (!sound_allowed(MSG_BROADCAST, e))
         return;
     sound7(e, chan, samp, vol, atten, 0, 0);
 }
 #endif
-#define sound DONOTUSE
 
-void soundtoat(float dest, entity e, vector o, float chan, string samp, float vol, float atten, float pitchshift, float fl)
+void soundtoat(float dest, entity e, vector o, float chan, string samp, float vol, float atten)
 {
     float entno, idx;
 
@@ -1388,18 +1372,6 @@ void soundtoat(float dest, entity e, vector o, float chan, string samp, float vo
     entno = num_for_edict(e);
     idx = precache_sound_index(samp);
 
-    chan &~= 0x80;
-    if(fl & SOUNDFLAG_AUTO)
-    {
-           if(chan != 0)
-                   chan |= 0x80;
-    }
-    else
-    {
-           if(chan == 0)
-                   chan |= 0x80;
-    }
-
     float sflags;
     sflags = 0;
 
@@ -1439,7 +1411,7 @@ void soundtoat(float dest, entity e, vector o, float chan, string samp, float vo
     WriteCoord(dest, o_y);
     WriteCoord(dest, o_z);
 }
-void soundto(float dest, entity e, float chan, string samp, float vol, float atten, float pitchshift, float pl)
+void soundto(float dest, entity e, float chan, string samp, float vol, float atten)
 {
     vector o;
 
@@ -1447,11 +1419,11 @@ void soundto(float dest, entity e, float chan, string samp, float vol, float att
         return;
 
     o = e.origin + 0.5 * (e.mins + e.maxs);
-    soundtoat(dest, e, o, chan, samp, vol, atten, pitchshift, pl);
+    soundtoat(dest, e, o, chan, samp, vol, atten);
 }
-void soundat(entity e, vector o, float chan, string samp, float vol, float atten, float pitchshift, float pl)
+void soundat(entity e, vector o, float chan, string samp, float vol, float atten)
 {
-    soundtoat(((chan & 8) ? MSG_ALL : MSG_BROADCAST), e, o, chan, samp, vol, atten, pitchshift, pl);
+    soundtoat(((chan & 8) ? MSG_ALL : MSG_BROADCAST), e, o, chan, samp, vol, atten);
 }
 void stopsoundto(float dest, entity e, float chan)
 {
@@ -1500,7 +1472,7 @@ void play2(entity e, string filename)
 {
     //stuffcmd(e, strcat("play2 ", filename, "\n"));
     msg_entity = e;
-    soundtoat(MSG_ONE, world, '0 0 0', CH_INFO, filename, VOL_BASE, ATTN_NONE, 0, SOUNDFLAG_AUTO);
+    soundtoat(MSG_ONE, world, '0 0 0', CH_INFO, filename, VOL_BASE, ATTN_NONE);
 }
 
 // use this one if you might be causing spam (e.g. from touch functions that might get called more than once per frame)
@@ -1513,7 +1485,7 @@ float spamsound(entity e, float chan, string samp, float vol, float atten)
     if (time > e.spamtime)
     {
         e.spamtime = time;
-        asound(e, chan, samp, vol, atten);
+        sound(e, chan, samp, vol, atten);
         return TRUE;
     }
     return FALSE;
@@ -1538,7 +1510,7 @@ void play2all(string samp)
     if (autocvar_bot_sound_monopoly)
         return;
 
-    asound(world, CH_INFO, samp, VOL_BASE, ATTN_NONE);
+    sound(world, CH_INFO, samp, VOL_BASE, ATTN_NONE);
 }
 
 void PrecachePlayerSounds(string f);
@@ -2842,7 +2814,7 @@ void SoundEntity_StartSound(entity pl, float chan, string samp, float vol, float
     p = pow(2, chan);
     if (pl.soundentity.cnt & p)
         return;
-    soundtoat(MSG_ALL, pl.soundentity, gettaginfo(pl.soundentity, 0), chan, samp, vol, attn, 0, 0);
+    soundtoat(MSG_ALL, pl.soundentity, gettaginfo(pl.soundentity, 0), chan, samp, vol, attn);
     pl.soundentity.cnt |= p;
 }
 
index da227980921853701d99c66984ebacd293c424c9..5662f95bd29149fec1b8c2a1385c6e2e71ce50ab 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.
-                       asound(self, CH_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);
-                       asound(self, CH_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);
-               asound(self, CH_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);
-               asound(self, CH_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);
-               asound(self, CH_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)
        {
-               asound(self, CH_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)
-                       asound(self, CH_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
                else
-                       asound(self, CH_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)
-               asound(self, CH_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
-               asound(self, CH_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)
        {
-               asound(self, CH_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;
@@ -1104,9 +1104,9 @@ void onslaught_controlpoint_icon_think()
                pointparticles(particleeffectnum("electricity_sparks"), self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
 
                if(random() > 0.8)
-                       asound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTN_NORM);
                else if (random() > 0.5)
-                       asound(self, CH_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTN_NORM);
        }
 };
 
@@ -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;
-               asound(self, CH_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
-       asound(e, CH_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 c3c25bb7bc3d39c4d3a613ef1e7e4ab1c4c7b0a2..b7c775578cc22b339a0c124e87c63c08a9d97ac8 100644 (file)
@@ -117,7 +117,7 @@ void() t_movetarget =
 
        /* PLEASE FIX THE SOUND CHANNEL BEFORE ACTIVATING THIS
        if (self.classname == "monster_ogre")
-               asound (self, CHAN_VOICE, "ogre/ogdrag.wav", 1, ATTN_IDLE);// play chainsaw drag sound
+               sound (self, CHAN_VOICE, "ogre/ogdrag.wav", 1, ATTN_IDLE);// play chainsaw drag sound
        */
 
 //dprint ("t_movetarget\n");
@@ -172,7 +172,7 @@ void() monster_wanderpathtouch =
 
        /* PLEASE FIX THE SOUND CHANNEL BEFORE ACTIVATING THIS
        if (other.classname == "monster_ogre")
-               asound (other, CHAN_VOICE, "ogre/ogdrag.wav", 1, ATTN_IDLE);// play chainsaw drag sound
+               sound (other, CHAN_VOICE, "ogre/ogdrag.wav", 1, ATTN_IDLE);// play chainsaw drag sound
        */
        monster_wanderpaththink();
 };
index 98601b6065a284bf04918851467bd580eb29d268..ceb3f207cc45d59c3f50d218a1c6ad61af75dc94 100644 (file)
@@ -105,7 +105,7 @@ void(float a) monster_setalpha =
                        {
                                // blink for an instant, this causes the appear sound, alarming the player as if under attack
                                /* PLEASE FIX THE SOUND CHANNEL BEFORE ACTIVATING THIS
-                               asound(self, CHAN_AUTO, "wizard/wsight.wav", 1, ATTN_NORM);
+                               sound(self, CHAN_AUTO, "wizard/wsight.wav", 1, ATTN_NORM);
                                */
                                a = 1;
                        }
@@ -121,7 +121,7 @@ void(float a) monster_setalpha =
                        // if unghosting, make sure we have an enemy, otherwise stay ghosted (even if blinking) so we can't be shot while blinking
                        /* PLEASE FIX THE SOUND CHANNEL BEFORE ACTIVATING THIS
                        if (self.solid != SOLID_SLIDEBOX)
-                               asound(self, CHAN_AUTO, "wizard/wsight.wav", 1, ATTN_NORM);
+                               sound(self, CHAN_AUTO, "wizard/wsight.wav", 1, ATTN_NORM);
                        */
                        self.solid = SOLID_SLIDEBOX;
                        self.takedamage = DAMAGE_AIM;
index b4c4b3391ab2293a5d4eb6edd6abb61fc134c072..ac6d5dccdb86fa63bcd504b0f1a9bbc13718efc1 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);    
 
-               asound(self, CH_TRIGGER, "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);
-               asound(self, CH_TRIGGER, "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; }
@@ -128,7 +128,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
        WriteString(MSG_BROADCAST, strcat("\n\n", other.netname, "^7 has picked up the ball!\n"));
-       asound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
+       sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
        PlayerScore_Add(other, SP_KEEPAWAY_PICKUPS, 1);
@@ -170,7 +170,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
        Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
        WriteString(MSG_BROADCAST, strcat("\n\n", plyr.netname, "^7 has dropped the ball!\n"));
-       asound(plyr, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);  // ATTN_NONE (it's a sound intended to be heard anywhere) 
+       sound(plyr, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);   // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
        // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
index 4667a6e525cf49fb45b4a3df20c3bbdbbc2cecc6..decada0312d4536537d9ab519b5b46cb822a04c8 100644 (file)
@@ -413,7 +413,7 @@ void kh_Key_Damage(entity inflictor, entity attacker, float damage, float deatht
 
 void kh_Key_Collect(entity key, entity player)  //a player picks up a dropped key
 {
-       asound(player, CH_TRIGGER, kh_sound_collect, VOL_BASE, ATTN_NORM);
+       sound(player, CH_TRIGGER, kh_sound_collect, VOL_BASE, ATTN_NORM);
 
        if(key.kh_dropperteam != player.team)
        {
@@ -664,7 +664,7 @@ void kh_Key_Think()  // runs all the time
        {
                if(self.siren_time < time)
                {
-                       asound(self.owner, CH_TRIGGER, kh_sound_alarm, VOL_BASE, ATTN_NORM);  // play a simple alarm
+                       sound(self.owner, CH_TRIGGER, kh_sound_alarm, VOL_BASE, ATTN_NORM);  // play a simple alarm
                        self.siren_time = time + 2.5;  // repeat every 2.5 seconds
                }
 
@@ -799,7 +799,7 @@ void kh_Key_DropOne(entity key)
        key.pushltime = time + autocvar_g_balance_keyhunt_protecttime;
        key.kh_dropperteam = key.team;
 
-       asound(player, CH_TRIGGER, kh_sound_drop, VOL_BASE, ATTN_NORM);
+       sound(player, CH_TRIGGER, kh_sound_drop, VOL_BASE, ATTN_NORM);
 }
 
 void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies
@@ -825,7 +825,7 @@ void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies
                        if(suicide)
                                key.kh_dropperteam = player.team;
                }
-               asound(player, CH_TRIGGER, kh_sound_drop, VOL_BASE, ATTN_NORM);
+               sound(player, CH_TRIGGER, kh_sound_drop, VOL_BASE, ATTN_NORM);
        }
 }
 
index 8a26858b805d720fc557278d2a33de4dc959d764..3ee7b5597d82d3752c55927d52d6bd389b775478 100644 (file)
@@ -222,7 +222,7 @@ void InitBall (void)
        self.teamtime = 0;
        self.pusher = world;
        self.team = FALSE;
-       asound (self, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+       sound (self, CH_TRIGGER_SINGLE, 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)
                {
-                       asound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (self, CH_TRIGGER_SINGLE, 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) {
-               asound (self, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self, CH_TRIGGER_SINGLE, 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;
        }
 
-       asound (ball, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
+       sound (ball, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
 
        if(ball.team && pscore)
        {
@@ -604,7 +604,7 @@ void W_Nexball_Touch (void)
                if(!attacker.ballcarried)
                {
                        LogNB("stole", attacker);
-                       asound (other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTN_NORM);
 
                        if(attacker.team == other.team && time > attacker.teamkill_complain)
                        {
index 677013cb7aa82c4837f34318dea932ae6e96d5cb..af7e8b415c8a9a338be5a821cd79e6898f06c6e2 100644 (file)
@@ -394,14 +394,14 @@ void Portal_Remove(entity portal, float killed)
        if(killed)
        {
                fixedmakevectors(portal.mangle);
-               asound(portal, CH_SHOTS, "porto/explode.wav", VOL_BASE, ATTN_NORM);
+               sound(portal, CH_SHOTS_SINGLE, "porto/explode.wav", VOL_BASE, ATTN_NORM);
                pointparticles(particleeffectnum("rocket_explode"), portal.origin + v_forward * 16, v_forward * 1024, 4);
                remove(portal);
        }
        else
        {
                Portal_MakeBrokenPortal(portal);
-               asound(portal, CH_SHOTS, "porto/expire.wav", VOL_BASE, ATTN_NORM);
+               sound(portal, CH_SHOTS_SINGLE, "porto/expire.wav", VOL_BASE, ATTN_NORM);
                SUB_SetFade(portal, time, 0.5);
        }
 }
index b63a0b6e87e27955629a65cf81993a140a2d985d..d11a7e3fd0651819c60945e5b11f7393565ee596 100644 (file)
@@ -43,7 +43,7 @@ void CreatureFrame (void)
                                        if (self.watersound_finished < time)
                                        {
                                                self.watersound_finished = time + 0.5;
-                                               asound (self, CH_PLAYER, "player/lava.wav", VOL_BASE, ATTN_NORM);
+                                               sound (self, CH_PLAYER, "player/lava.wav", VOL_BASE, ATTN_NORM);
                                        }
                                        Damage (self, world, world, 6 * self.waterlevel, DEATH_LAVA, self.origin, '0 0 0');
                                }
@@ -52,7 +52,7 @@ void CreatureFrame (void)
                                        if (self.watersound_finished < time)
                                        {
                                                self.watersound_finished = time + 0.5;
-                                               asound (self, CH_PLAYER, "player/slime.wav", VOL_BASE, ATTN_NORM);
+                                               sound (self, CH_PLAYER, "player/slime.wav", VOL_BASE, ATTN_NORM);
                                        }
                                        Damage (self, world, world, 2 * self.waterlevel, DEATH_SLIME, self.origin, '0 0 0');
                                }
index 4be3044c44b21c759b46b45354b2273dffde40c0..001063585b107faa2411b76a6500d0f4799e549f 100644 (file)
@@ -146,11 +146,11 @@ void Item_Respawn (void)
 {
        Item_Show(self, 1);
        if(!g_minstagib && self.items == IT_STRENGTH)
-               asound (self, CH_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)
-               asound (self, CH_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
-               asound (self, CH_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);
                        }
                }
-               asound (self, CH_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);
@@ -447,7 +447,7 @@ float Item_GiveTo(entity item, entity player)
        if (!pickedup)
                return 0;
 
-       asound (player, CH_TRIGGER, item.item_pickupsound, VOL_BASE, ATTN_NORM);
+       sound (player, CH_TRIGGER, item.item_pickupsound, VOL_BASE, ATTN_NORM);
        if (_switchweapon)
                if (player.switchweapon != w_getbestweapon(player))
                        W_SwitchWeapon_Force(player, w_getbestweapon(player));
@@ -1532,12 +1532,12 @@ void GiveSound(entity e, float v0, float v1, float t, string snd_incr, string sn
        if(v1 <= v0 - t)
        {
                if(snd_decr != "")
-                       asound (e, CH_TRIGGER, snd_decr, VOL_BASE, ATTN_NORM);
+                       sound (e, CH_TRIGGER, snd_decr, VOL_BASE, ATTN_NORM);
        }
        else if(v0 >= v0 + t)
        {
                if(snd_incr != "")
-                       asound (e, CH_TRIGGER, snd_incr, VOL_BASE, ATTN_NORM);
+                       sound (e, CH_TRIGGER, snd_incr, VOL_BASE, ATTN_NORM);
        }
 }
 
index 790de794cd642cf687365b93c8d189d2a6a5b987..18dbef1711424dd28e5864c58fc0adc0d30d2112 100644 (file)
@@ -155,7 +155,7 @@ void trigger_push_touch()
                {
                        // flash when activated
                        pointparticles(particleeffectnum("jumppad_activate"), other.origin, other.velocity, 1);
-                       asound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                        self.pushltime = time + 0.2;
                }
                local float ct;
index e7d95281ff8b5bd0fb8d438b08063190ca259eba..39d206696bf58adfc7dc9caea391b65ab4660a8c 100644 (file)
@@ -62,7 +62,7 @@ void plat_spawn_inside_trigger()
 
 void plat_hit_top()
 {
-       csound (self, CH_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()
 {
-       csound (self, CH_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()
 {
-       csound (self, CH_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()
 {
-       csound (self, CH_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, CH_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 != "")
-               csound(self, CH_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, CH_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE, 0, 0);
+               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, CH_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE, 0, 0);
+               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 != "")
-               asound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound (self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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 != "")
-               csound(self, CH_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, CH_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE, 0, 0);
+               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, CH_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE, 0, 0);
+               soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
        }
 
        if(!self.targetfactor)
index fbc1afdeb02e93f084a5a17025c7d232b18a62a6..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)
-                       asound (player, CH_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 8c5ae48c3d1c6afe0af956c9acb039e404cb4040..86f5c44021ba6f987c8333e7fa5f3d456b82f8a4 100644 (file)
@@ -29,7 +29,7 @@ void ewheel_attack()
     {
         turret_do_updates(self);
 
-        asound (self, CH_WEAPON_A, "weapons/lasergun_fire.wav", VOL_BASE, ATTN_NORM);
+        sound (self, CH_WEAPON_A, "weapons/lasergun_fire.wav", VOL_BASE, ATTN_NORM);
         pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
         proj                    = spawn ();
index f3d980fa5d4c977dee526388c20adaa38e63117c..e5360d88776a497533532b67af277d91dfbcf90a 100644 (file)
@@ -9,7 +9,7 @@ void turret_flac_attack()
 
     turret_tag_fire_update();
 
-    asound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
     proj = spawn ();
     setorigin(proj, self.tur_shotorg);
     setsize(proj, '0 0 0', '0 0 0');
index 769462dd0d6303f22a00e79acafac3e8f67f4922..84f8e90028aee2881264b0a74b8e23ec03882b1e 100644 (file)
@@ -32,7 +32,7 @@ void turret_hellion_attack()
        else
                self.tur_shotorg = gettaginfo(self.tur_head, gettagindex(self.tur_head, "tag_fire2"));
     
-    asound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
 
     missile = spawn ();
     setorigin(missile, self.tur_shotorg);
index 7e7a4d62bbe5162ea7b134e7d9cade6c06400777..5ad222fa09c93ffbee62968df451a2864f6db7b2 100644 (file)
@@ -85,7 +85,7 @@ void turret_hk_attack()
     local entity missile;
     //local entity flash2;
 
-    asound (self, CH_WEAPON_A, "weapons/rocket_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/rocket_fire.wav", VOL_BASE, ATTN_NORM);
 
     missile                    = spawn ();
     missile.solid            = SOLID_BBOX;
index dff467d653f8b894bb494c57f4707b920760b4ab..990385fda221c544d7376e31252a88638589a711 100644 (file)
@@ -22,7 +22,7 @@ void turret_mlrs_attack()
 
     turret_tag_fire_update();
 
-    asound (self, CH_WEAPON_A, "weapons/rocket_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/rocket_fire.wav", VOL_BASE, ATTN_NORM);
 
     missile                    = spawn ();
     setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
index 2340b949ccdee8bdfc8e8408370ba1e9724828e5..7c32882db44135d1ba98f69148fa8efcc6bd68c0 100644 (file)
@@ -40,7 +40,7 @@ void beam_think()
         self.owner.attack_finished_single = time + self.owner.shot_refire;
         self.owner.fireflag = 2;
         self.owner.tur_head.frame = 10;
-        csound (self, CH_SHOTS, "misc/null.wav", VOL_BASE, ATTN_NORM);
+        sound (self, CH_SHOTS_SINGLE, "", VOL_BASE, ATTN_NORM);
         remove(self);
         return;
     }
@@ -50,7 +50,7 @@ void beam_think()
     if (time - self.shot_spread > 0)
     {
         self.shot_spread = time + 2;
-        csound (self, CH_SHOTS, "turrets/phaser.wav", VOL_BASE, ATTN_NORM);
+        sound (self, CH_SHOTS_SINGLE, "turrets/phaser.wav", VOL_BASE, ATTN_NORM);
     }
 
 
@@ -94,7 +94,7 @@ void turret_phaser_attack()
     beam.enemy = self.enemy;
     beam.bot_dodge = TRUE;
     beam.bot_dodgerating = beam.shot_dmg;
-    csound (beam, CH_SHOTS, "turrets/phaser.wav", VOL_BASE, ATTN_NORM);
+    sound (beam, CH_SHOTS_SINGLE, "turrets/phaser.wav", VOL_BASE, ATTN_NORM);
     self.fireflag = 1;
 
     beam.attack_finished_single = self.attack_finished_single;
@@ -102,7 +102,7 @@ void turret_phaser_attack()
 
     setattachment(beam,self.tur_head,"tag_fire");
 
-    soundat (self, trace_endpos, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM, 0, 0);
+    soundat (self, trace_endpos, CH_SHOTS_SINGLE, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
 
     if (self.tur_head.frame == 0)
         self.tur_head.frame = 1;
index 662937f6d37e811a1b21b150b90f7a0e9775a668..7867310329452f9f3fca928caa3cb760d7a25628 100644 (file)
@@ -29,7 +29,7 @@ void turret_plasma_attack()
 {
     entity proj;
 
-    asound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
 
     proj                    = spawn ();
@@ -59,7 +59,7 @@ void turret_plasma_dual_attack()
 {
     entity proj;
 
-    asound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
     proj                    = spawn ();
     setorigin(proj, self.tur_shotorg);
     setsize(proj, '0 0 0', '0 0 0');
index 71c25cf80a348eb224c3c439391dad4805880c40..a438229cf5df53d264e077bebec549fa0c4970fc 100644 (file)
@@ -194,7 +194,7 @@ void walker_fire_rocket(vector org)
     rocket = spawn ();
     setorigin(rocket, org);
 
-    asound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/hagar_fire.wav", VOL_BASE, ATTN_NORM);
     setsize (rocket, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
 
     rocket.classname          = "walker_rocket";
@@ -525,7 +525,7 @@ void walker_postthink()
 
 void walker_attack()
 {
-    asound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
+    sound (self, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
     fireBallisticBullet (self.tur_shotorg, self.tur_shotdir_updated, self.shot_spread, self.shot_speed, 5, self.shot_dmg, 0, self.shot_force, DEATH_TURRET_WALKER_GUN, 0, 1, autocvar_g_balance_uzi_bulletconstant);
     endFireBallisticBullet();
     pointparticles(particleeffectnum("laser_muzzleflash"), self.tur_shotorg, self.tur_shotdir_updated * 1000, 1);
index 9a81aa3599130ca7b01406564aa61bb011dfe85c..9fbd6541fc8e6af51254de34bc4a2eb9e772ff91 100644 (file)
@@ -322,7 +322,7 @@ float racer_frame()
         {        
             self.sounds = 1;
             self.sound_nexttime = time + 10.922667; //soundlength("vehicles/racer_move.wav");
-            csound (self, CH_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");
-            csound (self, CH_TRIGGER, "vehicles/racer_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+            sound (self, CH_TRIGGER_SINGLE, "vehicles/racer_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
         }        
     }
     
@@ -358,13 +358,13 @@ float racer_frame()
         {        
             //self.sounds = 2;
             self.strength_finished = time + 10.922667; //soundlength("vehicles/racer_boost.wav");
-            csound (self.tur_head, CH_TRIGGER, "vehicles/racer_boost.wav", VOL_VEHICLEENGINE, ATTN_NORM);            
+            sound (self.tur_head, CH_TRIGGER_SINGLE, "vehicles/racer_boost.wav", VOL_VEHICLEENGINE, ATTN_NORM);            
         }        
     }
     else
     {
         self.strength_finished = 0;
-        csound (self.tur_head, CH_TRIGGER, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+        sound (self.tur_head, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
     }
         
 
@@ -505,7 +505,7 @@ void racer_exit(float eject)
     self.think      = racer_think;
     self.nextthink  = time;
     self.movetype   = MOVETYPE_TOSS;
-    csound (self.tur_head, CH_TRIGGER, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+    sound (self.tur_head, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
     
     if not (self.owner)
         return;
index c59ec3c55ec09c6b811d06a641a2a2a1b75099d2..a233577a972da587e4a7b9fd7e33e34dca557123 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");
-        csound (self, CH_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; 
-        //csound (self.tur_head, CH_TRIGGER, "vehicles/raptor_fly.wav", 1 - ftmp,   ATTN_NORM );
-        csound (self, CH_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)
     {
-        csound (self.tur_head, CH_TRIGGER, "", 1 - ftmp,   ATTN_NORM );
-        csound (self, CH_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;
     }
     */
@@ -563,7 +563,7 @@ void raptor_diethink()
 {
     if(random() < 0.1)
     {
-        asound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+        sound (self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
         pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
     }
     self.nextthink = time + 0.1;
index 2a1621394afebf2e99f312864b81d4d67bf0579e..81e1e5a1d84aa92d448dace9859d5e13fe354281 100644 (file)
@@ -238,13 +238,13 @@ float spiderbot_frame()
     {
         if(spider.frame == 4 && self.tur_head.wait != 0)
         {
-            csound (self, CH_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)
         {        
-            csound (self, CH_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");
-                    csound (self, CH_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");
-                        csound (self, CH_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");
-                        csound (self, CH_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");
                     }
                 }
@@ -342,7 +342,7 @@ float spiderbot_frame()
             fireBullet (v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
                 autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_SBMINIGUN, 0);
 
-            asound (gun, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
+            sound (gun, CH_WEAPON_A, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
             trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
             pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
 
@@ -508,7 +508,7 @@ void spiderbot_headfade()
     {
         if(self.alpha > 0.1)
         {
-            csound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+            sound (self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
             pointparticles(particleeffectnum("explosion_big"), self.origin + '0 0 100', '0 0 0', 1);
         }
         remove(self);
@@ -521,7 +521,7 @@ void spiderbot_blowup()
     {
         if(random() < 0.1)
         {
-            asound (self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+            sound (self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
             pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
         }
         self.nextthink = time + 0.1;
index ba8edcc54dd078af6d25a3e456c7a2e334a40194..901e68ff1b920dea2d533aab2654c978d919188f 100644 (file)
@@ -310,7 +310,7 @@ entity vehicles_projectile(string _mzlfx, string _mzlsound,
         proj.flags           = FL_PROJECTILE | FL_NOTARGET;
 
     if(_mzlsound)
-        asound (self, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTN_NORM);
+        sound (self, CH_WEAPON_A, _mzlsound, VOL_BASE, ATTN_NORM);
 
     if(_mzlfx)
         pointparticles(particleeffectnum(_mzlfx), proj.origin, proj.velocity, 1);
@@ -626,7 +626,7 @@ void vehicles_exit(float eject)
         setorigin(self.owner.flagcarried, FLAG_CARRY_POS);
     }
     
-    csound (self, CH_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;
     
index bd3ade4d58e176727d29c45b8ec34707ba5b830b..1ceec920e07c7261e61d6951afc4fa49fb2c00cc 100644 (file)
@@ -117,7 +117,7 @@ void FireRailgunBullet (vector start, vector end, float bdamage, float bforce, f
 
                        if(!pseudoprojectile)
                                pseudoprojectile = spawn(); // we need this so the sound uses the "entchannel4" volume
-                       soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, snd, VOL_BASE * f, ATTN_NONE, 0, 0);
+                       soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS_SINGLE, snd, VOL_BASE * f, ATTN_NONE);
                }
 
                if(pseudoprojectile)
index ff78c388a9523a34c5845eee878138d166d08e08..2db4d6e843eeff9b88fe5689021b3987c1e97919 100644 (file)
@@ -645,13 +645,13 @@ float w_crylink(float req)
                {
                        pointparticles(particleeffectnum("crylink_impact"), org2, '0 0 0', 1);
                        if(!w_issilent)
-                               asound(self, CH_SHOTS, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/crylink_impact2.wav", VOL_BASE, ATTN_NORM);
                }
                else
                {
                        pointparticles(particleeffectnum("crylink_impactbig"), org2, '0 0 0', 1);
                        if(!w_issilent)
-                               asound(self, CH_SHOTS, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/crylink_impact.wav", VOL_BASE, ATTN_NORM);
                }
        }
        else if(req == WR_PRECACHE)
index e970d7cb41fbaff3b81767f81c9fcf8754dea302..e818fa550f423c97f31da767f2564c0f86615713 100644 (file)
@@ -68,7 +68,7 @@ void W_Plasma_Touch (void)
                W_Plasma_Explode ();
        } else {
                //UpdateCSQCProjectile(self);
-               spamsound (self, CH_SHOTS, "weapons/electro_bounce.wav", VOL_BASE, ATTN_NORM);
+               spamsound (self, CH_SHOTS_SINGLE, "weapons/electro_bounce.wav", VOL_BASE, ATTN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
        }
 }
@@ -318,7 +318,7 @@ void W_Electro_Attack3 (void)
 {
        // only play fire sound if 0.5 sec has passed since player let go the fire button
        if(time - self.prevlgfire > 0.5)
-               asound (self, CH_WEAPON_A, "weapons/lgbeam_fire.wav", VOL_BASE, ATTN_NORM);
+               sound (self, CH_WEAPON_A, "weapons/lgbeam_fire.wav", VOL_BASE, ATTN_NORM);
 
        entity beam, oldself;
 
@@ -544,7 +544,7 @@ float w_electro(float req)
                {
                        pointparticles(particleeffectnum("electro_ballexplode"), org2, '0 0 0', 1);
                        if(!w_issilent)
-                               asound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
                }
                else
                {
@@ -553,13 +553,13 @@ float w_electro(float 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)
-                                       asound(self, CH_SHOTS, "weapons/electro_impact_combo.wav", VOL_BASE, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/electro_impact_combo.wav", VOL_BASE, ATTN_NORM);
                        }
                        else
                        {
                                pointparticles(particleeffectnum("electro_impact"), org2, '0 0 0', 1);
                                if(!w_issilent)
-                                       asound(self, CH_SHOTS, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/electro_impact.wav", VOL_BASE, ATTN_NORM);
                        }
                }
        }
index e04e67ae905e013eeb9bcdca1751dce05965676b..c5f749f560f86083dbd4823199cc0c912fc22d45 100644 (file)
@@ -197,7 +197,7 @@ void W_Fireball_Attack1_Frame0()
        W_DecreaseAmmo(ammo_fuel, autocvar_g_balance_fireball_primary_ammo, autocvar_g_balance_fireball_reload_ammo);
 
        W_Fireball_AttackEffect(0, '-1.25 -3.75 0');
-       asound (self, CH_WEAPON_A, "weapons/fireball_prefire2.wav", VOL_BASE, ATTN_NORM);
+       sound (self, CH_WEAPON_A, "weapons/fireball_prefire2.wav", VOL_BASE, ATTN_NORM);
        weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_fireball_primary_animtime, W_Fireball_Attack1_Frame1);
 }
 
@@ -404,7 +404,7 @@ float w_fireball(float req)
                        org2 = w_org + w_backoff * 16;
                        pointparticles(particleeffectnum("fireball_explode"), org2, '0 0 0', 1);
                        if(!w_issilent)
-                               asound(self, CH_SHOTS, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom
+                               sound(self, CH_SHOTS_SINGLE, "weapons/fireball_impact2.wav", VOL_BASE, ATTN_NORM * 0.25); // long range boom
                }
        }
        else if(req == WR_PRECACHE)
index 0e03c953c077eb427dd8bd54d5ec6a0763afedc6..02c2b682f1d991497759a7eb809071294f2f1a9a 100644 (file)
@@ -82,23 +82,23 @@ void W_Grenade_Touch1 (void)
                float r;
                r = random() * 6;
                if(r < 1)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce1.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce1.wav", VOL_BASE, ATTN_NORM);
                else if(r < 2)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce2.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce2.wav", VOL_BASE, ATTN_NORM);
                else if(r < 3)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce3.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce3.wav", VOL_BASE, ATTN_NORM);
                else if(r < 4)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce4.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce4.wav", VOL_BASE, ATTN_NORM);
                else if(r < 5)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
                else
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
        }
        else if(autocvar_g_balance_grenadelauncher_primary_type == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick
        {
-               spamsound (self, CH_SHOTS, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
+               spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
 
                // let it stick whereever it is
                self.oldvelocity = self.velocity;
@@ -126,23 +126,23 @@ void W_Grenade_Touch2 (void)
                float r;
                r = random() * 6;
                if(r < 1)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce1.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce1.wav", VOL_BASE, ATTN_NORM);
                else if(r < 2)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce2.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce2.wav", VOL_BASE, ATTN_NORM);
                else if(r < 3)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce3.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce3.wav", VOL_BASE, ATTN_NORM);
                else if(r < 4)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce4.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce4.wav", VOL_BASE, ATTN_NORM);
                else if(r < 5)
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce5.wav", VOL_BASE, ATTN_NORM);
                else
-                       spamsound (self, CH_SHOTS, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_bounce6.wav", VOL_BASE, ATTN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
                self.gl_bouncecnt += 1;
        }
        else if(autocvar_g_balance_grenadelauncher_secondary_type == 2 && (!other || (other.takedamage != DAMAGE_AIM && other.movetype == MOVETYPE_NONE))) // stick
        {
-               spamsound (self, CH_SHOTS, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
+               spamsound (self, CH_SHOTS_SINGLE, "weapons/grenade_stick.wav", VOL_BASE, ATTN_NORM);
 
                // let it stick whereever it is
                self.oldvelocity = self.velocity;
@@ -310,7 +310,7 @@ float w_glauncher(float req)
                                        }
                                }
                                if(nadefound)
-                                       asound (self, CH_WEAPON_B, "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))
                        {
@@ -367,7 +367,7 @@ float w_glauncher(float req)
                org2 = w_org + w_backoff * 12;
                pointparticles(particleeffectnum("grenade_explode"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index 78847a7f4b82ac6650fa4f45f6ccf73a280016b5..2715166f75e6f4454708a5e99cb64e01abf2582a 100644 (file)
@@ -203,7 +203,7 @@ void W_Hagar_Attack2_Load (void)
                                // if we pressed primary fire while loading, unload all rockets and abort
                                W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_hagar_secondary_ammo * self.hagar_load * -1, autocvar_g_balance_hagar_reload_ammo); // give back ammo
                                self.hagar_load = 0;
-                               asound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
 
                                // pause until we can load rockets again, once we re-press the alt fire button
                                self.hagar_loadstep = time + autocvar_g_balance_hagar_secondary_load_speed;
@@ -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;
-                                       asound(self, CH_WEAPON_B, "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;
                                }
@@ -229,7 +229,7 @@ void W_Hagar_Attack2_Load (void)
                        else if(!self.hagar_loadbeep && self.hagar_load) // prevents the beep from playing each frame
                        {
                                // if this is the last rocket we can load, play a beep sound to notify the player
-                               asound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_WEAPON_A, "weapons/hagar_beep.wav", VOL_BASE, ATTN_NORM);
                                self.hagar_loadbeep = TRUE;
                        }
                }
@@ -365,11 +365,11 @@ float w_hagar(float req)
                if(!w_issilent)
                {
                        if (w_random<0.15)
-                               asound(self, CH_SHOTS, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/hagexp1.wav", VOL_BASE, ATTN_NORM);
                        else if (w_random<0.7)
-                               asound(self, CH_SHOTS, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/hagexp2.wav", VOL_BASE, ATTN_NORM);
                        else
-                               asound(self, CH_SHOTS, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/hagexp3.wav", VOL_BASE, ATTN_NORM);
                }
        }
        else if(req == WR_PRECACHE)
index 4f41a165843f92fbb848bcc7e14e2b3de4b4903e..4943bcbea925642812ebaeb67737bf3309a54ee5 100644 (file)
@@ -230,7 +230,7 @@ float w_hlac(float req)
                org2 = w_org + w_backoff * 6;
                pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index 5be0086771fc78dc73c14a5d42b2caf6c53c41be..a7f59846634319bb411b0e696889a4e87f685b8c 100644 (file)
@@ -256,7 +256,7 @@ float w_hook(float req)
                org2 = w_org + w_backoff * 2;
                pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index 6feb6a5bdfc33fb501a2ecff7ba70483b56a0688..83eb4ed0b1f2a1adf0c10321b2e9b1e6ffcaf2d3 100644 (file)
@@ -177,7 +177,7 @@ void W_Laser_Attack2 ()
        // only play fire sound if 0.5 sec has passed since player let go the fire button
        if(time - self.prevgauntletfire > 0.5)
        {
-               asound (self, CH_WEAPON_A, "weapons/gauntlet_fire.wav", VOL_BASE, ATTN_NORM);
+               sound (self, CH_WEAPON_A, "weapons/gauntlet_fire.wav", VOL_BASE, ATTN_NORM);
        }
 
        entity beam, oldself;
@@ -301,7 +301,7 @@ float w_laser(float req)
                org2 = w_org + w_backoff * 6;
                pointparticles(particleeffectnum("laser_impact"), org2, w_backoff * 1000, 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index dc09c51ea11c66fe066f9a749f9d67f16d475300..aeeb2bb07befa57bbab72167d7301af05eed20ea 100644 (file)
@@ -13,7 +13,7 @@ void spawnfunc_weapon_minelayer (void)
 
 void W_Mine_Stick (entity to)
 {
-       spamsound (self, CH_SHOTS, "weapons/mine_stick.wav", VOL_BASE, ATTN_NORM);
+       spamsound (self, CH_SHOTS_SINGLE, "weapons/mine_stick.wav", VOL_BASE, ATTN_NORM);
 
        // in order for mines to face properly when sticking to the ground, they must be a server side entity rather than a csqc projectile
 
@@ -176,7 +176,7 @@ void W_Mine_Think (void)
        if ((time > self.cnt) && (!self.mine_time))
        {
                if(autocvar_g_balance_minelayer_lifetime_countdown > 0)
-                       spamsound (self, CH_SHOTS, "weapons/mine_trigger.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/mine_trigger.wav", VOL_BASE, ATTN_NORM);
                self.mine_time = time + autocvar_g_balance_minelayer_lifetime_countdown;
                self.mine_explodeanyway = 1; // make the mine super aggressive -- Samual: Rather, make it not care if a team mate is near.
        }
@@ -199,7 +199,7 @@ void W_Mine_Think (void)
                if(head != self.realowner && IsDifferentTeam(head, self.realowner)) // don't trigger for team mates
                if(!self.mine_time)
                {
-                       spamsound (self, CH_SHOTS, "weapons/mine_trigger.wav", VOL_BASE, ATTN_NORM);
+                       spamsound (self, CH_SHOTS_SINGLE, "weapons/mine_trigger.wav", VOL_BASE, ATTN_NORM);
                        self.mine_time = time + autocvar_g_balance_minelayer_time;
                }
                head = head.chain;
@@ -459,7 +459,7 @@ float w_minelayer(float req)
                if (self.BUTTON_ATCK2)
                {
                        if(W_PlacedMines(TRUE))
-                               asound (self, CH_WEAPON_B, "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)
@@ -513,7 +513,7 @@ float w_minelayer(float req)
                org2 = w_org + w_backoff * 12;
                pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/mine_exp.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/mine_exp.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index a4bbaed11dbd7d4d958587da9facc86b2a787a28..c0376547ab6cc0c17023cccf647bd5d8235d67a2 100644 (file)
@@ -280,7 +280,7 @@ float w_minstanex(float req)
                org2 = w_org + w_backoff * 6;
                pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index 95b2b30667e5344564a5d0fef43c215fd0a7a61b..59734f20c3dce7f5831286263b2432694becf673 100644 (file)
@@ -59,7 +59,7 @@ void W_Nex_Attack (float issecondary)
        W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CH_WEAPON_A, 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
        {
-               asound (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);
+               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;
@@ -243,7 +243,7 @@ float w_nex(float req)
                org2 = w_org + w_backoff * 6;
                pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index 1183334e26f27746ee3292f18b050ee0c887b9f3..0138c78a70fedd59b1b75c952ad5026a5552dc12 100644 (file)
@@ -95,19 +95,19 @@ void W_Porto_Touch (void)
 
        if(self.realowner.playerid != self.playerid)
        {
-               asound(self, CH_SHOTS, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_SHOTS_SINGLE, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
                remove(self);
        }
        else if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
        {
-               spamsound(self, CH_SHOTS, "porto/bounce.wav", VOL_BASE, ATTN_NORM);
+               spamsound(self, CH_SHOTS_SINGLE, "porto/bounce.wav", VOL_BASE, ATTN_NORM);
                // just reflect
                self.right_vector = self.right_vector - 2 * trace_plane_normal * (self.right_vector * trace_plane_normal);
                self.angles = vectoangles(self.velocity - 2 * trace_plane_normal * (self.velocity * trace_plane_normal));
        }
        else if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT)
        {
-               asound(self, CH_SHOTS, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_SHOTS_SINGLE, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
                W_Porto_Fail(0);
        }
        else if(self.effects & EF_RED)
@@ -115,7 +115,7 @@ void W_Porto_Touch (void)
                self.effects += EF_BLUE - EF_RED;
                if(Portal_SpawnInPortalAtTrace(self.realowner, self.right_vector, self.portal_id))
                {
-                       asound(self, CH_SHOTS, "porto/create.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "porto/create.wav", VOL_BASE, ATTN_NORM);
                        trace_plane_normal = norm;
                        centerprint(self.realowner, "^1In^7-portal created.");
                        self.right_vector = self.right_vector - 2 * trace_plane_normal * (self.right_vector * norm);
@@ -124,7 +124,7 @@ void W_Porto_Touch (void)
                }
                else
                {
-                       asound(self, CH_SHOTS, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
                        trace_plane_normal = norm;
                        W_Porto_Fail(0);
                }
@@ -135,20 +135,20 @@ void W_Porto_Touch (void)
                {
                        if(Portal_SpawnOutPortalAtTrace(self.realowner, self.right_vector, self.portal_id))
                        {
-                               asound(self, CH_SHOTS, "porto/create.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "porto/create.wav", VOL_BASE, ATTN_NORM);
                                trace_plane_normal = norm;
                                centerprint(self.realowner, "^4Out^7-portal created.");
                                W_Porto_Success();
                        }
                        else
                        {
-                               asound(self, CH_SHOTS, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
                                W_Porto_Fail(0);
                        }
                }
                else
                {
-                       asound(self, CH_SHOTS, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "porto/unsupported.wav", VOL_BASE, ATTN_NORM);
                        W_Porto_Fail(0);
                }
        }
index 5d789da5533d7da6a7f56157d004fbbc29c9796b..8ce7427bcbc40b676530d9468faefc1799a25e41 100644 (file)
@@ -214,11 +214,11 @@ float w_rifle(float req)
                if(!w_issilent)
                {
                        if(w_random < 0.2)
-                               asound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.4)
-                               asound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.5)
-                               asound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
                }
        }
        else if(req == WR_PRECACHE)
index 60e94793878b4dfadac1365f4377999b564451f1..249ddd2934700067282b3888d1b5e0b6656c6da3 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
-                               asound (self.realowner, CH_WEAPON_B, "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)
-                                       asound (self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
+                                       sound (self, CH_WEAPON_B, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                        }
                }
        }
@@ -491,7 +491,7 @@ float w_rlauncher(float req)
                org2 = w_org + w_backoff * 12;
                pointparticles(particleeffectnum("rocket_explode"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       asound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {
index 6837c18a9180c15d4846eb3277c547ff3daebd29..479cb5b24520d1c64552f8684286413d76c060a2 100644 (file)
@@ -615,17 +615,17 @@ float w_seeker(float req)
                        if(!w_issilent)
                        {
                                if (w_random<0.15)
-                                       asound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/tagexp1.wav", 1, ATTN_NORM);
                                else if (w_random<0.7)
-                                       asound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/tagexp2.wav", 1, ATTN_NORM);
                                else
-                                       asound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/tagexp3.wav", 1, ATTN_NORM);
                        }
                }
                else if(w_deathtype & HITTYPE_HEADSHOT)
                {
                        if(!w_issilent)
-                               asound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/tag_impact.wav", 1, ATTN_NORM);
                }
                else
                {
@@ -633,11 +633,11 @@ float w_seeker(float req)
                        if(!w_issilent)
                        {
                                if (w_random<0.15)
-                                       asound(self, CH_SHOTS, "weapons/seekerexp1.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/seekerexp1.wav", 1, ATTN_NORM);
                                else if (w_random<0.7)
-                                       asound(self, CH_SHOTS, "weapons/seekerexp2.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/seekerexp2.wav", 1, ATTN_NORM);
                                else
-                                       asound(self, CH_SHOTS, "weapons/seekerexp3.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS_SINGLE, "weapons/seekerexp3.wav", 1, ATTN_NORM);
                        }
                }
        }
index 12d6b911f6b53334d995d6222ce6f7c5139d5354..46495fe646b2a1cdaccddc6f6e94353aaff970a5 100644 (file)
@@ -91,7 +91,7 @@ void shotgun_meleethink (void)
 
 void W_Shotgun_Attack2 (void)
 {
-       asound (self, CH_SHOTS, "weapons/shotgun_melee.wav", VOL_BASE, ATTN_NORM);
+       sound (self, CH_SHOTS_SINGLE, "weapons/shotgun_melee.wav", VOL_BASE, ATTN_NORM);
        weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_shotgun_secondary_animtime, w_ready);
 
        entity meleetemp;
@@ -191,11 +191,11 @@ float w_shotgun(float req)
                if(!w_issilent && time - self.prevric > 0.25)
                {
                        if(w_random < 0.0165)
-                               asound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.033)
-                               asound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.05)
-                               asound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
                        self.prevric = time;
                }
        }
index 67e99c57348a58575f7b8ad613303775e1be5098..693612de95ee93329e7fb348c0c3746165c1be9b 100644 (file)
@@ -160,7 +160,7 @@ void W_Tuba_Attack(float hittype)
 
        self.tuba_note.teleport_time = time + autocvar_g_balance_tuba_refire * 2; // so it can get prolonged safely
 
-       //asound(self, c, TUBA_NOTE(n), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), autocvar_g_balance_tuba_attenuation);
+       //sound(self, c, TUBA_NOTE(n), bound(0, VOL_BASE * cvar("g_balance_tuba_volume"), 1), autocvar_g_balance_tuba_attenuation);
        RadiusDamage(self, self, autocvar_g_balance_tuba_damage, autocvar_g_balance_tuba_edgedamage, autocvar_g_balance_tuba_radius, world, autocvar_g_balance_tuba_force, hittype | WEP_TUBA, world);
 
        o = gettaginfo(self.exteriorweaponentity, 0);
index a04aeaba6d9921694bf3575dcbe2243fe7bcc9ca..3e69a7da5766589df63eb904238305acf4c78d49 100644 (file)
@@ -301,11 +301,11 @@ float w_uzi(float req)
                pointparticles(particleeffectnum("machinegun_impact"), org2, w_backoff * 1000, 1);
                if(!w_issilent)
                        if(w_random < 0.05)
-                               asound(self, CH_SHOTS, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric1.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.1)
-                               asound(self, CH_SHOTS, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric2.wav", VOL_BASE, ATTN_NORM);
                        else if(w_random < 0.2)
-                               asound(self, CH_SHOTS, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
+                               sound(self, CH_SHOTS_SINGLE, "weapons/ric3.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {