Andrey Akhmichin 4 years ago
parent
commit
adeaefe9ff
  1. 8
      dlls/talkmonster.cpp

8
dlls/talkmonster.cpp

@ -623,11 +623,13 @@ CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber, @@ -623,11 +623,13 @@ CBaseEntity *CTalkMonster::EnumFriends( CBaseEntity *pPrevious, int listNumber,
pszFriend = m_szFriends[FriendNumber( listNumber )];
while( ( pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ) ) )
{
if( pFriend == this || !pFriend->IsAlive()
|| ( FBitSet( !pev->spawnflags, SF_MONSTER_ZOMBIECOP )
&& FBitSet( pFriend->pev->spawnflags, SF_MONSTER_ZOMBIECOP ) ) )
// don't talk to self or dead people
if( pFriend == this || !pFriend->IsAlive()
// Skip if a zombie cop has been killed and the the target friend is a normal cop.
|| ( FBitSet( pev->spawnflags, SF_MONSTER_ZOMBIECOP )
&& !FBitSet( pFriend->pev->spawnflags, SF_MONSTER_ZOMBIECOP ) ) )
continue;
if( bTrace )
{
vecCheck = pFriend->pev->origin;

Loading…
Cancel
Save