mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 22:27:57 +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 )
|
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 )
|
if ( fActive )
|
||||||
{
|
{
|
||||||
GetOuter()->SpeakSentence( STANDOFF_SENTENCE_BEGIN_STANDOFF );
|
GetOuter()->SpeakSentence( STANDOFF_SENTENCE_BEGIN_STANDOFF );
|
||||||
@ -251,6 +268,7 @@ void CAI_StandoffBehavior::SetActive( bool fActive )
|
|||||||
|
|
||||||
m_fActive = fActive;
|
m_fActive = fActive;
|
||||||
NotifyChangeBehaviorStatus();
|
NotifyChangeBehaviorStatus();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -882,7 +882,7 @@ void CNPC_MetroPolice::SpeakStandoffSentence( int nSentenceType )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case STANDOFF_SENTENCE_FORCED_TAKE_COVER:
|
case STANDOFF_SENTENCE_FORCED_TAKE_COVER:
|
||||||
SpeakIfAllowed( TLK_COP_SO_END );
|
SpeakIfAllowed( TLK_COP_SO_FORCE_COVER );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STANDOFF_SENTENCE_STAND_CHECK_TARGET:
|
case STANDOFF_SENTENCE_STAND_CHECK_TARGET:
|
||||||
@ -1008,7 +1008,12 @@ void CNPC_MetroPolice::SpeakSentence( int nSentenceType )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MAPBASE
|
||||||
|
// Fixed issues with standoff sentences not playing when they should
|
||||||
|
if ( m_StandoffBehavior.IsActive() )
|
||||||
|
#else
|
||||||
if ( GetRunningBehavior() == &m_StandoffBehavior )
|
if ( GetRunningBehavior() == &m_StandoffBehavior )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
SpeakStandoffSentence( nSentenceType );
|
SpeakStandoffSentence( nSentenceType );
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user