mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-03 10:35:42 +00: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...
|
// 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…
x
Reference in New Issue
Block a user