if(self.noise != "")
{
self.origin = p;
- sound(self, CHAN_TRIGGER, self.noise, VOL_BASE * self.volume, self.atten);
+ sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE * self.volume, self.atten);
}
self.just_toggled = 0;
}
if(alarm2time < time)
{
alarm2time = time + 1;
- sound(world, CHAN_TRIGGER, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
if(alarm2time)
{
- sound(world, CHAN_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
alarm2time = 0;
}
}
if(alarm2time < time)
{
alarm2time = time + 1;
- sound(world, CHAN_TRIGGER, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
if(alarm2time)
{
- sound(world, CHAN_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
alarm2time = 0;
}
}
if(alarm2time < time)
{
alarm2time = time + 1;
- sound(world, CHAN_TRIGGER, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CH_TRIGGER_SINGLE, "vehicles/alarm_shield.wav", VOL_BASEVOICE, ATTN_NONE);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
}
drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
if(alarm2time)
{
- sound(world, CHAN_TRIGGER, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+ sound(world, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
alarm2time = 0;
}
}
#ifdef XON020_CHANNELS
float CH_INFO = 0; // only on world and csqc
-float CH_ITEMS = 0; // only on players
+float CH_TRIGGER = 0; // only on players
float CH_WEAPON_A = 1; // only on players and entities
float CH_VOICE = 2; // only on players
float CH_BGM = 2; // only on csqc
-float CH_TRIGGERS_SINGLE = 3; // only on players, entities, csqc
+float CH_TRIGGER_SINGLE = 3; // only on players, entities, csqc
float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
float CH_WEAPON_B = 5; // only on players and entities
float CH_PAIN = 6; // only on players and csqc
float CH_PLAYER = 7; // only on players and entities
#else
float CH_INFO = 0;
-float CH_TRIGGERS_SINGLE = 3;
+float CH_TRIGGER_SINGLE = 3;
float CH_SHOTS_SINGLE = 4;
-float CH_ITEMS = 256;
+float CH_TRIGGER = 256;
float CH_WEAPON_A = 257;
float CH_VOICE = 258;
float CH_BGM = 260;
//stuffcmd(self, "set viewsize $tmpviewsize \n");
if (autocvar_g_spawnsound)
- sound (self, CHAN_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTN_NORM);
if(g_assault) {
if(self.team == assault_attacker_team)
backtrace("Flag carrier had no flag sprite?!?");
}
LogCTF("dropped", p.team, p);
- sound (self, CHAN_TRIGGER, self.noise4, VOL_BASE, ATTN_NONE);
+ sound (p, CH_TRIGGER, self.noise4, VOL_BASE, ATTN_NONE);
setattachment(e, world, "");
e.damageforcescale = autocvar_g_balance_ctf_damageforcescale;
{
bprint("The ", self.netname, " became impatient after ", ftos_decimals(flagcaptimerecord, 2), " seconds and returned itself\n");
- sound (self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
+ sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
self.owner.impulse = 141; // returning!
e = self;
if (time > self.pain_finished)
{
bprint("The ", self.netname, " has returned to base\n");
- sound (self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
+ sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
LogCTF("returned", self.team, world);
ReturnFlag(self);
}
if(self.enemy)
sound(self.enemy, CH_ITEMS, head.noise, VOL_BASE, ATTN_NORM);
else
- sound(self, CH_TRIGGERS_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
if (head.noise1 != "")
play2all(head.noise1);
func_breakable_destroyed();
if(self.noise)
- sound (self, CH_TRIGGERS_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
if(self.dmg)
RadiusDamage(self, activator, self.dmg, self.dmg_edge, self.dmg_radius, self, self.dmg_force, DEATH_HURTTRIGGER, world);
else
snd = self.noise;
msg_entity = activator;
- soundto(MSG_ONE, self, CHAN_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
+ soundto(MSG_ONE, self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
}
void target_speaker_use_on()
{
}
else
snd = self.noise;
- sound(self, CHAN_TRIGGER, snd, VOL_BASE * self.volume, self.atten);
+ sound(self, CH_TRIGGER_SINGLE, snd, VOL_BASE * self.volume, self.atten);
if(self.spawnflags & 3)
self.use = target_speaker_use_off;
}
void target_speaker_use_off()
{
- sound(self, CHAN_TRIGGER, "misc/null.wav", VOL_BASE * self.volume, self.atten);
+ sound(self, CH_TRIGGER_SINGLE, "misc/null.wav", VOL_BASE * self.volume, self.atten);
self.use = target_speaker_use_on;
}
void target_speaker_reset()
{
// self.max_health / 300 gives 5 minutes of overtime.
// control points reduce the overtime duration.
- sound(self, CHAN_TRIGGER, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/generator_decay.wav", VOL_BASE, ATTN_NORM);
d = 1;
e = findchain(classname, "onslaught_controlpoint");
while (e)
if(random() < 0.01)
{
pointparticles(particleeffectnum("electro_ballexplode"), self.origin + randompos('-50 -50 -20', '50 50 50'), '0 0 0', 1);
- sound(self, CHAN_TRIGGER, "onslaught/electricity_explode.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/electricity_explode.wav", VOL_BASE, ATTN_NORM);
}
else
pointparticles(particleeffectnum("torch_small"), self.origin + randompos('-60 -60 -20', '60 60 60'), '0 0 0', 1);
if(self.count==40||self.count==20)
{
onslaught_generator_ring_spawn(self.origin);
- sound(self, CHAN_TRIGGER, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/shockwave.wav", VOL_BASE, ATTN_NORM);
}
// Throw some gibs
if(random() < 0.25)
{
te_explosion(self.origin);
- sound(self, CHAN_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
}
// Particles
te_explosion(org);
onslaught_generator_shockwave_spawn(org);
pointparticles(particleeffectnum("onslaught_generator_finalexplosion"), org, '0 0 0', 1);
- sound(self, CHAN_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
}
else
self.nextthink = time + 0.05;
// Throw some flaming gibs on damage, more damage = more chance for gib
if(random() < damage/220)
{
- sound(self, CHAN_TRIGGER, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
i = random();
if(i < 0.3)
ons_throwgib(hitloc + '0 0 20', force * -1, "models/onslaught/gen_gib1.md3", 5, TRUE);
//sound on every hit
if (random() < 0.5)
- sound(self, CHAN_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE, ATTN_NORM);
else
- sound(self, CHAN_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit2.wav", VOL_BASE, ATTN_NORM);
}
//throw some gibs on damage
pointparticles(particleeffectnum("sparks"), hitloc, force*-1, 1);
//sound on every hit
if (random() < 0.5)
- sound(self, CHAN_TRIGGER, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit1.wav", VOL_BASE+0.3, ATTN_NORM);
else
- sound(self, CHAN_TRIGGER, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/ons_hit2.wav", VOL_BASE+0.3, ATTN_NORM);
if (self.health < 0)
{
- sound(self, CHAN_TRIGGER, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "weapons/grenade_impact.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
{
string t;
self.health = self.max_health;
self.count = autocvar_g_onslaught_cp_regen * sys_frametime; // slow repair rate from now on
self.think = onslaught_controlpoint_icon_think;
- sound(self, CHAN_TRIGGER, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "onslaught/controlpoint_built.wav", VOL_BASE, ATTN_NORM);
bprint(ColoredTeamName(self.team), " captured ", self.owner.message, " control point\n");
self.owner.iscaptured = TRUE;
e.think = onslaught_controlpoint_icon_buildthink;
e.nextthink = time + sys_frametime;
e.count = (e.max_health - e.health) * sys_frametime / autocvar_g_onslaught_cp_buildtime; // how long it takes to build
- sound(e, CHAN_TRIGGER, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
+ sound(e, CH_TRIGGER_SINGLE, "onslaught/controlpoint_build.wav", VOL_BASE, ATTN_NORM);
self.team = e.team;
self.colormap = e.colormap;
WaypointSprite_UpdateBuildFinished(self.sprite, time + (e.max_health - e.health) / (e.count / sys_frametime));
WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);
- sound(self, CH_TRIGGERS_SINGLE, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere)
+ sound(self, CH_TRIGGER_SINGLE, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere)
}
else
{
if(other.classname != "player")
{ // The ball just touched an object, most likely the world
pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
- sound(self, CH_TRIGGERS_SINGLE, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
return;
}
else if(self.wait > time) { return; }
pscore = 1;
}
- sound (ball, CH_TRIGGERS_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
+ sound (ball, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NONE);
if(ball.team && pscore)
{
{
Item_Show(self, 1);
if(!g_minstagib && self.items == IT_STRENGTH)
- sound (self, CHAN_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
+ sound (self, CH_TRIGGER_SINGLE, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
else if(!g_minstagib && self.items == IT_INVINCIBLE)
- sound (self, CHAN_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
+ sound (self, CH_TRIGGER_SINGLE, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
else
- sound (self, CHAN_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
+ sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM); // play respawn sound
setorigin (self, self.origin);
//pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, time + ITEM_RESPAWN_TICKS);
}
}
- sound (self, CHAN_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM); // play respawn sound
+ sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM); // play respawn sound
if(self.waypointsprite_attached)
{
WaypointSprite_Ping(self.waypointsprite_attached);
void plat_hit_top()
{
- sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
self.state = 1;
self.think = plat_go_down;
self.nextthink = self.ltime + 3;
void plat_hit_bottom()
{
- sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
self.state = 2;
};
void plat_go_down()
{
- sound (self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
self.state = 3;
SUB_CalcMove (self.pos2, self.speed, plat_hit_bottom);
};
void plat_go_up()
{
- sound (self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
self.state = 4;
SUB_CalcMove (self.pos1, self.speed, plat_hit_top);
};
void train_wait()
{
if(self.noise != "")
- stopsoundto(MSG_BROADCAST, self, CHAN_TRIGGER); // send this as unreliable only, as the train will resume operation shortly anyway
+ stopsoundto(MSG_BROADCAST, self, CH_TRIGGER_SINGLE); // send this as unreliable only, as the train will resume operation shortly anyway
if(self.wait < 0)
{
SUB_CalcMove(targ.origin - self.mins, self.speed, train_wait);
if(self.noise != "")
- sound(self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+ sound(self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
};
void func_train_find()
if (self.noise != "")
{
precache_sound(self.noise);
- soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+ soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
}
if (!self.speed)
self.speed = 4;
if (self.noise != "")
{
precache_sound(self.noise);
- soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+ soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
}
self.active = ACTIVE_ACTIVE;
return;
if (self.noise != "")
- sound (self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_NORM);
self.state = STATE_UP;
SUB_CalcMove (self.pos2, self.speed, button_wait);
void door_hit_top()
{
if (self.noise1 != "")
- sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
self.state = STATE_TOP;
if (self.spawnflags & DOOR_TOGGLE)
return; // don't come down automatically
void door_hit_bottom()
{
if (self.noise1 != "")
- sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
self.state = STATE_BOTTOM;
};
void door_go_down()
{
if (self.noise2 != "")
- sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
if (self.max_health)
{
self.takedamage = DAMAGE_YES;
}
if (self.noise2 != "")
- sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
self.state = STATE_UP;
SUB_CalcMove (self.pos2, self.speed, door_hit_top);
void door_rotating_hit_top()
{
if (self.noise1 != "")
- sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
self.state = STATE_TOP;
if (self.spawnflags & DOOR_TOGGLE)
return; // don't come down automatically
void door_rotating_hit_bottom()
{
if (self.noise1 != "")
- sound (self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
if (self.lip==666) // self.lip is used to remember reverse opening direction for door_rotating
{
self.pos2 = '0 0 0' - self.pos2;
void door_rotating_go_down()
{
if (self.noise2 != "")
- sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
if (self.max_health)
{
self.takedamage = DAMAGE_YES;
return;
}
if (self.noise2 != "")
- sound (self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
self.state = STATE_UP;
SUB_CalcAngleMove (self.pos2, self.speed, door_rotating_hit_top);
// Make a sound, wait a little...
if (self.noise1 != "")
- sound(self, CHAN_TRIGGER, self.noise1, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTN_NORM);
self.nextthink = self.ltime + 0.1;
temp = 1 - (self.spawnflags & SECRET_1ST_LEFT); // 1 or -1
self.dest2 = self.dest1 + v_forward * self.t_length;
SUB_CalcMove(self.dest1, self.speed, fd_secret_move1);
if (self.noise2 != "")
- sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
};
// Wait after first movement...
self.nextthink = self.ltime + 1.0;
self.think = fd_secret_move2;
if (self.noise3 != "")
- sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
};
// Start moving sideways w/sound...
void fd_secret_move2()
{
if (self.noise2 != "")
- sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
SUB_CalcMove(self.dest2, self.speed, fd_secret_move3);
};
void fd_secret_move3()
{
if (self.noise3 != "")
- sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
if (!(self.spawnflags & SECRET_OPEN_ONCE))
{
self.nextthink = self.ltime + self.wait;
void fd_secret_move4()
{
if (self.noise2 != "")
- sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
SUB_CalcMove(self.dest1, self.speed, fd_secret_move5);
};
self.nextthink = self.ltime + 1.0;
self.think = fd_secret_move6;
if (self.noise3 != "")
- sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
};
void fd_secret_move6()
{
if (self.noise2 != "")
- sound(self, CHAN_TRIGGER, self.noise2, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTN_NORM);
SUB_CalcMove(self.oldorigin, self.speed, fd_secret_done);
};
//self.th_pain = fd_secret_use;
}
if (self.noise3 != "")
- sound(self, CHAN_TRIGGER, self.noise3, VOL_BASE, ATTN_NORM);
+ sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NORM);
};
void secret_blocked()
if (self.noise != "")
{
precache_sound(self.noise);
- soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+ soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
}
if (!self.speed)
if (self.noise != "")
{
precache_sound(self.noise);
- soundto(MSG_INIT, self, CHAN_TRIGGER, self.noise, VOL_BASE, ATTN_IDLE);
+ soundto(MSG_INIT, self, CH_TRIGGER_SINGLE, self.noise, VOL_BASE, ATTN_IDLE);
}
if(!self.targetfactor)
if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps
{
if(tflags & TELEPORT_FLAG_SOUND)
- sound (player, CHAN_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
+ sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
if(tflags & TELEPORT_FLAG_PARTICLES)
{
pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
{
self.sounds = 1;
self.sound_nexttime = time + 10.922667; //soundlength("vehicles/racer_move.wav");
- sound (self, CHAN_TRIGGER, "vehicles/racer_move.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/racer_move.wav", VOL_VEHICLEENGINE, ATTN_NORM);
}
}
else
{
self.sounds = 0;
self.sound_nexttime = time + 11.888604; //soundlength("vehicles/racer_idle.wav");
- sound (self, CHAN_TRIGGER, "vehicles/racer_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/racer_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
}
}
if(self.sound_nexttime < time)
{
self.sound_nexttime = time + 7.955812; //soundlength("vehicles/raptor_fly.wav");
- sound (self, CHAN_TRIGGER, "vehicles/raptor_speed.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", VOL_VEHICLEENGINE, ATTN_NORM);
}
// Takeoff sequense
if(self.sound_nexttime < time)
{
self.sound_nexttime = time + 7.955812;
- //sound (self.tur_head, CHAN_TRIGGER, "vehicles/raptor_fly.wav", 1 - ftmp, ATTN_NORM );
- sound (self, CHAN_TRIGGER, "vehicles/raptor_speed.wav", 1, ATTN_NORM);
+ //sound (self.tur_head, CH_TRIGGER_SINGLE, "vehicles/raptor_fly.wav", 1 - ftmp, ATTN_NORM );
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/raptor_speed.wav", 1, ATTN_NORM);
self.wait = ftmp;
}
/*
else if(fabs(ftmp - self.wait) > 0.2)
{
- sound (self.tur_head, CHAN_TRIGGER, "", 1 - ftmp, ATTN_NORM );
- sound (self, CHAN_TRIGGER, "", ftmp, ATTN_NORM);
+ sound (self.tur_head, CH_TRIGGER_SINGLE, "", 1 - ftmp, ATTN_NORM );
+ sound (self, CH_TRIGGER_SINGLE, "", ftmp, ATTN_NORM);
self.wait = ftmp;
}
*/
{
if(spider.frame == 4 && self.tur_head.wait != 0)
{
- sound (self, CHAN_TRIGGER, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_land.wav", VOL_VEHICLEENGINE, ATTN_NORM);
spider.frame = 5;
}
if(player.BUTTON_JUMP && self.tur_head.wait < time)
{
- sound (self, CHAN_TRIGGER, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_jump.wav", VOL_VEHICLEENGINE, ATTN_NORM);
//dprint("spiderbot_jump:", ftos(soundlength("vehicles/spiderbot_jump.wav")), "\n");
self.delay = 0;
self.delay = 3;
self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_idle.wav");
//dprint("spiderbot_idle:", ftos(soundlength("vehicles/spiderbot_idle.wav")), "\n");
- sound (self, CHAN_TRIGGER, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_idle.wav", VOL_VEHICLEENGINE, ATTN_NORM);
}
movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
spider.frame = 5;
{
self.delay = 1;
self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_walk.wav");
- sound (self, CHAN_TRIGGER, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_walk.wav", VOL_VEHICLEENGINE, ATTN_NORM);
//dprint("spiderbot_walk:", ftos(soundlength("vehicles/spiderbot_walk.wav")), "\n");
}
}
{
self.delay = 2;
self.sound_nexttime = time + 6.486500; //soundlength("vehicles/spiderbot_strafe.wav");
- sound (self, CHAN_TRIGGER, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "vehicles/spiderbot_strafe.wav", VOL_VEHICLEENGINE, ATTN_NORM);
//dprint("spiderbot_strafe:", ftos(soundlength("vehicles/spiderbot_strafe.wav")), "\n");
}
}
setorigin(self.owner.flagcarried, FLAG_CARRY_POS);
}
- sound (self, CHAN_TRIGGER, "misc/null.wav", 1, ATTN_NORM);
+ sound (self, CH_TRIGGER_SINGLE, "misc/null.wav", 1, ATTN_NORM);
self.vehicle_exit(eject);
self.owner = world;