mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-09 11:31:23 +00:00
Fix ear ringing being stuck
► Fixed an issue where ear ringing caused by explosion would stay stuck and not fade out.
This commit is contained in:
parent
a62efecf62
commit
838a3379ca
3 changed files with 8 additions and 0 deletions
|
@ -1462,6 +1462,7 @@ void CBasePlayer::OnDamagedByExplosion( const CTakeDamageInfo &info )
|
|||
|
||||
CSingleUserRecipientFilter user( this );
|
||||
enginesound->SetPlayerDSP( user, effect, false );
|
||||
iDamageTime = gpGlobals->curtime;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
|
|
|
@ -838,6 +838,7 @@ private:
|
|||
|
||||
int DetermineSimulationTicks( void );
|
||||
void AdjustPlayerTimeBase( int simulation_ticks );
|
||||
int iDamageTime;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "player_command.h"
|
||||
#include "movehelper_server.h"
|
||||
#include "iservervehicle.h"
|
||||
#include "engine/IEngineSound.h"
|
||||
#include "tier0/vprof.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
|
@ -300,6 +301,11 @@ void CPlayerMove::RunPostThink( CBasePlayer *player )
|
|||
{
|
||||
VPROF( "CPlayerMove::RunPostThink" );
|
||||
|
||||
CSingleUserRecipientFilter user( player );
|
||||
|
||||
if ( gpGlobals->curtime >= player->iDamageTime + 3 )
|
||||
enginesound->SetPlayerDSP( user, 0, false );
|
||||
|
||||
// Run post-think
|
||||
player->PostThink();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue