Make our sentry class use soundDefs
This commit is contained in:
parent
ddaf0f533a
commit
e3c7d8a1a2
4 changed files with 15 additions and 4 deletions
|
@ -87,7 +87,7 @@ item_armor::Touch(entity eToucher)
|
|||
return;
|
||||
|
||||
int ap;
|
||||
int tp;
|
||||
int tp = 0;
|
||||
|
||||
/* get remaining points */
|
||||
ap = pl.m_iMaxArmor - pl.armor;
|
||||
|
@ -198,4 +198,4 @@ item_armor3(void)
|
|||
precache_model("models/r_armor.mdl");
|
||||
spawnfunc_item_armor();
|
||||
self.classname = "item_armor3";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,14 +42,14 @@ TFCSentry::Think(void)
|
|||
m_eHead.SetBoneControl2(0.5f);
|
||||
|
||||
if (m_flNextIdleSound < time) {
|
||||
sound(this, CHAN_VOICE, "weapons/turridle.wav", 1.0f, ATTN_NORM);
|
||||
Sound_Play(this, CHAN_VOICE, "turret_tfc.idle_noise");
|
||||
m_flNextIdleSound = time + 10.0f;
|
||||
}
|
||||
|
||||
if (t)
|
||||
m_state = SENTRY_ALERTED;
|
||||
} else if (m_state == SENTRY_ALERTED) {
|
||||
sound(this, CHAN_VOICE, "weapons/turrspot.wav", 1.0f, ATTN_NORM);
|
||||
Sound_Play(this, CHAN_VOICE, "turret_tfc.target_spotted");
|
||||
m_state = SENTRY_SHOOTING;
|
||||
} else if (m_state == SENTRY_SHOOTING) {
|
||||
// shoot things
|
||||
|
|
|
@ -24,6 +24,8 @@ void
|
|||
Game_Worldspawn(void)
|
||||
{
|
||||
forceinfokey(world, "areadefs", "0");
|
||||
Sound_Precache("turret_tfc.idle_noise");
|
||||
Sound_Precache("turret_tfc.target_spotted");
|
||||
Sound_Precache("ammo.pickup");
|
||||
Sound_Precache("ammo.respawn");
|
||||
Sound_Precache("player.fall");
|
||||
|
|
9
zpak001.pk3dir/sound/turret_tfc.sndshd
Normal file
9
zpak001.pk3dir/sound/turret_tfc.sndshd
Normal file
|
@ -0,0 +1,9 @@
|
|||
turret_tfc.idle_noise
|
||||
{
|
||||
sample "weapons/turridle.wav"
|
||||
}
|
||||
|
||||
turret_tfc.target_spotted
|
||||
{
|
||||
sample "weapons/turrspot.wav"
|
||||
}
|
Loading…
Reference in a new issue