mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 09:57:21 +01:00
Check before SetEnemy in squad monster
This commit is contained in:
parent
2c9cb0c645
commit
7a999bf987
@ -256,7 +256,10 @@ void CSquadMonster::SquadMakeEnemy( CBaseEntity *pEnemy )
|
||||
if( pMember )
|
||||
{
|
||||
// reset members who aren't activly engaged in fighting
|
||||
if( pMember->m_hEnemy != pEnemy && !pMember->HasConditions( bits_COND_SEE_ENEMY ) )
|
||||
if( pMember->m_hEnemy != pEnemy && !pMember->HasConditions( bits_COND_SEE_ENEMY )
|
||||
&& ( pMember->m_pSchedule && (pMember->m_pSchedule->iInterruptMask & bits_COND_NEW_ENEMY) )
|
||||
// My enemy might be not an enemy for member of my squad, e.g. if I was provoked by player.
|
||||
&& pMember->IRelationship(pEnemy) >= R_DL )
|
||||
{
|
||||
if( pMember->m_hEnemy != 0 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user