for(e = world; (e = findfloat(e, enttype, ENT_CLIENT_TRIGGER_MUSIC)); ) if(e.noise)
{
vol0 = e.lastvol;
- if(getsoundtime(e, CHAN_VOICE) < 0)
+ if(getsoundtime(e, CH_BGM) < 0)
{
vol0 = -1;
}
if(vol != vol0)
{
if(vol0 < 0)
- sound(e, CHAN_VOICE, e.noise, vol, ATTN_NONE); // restart
+ sound(e, CH_BGM, e.noise, vol, ATTN_NONE); // restart
else
- sound(e, CHAN_VOICE, "", vol, ATTN_NONE);
+ sound(e, CH_BGM, "", vol, ATTN_NONE);
e.lastvol = vol;
}
}
music_trigger = world;
if(best)
- bgmtime = getsoundtime(best, CHAN_VOICE);
+ bgmtime = getsoundtime(best, CH_BGM);
else
bgmtime = gettime(GETTIME_CDTRACK);
}
strunzone(e.noise);
e.noise = strzone(noi);
precache_sound(e.noise);
- sound(e, CHAN_VOICE, e.noise, 0, ATTN_NONE);
- if(getsoundtime(e, CHAN_VOICE) < 0)
+ sound(e, CH_BGM, e.noise, 0, ATTN_NONE);
+ if(getsoundtime(e, CH_BGM) < 0)
{
print(sprintf(_("Cannot initialize sound %s\n"), e.noise));
strunzone(e.noise);
if(self.noise != s)
{
precache_sound(self.noise);
- sound(self, CHAN_VOICE, self.noise, 0, ATTN_NONE);
- if(getsoundtime(self, CHAN_VOICE) < 0)
+ sound(self, CH_BGM, self.noise, 0, ATTN_NONE);
+ if(getsoundtime(self, CH_BGM) < 0)
{
print(sprintf(_("Cannot initialize sound %s\n"), self.noise));
strunzone(self.noise);
float CH_ITEMS = 0; // only on players
float CH_WEAPON_A = 1; // only on players and entities
float CH_VOICE = 2; // only on players
-float CH_AMBIENT = 2; // only on entities
float CH_BGM = 2; // only on csqc
float CH_TRIGGERS_SINGLE = 3; // only on players, entities, csqc
float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
float CH_ITEMS = 256;
float CH_WEAPON_A = 257;
float CH_VOICE = 258;
-float CH_AMBIENT = 259;
float CH_BGM = 260;
float CH_WEAPON_B = 257;
float CH_PAIN = 262;
float CHAN_VOICE = 2; // Voice/Radio
// on world: UNUSED
// on players: voice VOICE
- // on entities: ambient AMBIENT
+ // on entities: UNUSED
// on csqc: background music BGM
float CHAN_TRIGGER = 3; // Triggers/Items
// on world: UNUSED
oldself = self; self = self.teamkill_soundsource;
oldpusher = self.pusher; self.pusher = oldself;
- PlayerSound(playersound_teamshoot, CHAN_VOICE, VOICETYPE_LASTATTACKER_ONLY);
+ PlayerSound(playersound_teamshoot, CH_VOICE, VOICETYPE_LASTATTACKER_ONLY);
self.pusher = oldpusher;
self = oldself;
if(time > self.taunt_soundtime)
{
self.taunt_soundtime = 0;
- PlayerSound(playersound_taunt, CHAN_VOICE, VOICETYPE_AUTOTAUNT);
+ PlayerSound(playersound_taunt, CH_VOICE, VOICETYPE_AUTOTAUNT);
}
target_voicescript_next(self);
flood = Say(self, ownteam, world, msg, 1);
if (flood > 0)
- GlobalSound(self.sample, CHAN_VOICE, voicetype);
+ GlobalSound(self.sample, CH_VOICE, voicetype);
else if (flood < 0)
- FakeGlobalSound(self.sample, CHAN_VOICE, voicetype);
+ FakeGlobalSound(self.sample, CH_VOICE, voicetype);
}
void MoveToTeam(entity client, float team_colour, float type, float show_message)