diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/tf2/c_hint_events.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/client/tf2/c_hint_events.h')
| -rw-r--r-- | game/client/tf2/c_hint_events.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/game/client/tf2/c_hint_events.h b/game/client/tf2/c_hint_events.h new file mode 100644 index 0000000..89dc0db --- /dev/null +++ b/game/client/tf2/c_hint_events.h @@ -0,0 +1,62 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//=============================================================================// + +#ifndef C_HINT_EVENTS_H +#define C_HINT_EVENTS_H +#ifdef _WIN32 +#pragma once +#endif + + +class CHintData; + + +typedef enum +{ + HINTEVENT_OBJECT_BUILT_BY_LOCAL_PLAYER=0 // C_HintEvent_ObjectBuiltByLocalPlayer +} HintEventType; + + +// All hint events derive from this. +class C_HintEvent_Base +{ +public: + // Find out what kind of event this is. + virtual HintEventType GetType() = 0; +}; + + +// Fire a global hint event. It goes to all hint types so they can determine if +// they want to react. +void GlobalHintEvent( C_HintEvent_Base *pEvent ); + + +// Hint callbacks for each type of hint. +void HintEventFn_BuildObject( CHintData *pData, C_HintEvent_Base *pEvent ); + + + +// This notifies the hint system that an object has been built by the local player so +// it can disable all further hints referring to objects of this type. +class C_BaseObject; + +class C_HintEvent_ObjectBuiltByLocalPlayer : public C_HintEvent_Base +{ +public: + C_HintEvent_ObjectBuiltByLocalPlayer( C_BaseObject *pObj ) + { + m_pObject = pObj; + } + + virtual HintEventType GetType() { return HINTEVENT_OBJECT_BUILT_BY_LOCAL_PLAYER; } + +public: + C_BaseObject *m_pObject; // The object just built. +}; + + +#endif // C_HINT_EVENTS_H |