Browse Source

When finding nearest friend, skip the dying ones as well (they shouldn't participate in talking) (#398)

fix-cwd-path
Roman Chistokhodov 1 year ago committed by GitHub
parent
commit
3cf40ccf12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      dlls/talkmonster.cpp

2
dlls/talkmonster.cpp

@ -791,7 +791,7 @@ CBaseEntity *CTalkMonster::FindNearestFriend( BOOL fPlayer )
// for each friend in this bsp... // for each friend in this bsp...
while( ( pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ) ) ) while( ( pFriend = UTIL_FindEntityByClassname( pFriend, pszFriend ) ) )
{ {
if( pFriend == this || !pFriend->IsAlive() ) if( pFriend == this || !pFriend->IsAlive() || pFriend->pev->deadflag != DEAD_NO )
// don't talk to self or dead people // don't talk to self or dead people
continue; continue;

Loading…
Cancel
Save