void CTalkMonster :: FollowerUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { // Don't allow use during a scripted_sentence if ( m_useTime > gpGlobals->time ) return; if ( pCaller != NULL && pCaller->IsPlayer() ) { // Pre-disaster followers can't be used if ( GetSpawnFlags().Any( SF_MONSTER_PREDISASTER ) ) { DeclineFollowing(); } else if ( CanFollow() ) { LimitFollowers( pCaller , 1 ); if ( m_afMemory & bits_MEMORY_PROVOKED ) ALERT( at_console, "I'm not following you, you evil person!\n" ); else { StartFollowing( pCaller ); SetBits(m_bitsSaid, bit_saidHelloPlayer); // Don't say hi after you've started following } } else { StopFollowing( true ); } } }
void CNPCSimpleTalker::FollowerUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ) { // Don't allow use during a scripted_sentence if ( m_useTime > gpGlobals->curtime ) return; if ( pCaller != NULL && pCaller->IsPlayer() ) { if ( !m_FollowBehavior.GetFollowTarget() && IsInterruptable() ) { #if TOML_TODO LimitFollowers( pCaller , 1 ); #endif if ( m_afMemory & bits_MEMORY_PROVOKED ) Msg( "I'm not following you, you evil person!\n" ); else { StartFollowing( pCaller ); } } else { StopFollowing(); } } }