diff --git a/dlls/barney.cpp b/dlls/barney.cpp index 1248417a..6d9301b8 100644 --- a/dlls/barney.cpp +++ b/dlls/barney.cpp @@ -365,7 +365,8 @@ void CBarney::Spawn() m_afCapability = bits_CAP_HEAR | bits_CAP_TURN_HEAD | bits_CAP_DOORS_GROUP; MonsterInit(); - SetUse( &CTalkMonster::FollowerUse ); + if (!m_fStartSuspicious) + SetUse( &CTalkMonster::FollowerUse ); } //========================================================= diff --git a/dlls/gearbox/cleansuit_scientist.cpp b/dlls/gearbox/cleansuit_scientist.cpp index 9dbdb674..d3908187 100644 --- a/dlls/gearbox/cleansuit_scientist.cpp +++ b/dlls/gearbox/cleansuit_scientist.cpp @@ -73,7 +73,8 @@ void CCleansuitScientist::Spawn(void) pev->skin = 1; MonsterInit(); - SetUse(&CScientist::FollowerUse); + if (!m_fStartSuspicious) + SetUse(&CScientist::FollowerUse); } //========================================================= diff --git a/dlls/gearbox/otis.cpp b/dlls/gearbox/otis.cpp index 117a1a54..044926ed 100644 --- a/dlls/gearbox/otis.cpp +++ b/dlls/gearbox/otis.cpp @@ -205,7 +205,8 @@ void COtis::Spawn() } MonsterInit(); - SetUse(&COtis::FollowerUse); + if (!m_fStartSuspicious) + SetUse(&COtis::FollowerUse); } //========================================================= diff --git a/dlls/scientist.cpp b/dlls/scientist.cpp index c2402752..cd7a6c08 100644 --- a/dlls/scientist.cpp +++ b/dlls/scientist.cpp @@ -588,7 +588,8 @@ void CScientist::Spawn( void ) pev->skin = 1; MonsterInit(); - SetUse( &CTalkMonster::FollowerUse ); + if (!m_fStartSuspicious) + SetUse( &CTalkMonster::FollowerUse ); } //========================================================= diff --git a/dlls/talkmonster.cpp b/dlls/talkmonster.cpp index 1b998717..6dfc51d4 100644 --- a/dlls/talkmonster.cpp +++ b/dlls/talkmonster.cpp @@ -46,6 +46,7 @@ TYPEDESCRIPTION CTalkMonster::m_SaveData[] = DEFINE_FIELD( CTalkMonster, m_flLastSaidSmelled, FIELD_TIME ), DEFINE_FIELD( CTalkMonster, m_flStopTalkTime, FIELD_TIME ), DEFINE_FIELD( CTalkMonster, m_hTalkTarget, FIELD_EHANDLE ), + DEFINE_FIELD( CTalkMonster, m_fStartSuspicious, FIELD_BOOLEAN ), }; IMPLEMENT_SAVERESTORE( CTalkMonster, CSquadMonster ) @@ -1298,6 +1299,15 @@ void CTalkMonster::TrySmellTalk( void ) } } +void CTalkMonster::StartMonster() +{ + CBaseMonster::StartMonster(); + if (m_fStartSuspicious) { + ALERT(at_console, "Talk Monster Pre-Provoked\n"); + Remember(bits_MEMORY_PROVOKED); + } +} + int CTalkMonster::IRelationship( CBaseEntity *pTarget ) { if( pTarget->IsPlayer() ) @@ -1401,6 +1411,11 @@ void CTalkMonster::KeyValue( KeyValueData *pkvd ) m_iszUnUse = ALLOC_STRING( pkvd->szValue ); pkvd->fHandled = TRUE; } + else if( FStrEq( pkvd->szKeyName, "suspicious" ) ) + { + m_fStartSuspicious = atoi( pkvd->szValue ); + pkvd->fHandled = TRUE; + } else CBaseMonster::KeyValue( pkvd ); } diff --git a/dlls/talkmonster.h b/dlls/talkmonster.h index a6403077..0479a62a 100644 --- a/dlls/talkmonster.h +++ b/dlls/talkmonster.h @@ -109,6 +109,7 @@ public: int TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, float flDamage, int bitsDamageType); void Touch( CBaseEntity *pOther ); void Killed( entvars_t *pevAttacker, int iGib ); + void StartMonster( void ); int IRelationship ( CBaseEntity *pTarget ); virtual int CanPlaySentence( BOOL fDisregardState ); virtual void PlaySentence( const char *pszSentence, float duration, float volume, float attenuation ); @@ -175,6 +176,7 @@ public: float m_flStopTalkTime;// when in the future that I'll be done saying this sentence. EHANDLE m_hTalkTarget; // who to look at while talking + BOOL m_fStartSuspicious; CUSTOM_SCHEDULES };