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();
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;
}
break;
}
- asound (self, CH_SHOTS, s, VOL_BASE, ATTN_NORM);
+ sound (self, CH_SHOTS_SINGLE, s, VOL_BASE, ATTN_NORM);
}
}
}
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;
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_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:
}
- 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;
}
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;
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;
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;
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;
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);
}
}
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();
{
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);
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;
}
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)
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;
}
}
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)
// 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 = "";
}
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;
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);
//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);
}
}
//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);
}
}
}
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;
}
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)
{
{
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;
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;
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';
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;
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;
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;
}
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);
}
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);
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);
{
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)
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");
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()
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);
}
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;
}
}
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);
}
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;
}
}
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);
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;
}
}
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);
}
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;
}
}
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);
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;
}
}
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);
}
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;
}
}
#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;
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
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;
}
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);
}
//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)
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);
}
/**
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;
}
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)
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)
{
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)
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:
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!");
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;
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:
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:
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:
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!");
{
#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);
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)
(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;
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;
}
// 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,
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;
{
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;
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);
}
}
}
- 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);
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)
}
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))
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)
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);
//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
//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
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);
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;
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);
}
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;
{
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);
}
}
}
{
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);
}
};
//=============================================================================
-// 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()
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()
{
}
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()
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;
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;
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;
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)
{
{
//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)
if (time > e.spamtime)
{
e.spamtime = time;
- asound(e, chan, samp, vol, atten);
+ sound(e, chan, samp, vol, atten);
return TRUE;
}
return FALSE;
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);
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;
}
{
// 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)
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);
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
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
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;
// 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);
//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
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;
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);
}
};
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;
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));
/* 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");
/* 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();
};
{
// 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;
}
// 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;
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
{
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; }
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);
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.
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)
{
{
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
}
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
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);
}
}
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);
}
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)
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);
}
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)
{
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)
{
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);
}
}
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');
}
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');
}
{
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);
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);
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));
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);
}
}
{
// 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;
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;
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);
};
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)
{
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()
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;
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;
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);
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
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;
}
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);
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
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;
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;
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);
// 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
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...
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);
};
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;
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);
};
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);
};
//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()
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)
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)
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);
{
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 ();
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');
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);
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;
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
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;
}
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);
}
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;
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;
{
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 ();
{
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');
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";
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);
{
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
{
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);
}
}
{
//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);
}
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;
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
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;
}
*/
{
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;
{
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;
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;
{
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");
}
}
{
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");
}
}
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);
{
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);
{
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;
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);
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;
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)
{
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)
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;
}
}
{
// 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;
{
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
{
// 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);
}
}
}
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);
}
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)
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;
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;
}
}
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))
{
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)
{
// 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;
{
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;
}
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;
}
}
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)
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)
{
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)
{
// 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;
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)
{
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
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.
}
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;
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)
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)
{
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)
{
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;
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)
{
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)
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);
}
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);
}
{
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);
}
}
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)
{
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;
}
}
}
}
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);
}
}
}
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)
{
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
{
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);
}
}
}
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;
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;
}
}
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);
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)
{