From da7f06b835eb793fdf93a0188f534a3a236f375e Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Sun, 26 Apr 2020 00:12:33 +0200 Subject: [PATCH] Counter-Strike: Hostage interaction rewards. 150 dollars! Grab one now for big big boni! --- src/server/cstrike/hostage_entity.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/server/cstrike/hostage_entity.cpp b/src/server/cstrike/hostage_entity.cpp index 21134a14..548823a0 100644 --- a/src/server/cstrike/hostage_entity.cpp +++ b/src/server/cstrike/hostage_entity.cpp @@ -78,6 +78,8 @@ enum class hostage_entity:CBaseNPC { + int m_iUsedOnce; + void(void) hostage_entity; virtual void(void) Respawn; @@ -117,6 +119,12 @@ hostage_entity::PlayerUse(void) if (m_eFollowing == world) Sound_Speak(this, "hostage_entity.follow"); + /* CT reward, first time only */ + if (m_iUsedOnce == FALSE) { + Money_AddMoney((player)eActivator, 150); + m_iUsedOnce = TRUE; + } + CBaseNPC::PlayerUse(); } @@ -157,6 +165,7 @@ hostage_entity::Respawn(void) { CBaseNPC::Respawn(); m_iFlags |= MONSTER_CANFOLLOW; + m_iUsedOnce = FALSE; } void