mirror of
https://github.com/nzp-team/quakec.git
synced 2025-02-20 18:52:36 +00:00
SERVER: Audio channel use changes
This commit is contained in:
parent
d3c9b20cf8
commit
172951de02
5 changed files with 69 additions and 64 deletions
|
@ -40,12 +40,12 @@ void() crawler_footstep
|
|||
if(self.laststep == 1)
|
||||
{
|
||||
self.laststep = 0;
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/sc0.wav",1,ATTN_NORM);
|
||||
sound(self, 5, "sounds/zombie/sc0.wav", 1, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.laststep = 1;
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/sc1.wav",1,ATTN_NORM);
|
||||
sound(self, 5, "sounds/zombie/sc1.wav", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -154,7 +154,7 @@ void() Dog_Death =
|
|||
self.movetype = MOVETYPE_NONE;
|
||||
self.takedamage = DAMAGE_NO;
|
||||
|
||||
sound(self,CHAN_VOICE,"sounds/null.wav",1,ATTN_NORM);
|
||||
sound(self, 5, "sounds/null.wav", 1, ATTN_NORM);
|
||||
|
||||
self.usedent = world;
|
||||
|
||||
|
|
|
@ -53,21 +53,21 @@ void(float what) play_sound_z =
|
|||
if(what == 1)//attack
|
||||
{
|
||||
if (e < 0.125)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a0.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a0.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.25)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a1.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a1.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.375)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a2.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a2.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.5)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a3.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a3.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.625)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a4.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a4.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.75)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a5.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a5.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.875)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a6.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a6.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/a7.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_WEAPON, "sounds/zombie/a7.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
if(what == 2)//walking!
|
||||
|
@ -94,65 +94,65 @@ void(float what) play_sound_z =
|
|||
{
|
||||
self.sound_time = time + 3 + random()*2;
|
||||
if(e < 0.2)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t0.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/t0.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.4)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t1.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/t1.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.6)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t2.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/t2.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.8)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t3.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/t3.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t4.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/t4.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
if(self.walktype == 1 || self.walktype == 2 || self.walktype == 3)
|
||||
{
|
||||
self.sound_time = time + 3 + random();
|
||||
if (e < 0.1)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w0.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w0.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.2)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w1.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w1.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.3)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w2.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w2.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.4)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w3.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w3.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.5)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w4.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w4.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.6)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w5.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w5.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.7)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w6.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w6.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.8)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w7.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w7.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.9)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w8.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w8.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/w9.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/w9.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
else if(self.walktype == 4 || self.walktype == 5)
|
||||
{
|
||||
self.sound_time = time + 4 + random()*2;
|
||||
if (e < 0.1)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r0.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r0.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.2)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r1.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r1.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.3)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r2.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r2.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.4)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r3.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r3.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.5)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r4.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r4.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.6)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r5.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r5.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.7)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r6.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r6.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.8)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r7.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r7.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.9)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r8.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r8.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/r9.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/zombie/r9.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -161,21 +161,21 @@ void(float what) play_sound_z =
|
|||
if(what == 3)//death!
|
||||
{
|
||||
if (e < 0.125)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d0.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d0.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.25)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d1.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d1.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.375)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d2.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d2.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.5)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d3.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d3.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.625)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d4.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d4.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.75)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d5.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d5.wav", 1, ATTN_NORM);
|
||||
else if( e < 0.875)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d6.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d6.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/d7.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/zombie/d7.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
|
||||
}
|
||||
|
@ -185,20 +185,20 @@ void(float what) play_sound_z =
|
|||
return;
|
||||
|
||||
if(e < 0.2)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t0.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/zombie/t0.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.4)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t1.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/zombie/t1.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.6)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t2.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/zombie/t2.wav", 1, ATTN_NORM);
|
||||
else if (e < 0.8)
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t3.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/zombie/t3.wav", 1, ATTN_NORM);
|
||||
else
|
||||
sound(self,CHAN_VOICE,"sounds/zombie/t4.wav",1,ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/zombie/t4.wav", 1, ATTN_NORM);
|
||||
return;
|
||||
}
|
||||
if (what == 5) // Electric Zap
|
||||
{
|
||||
sound(self, CHAN_VOICE, "sounds/machines/elec_shock.wav", 1, ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/machines/elec_shock.wav", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -457,12 +457,12 @@ void() zombie_footstep
|
|||
if(self.laststep == 1)
|
||||
{
|
||||
self.laststep = 0;
|
||||
sound(self,5,"sounds/zombie/s0.wav",1,ATTN_NORM);
|
||||
sound(self, 5, "sounds/zombie/s0.wav", 1, ATTN_NORM);
|
||||
}
|
||||
else
|
||||
{
|
||||
self.laststep = 1;
|
||||
sound(self,5,"sounds/zombie/s1.wav",1,ATTN_NORM);
|
||||
sound(self, 5, "sounds/zombie/s1.wav", 1, ATTN_NORM);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1096,7 +1096,12 @@ void() Zombie_Death =
|
|||
self.rarm.solid = SOLID_NOT;
|
||||
self.rarm.movetype = MOVETYPE_NONE;
|
||||
self.rarm.takedamage = DAMAGE_NO;
|
||||
sound(self,CHAN_VOICE,"sounds/null.wav",1,ATTN_NORM);
|
||||
|
||||
// ...
|
||||
sound(self, CHAN_WEAPON, "sounds/null.wav" ,1, ATTN_NORM);
|
||||
sound(self, CHAN_VOICE, "sounds/null.wav" ,1, ATTN_NORM);
|
||||
sound(self, CHAN_BODY, "sounds/null.wav" ,1, ATTN_NORM);
|
||||
sound(self, CHAN_ITEM, "sounds/null.wav" ,1, ATTN_NORM);
|
||||
|
||||
self.usedent = world;
|
||||
|
||||
|
|
|
@ -269,15 +269,15 @@ if (self.state == STATE_TOP || self.state == STATE_UP)
|
|||
if (other.points >= self.cost)
|
||||
{
|
||||
door_fire();
|
||||
sound(self, 0,"sounds/misc/ching.wav", 1, 1);
|
||||
sound(self, CHAN_ITEM,"sounds/misc/buy.wav", 1, 1);
|
||||
sound(self, 0, "sounds/misc/ching.wav", 1, 1);
|
||||
sound(self, 1, "sounds/misc/buy.wav", 1, 1);
|
||||
switch(self.sounds)
|
||||
{
|
||||
case 1:
|
||||
sound(self, CHAN_ITEM,"sounds/misc/wood_door.wav", 1, 1);
|
||||
sound(self, 2, "sounds/misc/wood_door.wav", 1, 1);
|
||||
break;
|
||||
case 2:
|
||||
sound(self, CHAN_ITEM,"sounds/misc/debris.wav", 1, 1);
|
||||
sound(self, 2, "sounds/misc/debris.wav", 1, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -311,7 +311,7 @@ void () buy_weapon_touch =
|
|||
// Set the weapon's ammo to the max capacity.
|
||||
Util_SetPlayerAmmoInSlot(other, slot, wall_ammo);
|
||||
|
||||
sound(other, 0,"sounds/misc/ching.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/ching.wav", 1, 1);
|
||||
other.reload_delay = 0;
|
||||
|
||||
// Subtract the cost from player points.
|
||||
|
@ -350,7 +350,7 @@ void () buy_weapon_touch =
|
|||
|
||||
other.currentammo = getWeaponAmmo(other.weapon);
|
||||
|
||||
sound(other, 0,"sounds/misc/ching.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/ching.wav", 1, 1);
|
||||
other.reload_delay = 0;
|
||||
|
||||
// Subtract the cost from player points.
|
||||
|
@ -375,14 +375,14 @@ void () buy_weapon_touch =
|
|||
if (other.points < self.cost2)
|
||||
{
|
||||
centerprint(other, STR_NOTENOUGHPOINTS);
|
||||
sound(other, 0,"sounds/misc/denybuy.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/denybuy.wav", 1, 1);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
other.ach_tracker_coll++;
|
||||
other.reload_delay = 0;
|
||||
sound(other, 0,"sounds/misc/ching.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/ching.wav", 1, 1);
|
||||
//other.boughtweapon = true;
|
||||
addmoney(other, 0 - self.cost2, FALSE);
|
||||
other.grenades = other.grenades | 2;
|
||||
|
@ -409,7 +409,7 @@ void () buy_weapon_touch =
|
|||
if (other.points < self.cost)
|
||||
{
|
||||
centerprint(other, STR_NOTENOUGHPOINTS);
|
||||
sound(other, 0,"sounds/misc/denybuy.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/denybuy.wav", 1, 1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ void () buy_weapon_touch =
|
|||
{
|
||||
other.ach_tracker_coll++;
|
||||
other.reload_delay = 0;
|
||||
sound(other, 0,"sounds/misc/ching.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/ching.wav", 1, 1);
|
||||
//other.boughtweapon = true;
|
||||
addmoney(other, 0 - self.cost, FALSE);
|
||||
other.primary_grenades = 4;
|
||||
|
@ -514,7 +514,7 @@ void () buy_weapon_touch =
|
|||
other.weapon = 0;
|
||||
}
|
||||
|
||||
sound(other, 0,"sounds/misc/ching.wav", 1, 1);
|
||||
sound(other, 0, "sounds/misc/ching.wav", 1, 1);
|
||||
other.reload_delay = 0;
|
||||
addmoney(other, -1*self.cost, 0);
|
||||
if (self.enemy) {
|
||||
|
|
Loading…
Reference in a new issue