Skip to content

Commit

Permalink
Merge pull request mapbase-source#185 from Petercov/mapbase-feature/e…
Browse files Browse the repository at this point in the history
…nemyfinder-nodraw-fix

Fixed enemyfinders becoming visible when they wake
  • Loading branch information
Blixibon authored Apr 26, 2022
2 parents 9c1ed5c + c1e751e commit 4bd06b6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sp/src/game/server/hl2/npc_enemyfinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ class CNPC_EnemyFinder : public CAI_BaseNPC
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;
Expand Down Expand Up @@ -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

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------
Expand Down

0 comments on commit 4bd06b6

Please sign in to comment.