Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/game/server/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class CBasePlayer : public CBaseCombatCharacter
virtual void GetStepSoundVelocities( float *velwalk, float *velrun );
virtual void SetStepSoundTime( stepsoundtimes_t iStepSoundTime, bool bWalking );
virtual void DeathSound( const CTakeDamageInfo &info );
virtual const char* GetSceneSoundToken( void ) { return ""; }
virtual const char* GetSceneSoundToken( CBasePlayer * ) { return ""; }

virtual void OnEmitFootstepSound( const CSoundParameters& params, const Vector& vecOrigin, float fVolume ) {}

Expand Down
2 changes: 1 addition & 1 deletion src/game/server/sceneentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ bool CSceneEntity::GetSoundNameForPlayer( CChoreoEvent *event, CBasePlayer *play

if ( pActor && pActor->IsPlayer() )
{
pchToken = dynamic_cast< CBasePlayer* >( pActor )->GetSceneSoundToken();
pchToken = dynamic_cast< CBasePlayer* >( pActor )->GetSceneSoundToken( player );
}

// Copy the sound name
Expand Down
11 changes: 10 additions & 1 deletion src/game/server/tf/tf_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15315,7 +15315,7 @@ void CTFPlayer::DeathSound( const CTakeDamageInfo &info )
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
const char* CTFPlayer::GetSceneSoundToken( void )
const char* CTFPlayer::GetSceneSoundToken( CBasePlayer *pListener )
{
if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() && GetTeamNumber() == TF_TEAM_PVE_INVADERS )
{
Expand All @@ -15328,6 +15328,15 @@ const char* CTFPlayer::GetSceneSoundToken( void )
return "MVM_";
}
}
else if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() &&
GetTeamNumber() == TF_TEAM_PVE_DEFENDERS &&
IsPlayerClass( TF_CLASS_SPY ) &&
m_Shared.InCond( TF_COND_DISGUISED ) &&
m_Shared.GetDisguiseTeam() == TF_TEAM_PVE_INVADERS &&
( pListener == this || ( pListener && pListener->GetTeamNumber() == TF_TEAM_PVE_INVADERS ) ) )
{
return "MVM_";
}
else
{
return "";
Expand Down
2 changes: 1 addition & 1 deletion src/game/server/tf/tf_player.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class CTFPlayer : public CBaseMultiplayerPlayer, public IHasAttributes, public I
float PlayCritReceivedSound( void );
void PainSound( const CTakeDamageInfo &info );
void DeathSound( const CTakeDamageInfo &info );
virtual const char* GetSceneSoundToken( void );
virtual const char* GetSceneSoundToken( CBasePlayer *pListener );
void StunSound( CTFPlayer* pAttacker, int iStunFlags, int iOldStunFlags=0 );

void SetSeeCrit( bool bAllSeeCrit, bool bMiniCrit, bool bShowDisguisedCrit ) { m_bAllSeeCrit = bAllSeeCrit; m_bMiniCrit = bMiniCrit; m_bShowDisguisedCrit = bShowDisguisedCrit; }
Expand Down