mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 13:44:22 +00:00
commit
d12c19f6cb
@ -172,6 +172,7 @@ public:
|
|||||||
void ClearSchedule( void );
|
void ClearSchedule( void );
|
||||||
BOOL FScheduleDone( void );
|
BOOL FScheduleDone( void );
|
||||||
void ChangeSchedule( Schedule_t *pNewSchedule );
|
void ChangeSchedule( Schedule_t *pNewSchedule );
|
||||||
|
virtual void OnChangeSchedule( Schedule_t *pNewSchedule ) {}
|
||||||
void NextScheduledTask( void );
|
void NextScheduledTask( void );
|
||||||
Schedule_t *ScheduleInList( const char *pName, Schedule_t **pList, int listCount );
|
Schedule_t *ScheduleInList( const char *pName, Schedule_t **pList, int listCount );
|
||||||
|
|
||||||
|
@ -250,6 +250,7 @@ public:
|
|||||||
void StartTask( Task_t *pTask );
|
void StartTask( Task_t *pTask );
|
||||||
Schedule_t *GetSchedule ( void );
|
Schedule_t *GetSchedule ( void );
|
||||||
Schedule_t *GetScheduleOfType(int Type);
|
Schedule_t *GetScheduleOfType(int Type);
|
||||||
|
void OnChangeSchedule( Schedule_t *pNewSchedule );
|
||||||
void StopFollowing( BOOL clearSchedule );
|
void StopFollowing( BOOL clearSchedule );
|
||||||
void SetAnswerQuestion(CTalkMonster *pSpeaker);
|
void SetAnswerQuestion(CTalkMonster *pSpeaker);
|
||||||
|
|
||||||
@ -2284,16 +2285,13 @@ int CHFGrunt :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo
|
|||||||
if( m_hEnemy == 0 )
|
if( m_hEnemy == 0 )
|
||||||
{
|
{
|
||||||
// If the player was facing directly at me, or I'm already suspicious, get mad
|
// If the player was facing directly at me, or I'm already suspicious, get mad
|
||||||
if( ( m_afMemory & bits_MEMORY_SUSPICIOUS ) || IsFacing( pevAttacker, pev->origin ) )
|
if( (( m_afMemory & bits_MEMORY_SUSPICIOUS ) || IsFacing( pevAttacker, pev->origin )) && gpGlobals->time - m_flLastHitByPlayer < 4.0 && m_iPlayerHits >= 3 )
|
||||||
{
|
{
|
||||||
if (gpGlobals->time - m_flLastHitByPlayer < 4.0 && m_iPlayerHits >= 3)
|
// Alright, now I'm pissed!
|
||||||
{
|
PlaySentence( "FG_MAD", 4, VOL_NORM, ATTN_NORM );
|
||||||
// Alright, now I'm pissed!
|
|
||||||
PlaySentence( "FG_MAD", 4, VOL_NORM, ATTN_NORM );
|
|
||||||
|
|
||||||
Remember( bits_MEMORY_PROVOKED );
|
Remember( bits_MEMORY_PROVOKED );
|
||||||
StopFollowing( TRUE );
|
StopFollowing( TRUE );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3623,12 +3621,16 @@ void CMedic::RunTask(Task_t *pTask)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Schedule_t *CMedic::GetSchedule()
|
void CMedic::OnChangeSchedule( Schedule_t *pNewSchedule )
|
||||||
{
|
{
|
||||||
if (m_fHealing) {
|
if (m_fHealing) {
|
||||||
StopHealing();
|
StopHealing();
|
||||||
}
|
}
|
||||||
|
CHFGrunt::OnChangeSchedule( pNewSchedule );
|
||||||
|
}
|
||||||
|
|
||||||
|
Schedule_t *CMedic::GetSchedule()
|
||||||
|
{
|
||||||
Schedule_t* prioritizedSchedule = PrioritizedSchedule();
|
Schedule_t* prioritizedSchedule = PrioritizedSchedule();
|
||||||
if (prioritizedSchedule)
|
if (prioritizedSchedule)
|
||||||
return prioritizedSchedule;
|
return prioritizedSchedule;
|
||||||
@ -3866,7 +3868,6 @@ void CMedic::StartFollowingHealTarget(CBaseEntity *pTarget)
|
|||||||
m_hTargetEnt = pTarget;
|
m_hTargetEnt = pTarget;
|
||||||
ClearConditions( bits_COND_CLIENT_PUSH );
|
ClearConditions( bits_COND_CLIENT_PUSH );
|
||||||
ClearSchedule();
|
ClearSchedule();
|
||||||
ChangeSchedule(GetScheduleOfType(SCHED_MEDIC_HEAL));
|
|
||||||
ALERT(at_aiconsole, "Medic started to follow injured %s\n", STRING(pTarget->pev->classname));
|
ALERT(at_aiconsole, "Medic started to follow injured %s\n", STRING(pTarget->pev->classname));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,6 +79,8 @@ void CBaseMonster::ChangeSchedule( Schedule_t *pNewSchedule )
|
|||||||
{
|
{
|
||||||
ASSERT( pNewSchedule != NULL );
|
ASSERT( pNewSchedule != NULL );
|
||||||
|
|
||||||
|
OnChangeSchedule( pNewSchedule );
|
||||||
|
|
||||||
m_pSchedule = pNewSchedule;
|
m_pSchedule = pNewSchedule;
|
||||||
m_iScheduleIndex = 0;
|
m_iScheduleIndex = 0;
|
||||||
m_iTaskStatus = TASKSTATUS_NEW;
|
m_iTaskStatus = TASKSTATUS_NEW;
|
||||||
|
@ -611,7 +611,7 @@ void CTalkMonster::Killed( entvars_t *pevAttacker, int iGib )
|
|||||||
// Don't finish that sentence
|
// Don't finish that sentence
|
||||||
StopTalking();
|
StopTalking();
|
||||||
SetUse( NULL );
|
SetUse( NULL );
|
||||||
CBaseMonster::Killed( pevAttacker, iGib );
|
CSquadMonster::Killed( pevAttacker, iGib );
|
||||||
}
|
}
|
||||||
|
|
||||||
CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber, BOOL bTrace )
|
CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber, BOOL bTrace )
|
||||||
@ -1301,7 +1301,7 @@ void CTalkMonster::TrySmellTalk( void )
|
|||||||
|
|
||||||
void CTalkMonster::StartMonster()
|
void CTalkMonster::StartMonster()
|
||||||
{
|
{
|
||||||
CBaseMonster::StartMonster();
|
CSquadMonster::StartMonster();
|
||||||
if (m_fStartSuspicious) {
|
if (m_fStartSuspicious) {
|
||||||
ALERT(at_console, "Talk Monster Pre-Provoked\n");
|
ALERT(at_console, "Talk Monster Pre-Provoked\n");
|
||||||
Remember(bits_MEMORY_PROVOKED);
|
Remember(bits_MEMORY_PROVOKED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user