Make our sentry class use soundDefs

This commit is contained in:
Marco Cawthorne 2022-08-05 14:25:01 -07:00
parent ddaf0f533a
commit e3c7d8a1a2
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
4 changed files with 15 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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");

View File

@ -0,0 +1,9 @@
turret_tfc.idle_noise
{
sample "weapons/turridle.wav"
}
turret_tfc.target_spotted
{
sample "weapons/turrspot.wav"
}