mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-13 15:27:56 +03:00
Fixed metrocops not speaking standoff sentences correctly
This commit is contained in:
parent
e27f4df8e5
commit
80251f67ec
@ -240,6 +240,23 @@ void CAI_StandoffBehavior::SetActive( bool fActive )
|
||||
{
|
||||
if ( fActive != m_fActive )
|
||||
{
|
||||
#ifdef MAPBASE
|
||||
// These sentences are only spoken if the standoff behavior is active, so they have to be arranged separately
|
||||
if ( fActive )
|
||||
{
|
||||
m_fActive = fActive;
|
||||
NotifyChangeBehaviorStatus();
|
||||
|
||||
GetOuter()->SpeakSentence( STANDOFF_SENTENCE_BEGIN_STANDOFF );
|
||||
}
|
||||
else
|
||||
{
|
||||
GetOuter()->SpeakSentence( STANDOFF_SENTENCE_END_STANDOFF );
|
||||
|
||||
m_fActive = fActive;
|
||||
NotifyChangeBehaviorStatus();
|
||||
}
|
||||
#else
|
||||
if ( fActive )
|
||||
{
|
||||
GetOuter()->SpeakSentence( STANDOFF_SENTENCE_BEGIN_STANDOFF );
|
||||
@ -251,6 +268,7 @@ void CAI_StandoffBehavior::SetActive( bool fActive )
|
||||
|
||||
m_fActive = fActive;
|
||||
NotifyChangeBehaviorStatus();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -882,7 +882,7 @@ void CNPC_MetroPolice::SpeakStandoffSentence( int nSentenceType )
|
||||
break;
|
||||
|
||||
case STANDOFF_SENTENCE_FORCED_TAKE_COVER:
|
||||
SpeakIfAllowed( TLK_COP_SO_END );
|
||||
SpeakIfAllowed( TLK_COP_SO_FORCE_COVER );
|
||||
break;
|
||||
|
||||
case STANDOFF_SENTENCE_STAND_CHECK_TARGET:
|
||||
@ -1008,7 +1008,12 @@ void CNPC_MetroPolice::SpeakSentence( int nSentenceType )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MAPBASE
|
||||
// Fixed issues with standoff sentences not playing when they should
|
||||
if ( m_StandoffBehavior.IsActive() )
|
||||
#else
|
||||
if ( GetRunningBehavior() == &m_StandoffBehavior )
|
||||
#endif
|
||||
{
|
||||
SpeakStandoffSentence( nSentenceType );
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user