From 7fb624ab6c8cfbc51147a51065969efc2b533b86 Mon Sep 17 00:00:00 2001 From: Vaqtincha <51029683+Vaqtincha@users.noreply.github.com> Date: Tue, 14 Jan 2020 22:30:42 +0500 Subject: [PATCH] [CZERO] Fix count hostages ("ScenarioIcon" message) (#475) Fix HUD hostage icon when last hostage was saved --- regamedll/dlls/hostage/hostage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/regamedll/dlls/hostage/hostage.cpp b/regamedll/dlls/hostage/hostage.cpp index 2b6fb033..c9ff7972 100644 --- a/regamedll/dlls/hostage/hostage.cpp +++ b/regamedll/dlls/hostage/hostage.cpp @@ -457,7 +457,9 @@ void CHostage::IdleThink() GETPLAYERUSERID(pPlayer->edict()), GETPLAYERAUTHID(pPlayer->edict())); } +#ifndef REGAMEDLL_FIXES SendHostageEventMsg(); +#endif MESSAGE_BEGIN(MSG_SPEC, SVC_DIRECTOR); WRITE_BYTE(9); @@ -470,6 +472,10 @@ void CHostage::IdleThink() pev->effects |= EF_NODRAW; Remove(); +#ifdef REGAMEDLL_FIXES + SendHostageEventMsg(); +#endif + CSGameRules()->m_iHostagesRescued++; CSGameRules()->CheckWinConditions();