From a6a8a04b1fb2aa6d94f77d1dced6da2f27fe6817 Mon Sep 17 00:00:00 2001 From: Peter Covington Date: Wed, 20 Apr 2022 09:41:26 -0400 Subject: [PATCH] Fixed enemyfinders becoming visible when they wake --- sp/src/game/server/hl2/npc_enemyfinder.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sp/src/game/server/hl2/npc_enemyfinder.cpp b/sp/src/game/server/hl2/npc_enemyfinder.cpp index f8fc21bd..d9855815 100644 --- a/sp/src/game/server/hl2/npc_enemyfinder.cpp +++ b/sp/src/game/server/hl2/npc_enemyfinder.cpp @@ -59,6 +59,10 @@ public: void InputTurnOff( inputdata_t &inputdata ); virtual void Wake( bool bFireOutput = true ); +#ifdef MAPBASE + // A version of Wake() that takes an activator + virtual void Wake(CBaseEntity* pActivator); +#endif private: int m_nStartOn; @@ -234,6 +238,16 @@ void CNPC_EnemyFinder::Wake( bool bFireOutput ) AddEffects( EF_NODRAW ); } +#ifdef MAPBASE +void CNPC_EnemyFinder::Wake(CBaseEntity* pActivator) +{ + BaseClass::Wake(pActivator); + + //Enemy finder is not allowed to become visible. + AddEffects(EF_NODRAW); +} +#endif // MAPBASE + //------------------------------------------------------------------------------ // //------------------------------------------------------------------------------