From 3cf40ccf121a935d3aea836c1d150df251d95c56 Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Tue, 17 Oct 2023 18:15:10 +0300 Subject: [PATCH] When finding nearest friend, skip the dying ones as well (they shouldn't participate in talking) (#398) --- dlls/talkmonster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/talkmonster.cpp b/dlls/talkmonster.cpp index 83100466..ed173231 100644 --- a/dlls/talkmonster.cpp +++ b/dlls/talkmonster.cpp @@ -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;