Skip to content

Commit

Permalink
When finding nearest friend, skip the dying ones as well (they should…
Browse files Browse the repository at this point in the history
…n't participate in talking)
  • Loading branch information
FreeSlave committed Oct 17, 2023
1 parent 17b34aa commit 6459192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlls/talkmonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ CBaseEntity *CTalkMonster::FindNearestFriend( BOOL fPlayer )
// for each friend in this bsp...
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
continue;

Expand Down

0 comments on commit 6459192

Please sign in to comment.