mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-16 23:19:49 +01:00
When finding nearest friend, skip the dying ones as well (they shouldn't participate in talking) (#398)
This commit is contained in:
parent
17b34aa42b
commit
3cf40ccf12
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user