From 91c9e92981a424f9c9b2bd1403b08c9fe43dcfc4 Mon Sep 17 00:00:00 2001 From: puzl Date: Sat, 26 Aug 2006 12:28:52 +0000 Subject: [PATCH] o Improved playback of HUD alert messages ( base under attack, enemy approaches, hive under attack etc. ) o Added "The enemy apporaches" to the forced hud sound list. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@580 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/mod/AvHHud.cpp | 7 ++++++- releases/3.2.0/source/mod/AvHSharedUtil.cpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/releases/3.2.0/source/mod/AvHHud.cpp b/releases/3.2.0/source/mod/AvHHud.cpp index a1d01b5..065e85b 100644 --- a/releases/3.2.0/source/mod/AvHHud.cpp +++ b/releases/3.2.0/source/mod/AvHHud.cpp @@ -3503,7 +3503,12 @@ void AvHHud::PlayHUDSound(AvHHUDSound inSound) if(theSoundPtr) { - gEngfuncs.pfnPlaySoundByName(theSoundPtr, theVolume); + //gEngfuncs.pfnPlaySoundByNameAtLocation( sound, volume, (float *)&g_finalstate->playerstate.origin ); + cl_entity_s* thePlayer = this->GetVisiblePlayer(); + if ( thePlayer ) + gEngfuncs.pfnPlaySoundByNameAtLocation(theSoundPtr, theVolume, thePlayer->origin); + else + gEngfuncs.pfnPlaySoundByName(theSoundPtr, theVolume); if(theSoundLength >= 0.0f) { this->mTimeOfNextHudSound = this->mTimeOfCurrentUpdate + theSoundLength; diff --git a/releases/3.2.0/source/mod/AvHSharedUtil.cpp b/releases/3.2.0/source/mod/AvHSharedUtil.cpp index 1fe544f..9b0ba7e 100644 --- a/releases/3.2.0/source/mod/AvHSharedUtil.cpp +++ b/releases/3.2.0/source/mod/AvHSharedUtil.cpp @@ -3896,6 +3896,7 @@ bool AvHSHUGetForceHUDSound(AvHHUDSound inHUDSound) case HUD_SOUND_ALIEN_HIVE_COMPLETE: case HUD_SOUND_ALIEN_HIVE_DYING: case HUD_SOUND_ALIEN_HIVE_ATTACK: + case HUD_SOUND_ALIEN_ENEMY_APPROACHES: case HUD_SOUND_MARINE_CCUNDERATTACK: case HUD_SOUND_SQUAD1: case HUD_SOUND_SQUAD2: