Skip to content

Commit

Permalink
Fix talk monsters resetting other talk monsters' dying schedule if th…
Browse files Browse the repository at this point in the history
…ey are both killed at the same time
  • Loading branch information
SamVanheer committed Oct 24, 2023
1 parent 3c7d4ed commit e306d7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* Fixed player gaining health when drowning with god mode enabled and recovering health after surfacing (Thanks malortie)
* Fixed human grunts continuing to fire for a few seconds after killing the last enemy in an area [Opposing Force Updated #100](https://github.com/SamVanheer/halflife-op4-updated/issues/100) (Thanks Ronin4862 and malortie)
* Fixed crash when +USEing NPCs that have just exited a scripted sequence (Thanks malortie)
* Fixed talk monsters resetting other talk monsters' dying schedule if they are both killed at the same time (Thanks FreeSlave)

### Features

Expand Down
2 changes: 1 addition & 1 deletion dlls/talkmonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ bool CTalkMonster::TakeDamage(entvars_t* pevInflictor, entvars_t* pevAttacker, f
{
CBaseEntity* pFriend = FindNearestFriend(false);

if (pFriend && pFriend->IsAlive())
if (pFriend && pFriend->IsAlive() && pFriend->pev->deadflag == DEAD_NO)
{
// only if not dead or dying!
CTalkMonster* pTalkMonster = (CTalkMonster*)pFriend;
Expand Down

0 comments on commit e306d7a

Please sign in to comment.