mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Make soldiers properly use shot sentences when hit by player
This commit is contained in:
parent
3c6ad215d1
commit
63205cd3f0
@ -2285,16 +2285,13 @@ int CHFGrunt :: TakeDamage( entvars_t *pevInflictor, entvars_t *pevAttacker, flo
|
||||
if( m_hEnemy == 0 )
|
||||
{
|
||||
// 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 );
|
||||
StopFollowing( TRUE );
|
||||
}
|
||||
Remember( bits_MEMORY_PROVOKED );
|
||||
StopFollowing( TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user