1.1 --- a/core/sourcemod.h Wed Dec 13 11:19:46 2006 +0000
1.2 +++ b/core/sourcemod.h Fri Dec 15 13:38:04 2006 +0000
1.3 @@ -37,6 +37,10 @@
1.4 */
1.5 const char *GetSMBaseDir();
1.6
1.7 + /**
1.8 + * @brief Returns whether our load in this map is late.
1.9 + */
1.10 + bool IsLateLoadInMap();
1.11 private:
1.12 /**
1.13 * @brief Loading plugins
1.14 @@ -45,6 +49,41 @@
1.15 private:
1.16 char m_SMBaseDir[PLATFORM_MAX_PATH+1];
1.17 bool m_IsMapLoading;
1.18 + bool m_IsLateLoadInMap;
1.19 +};
1.20 +
1.21 +/**
1.22 + * @brief Any class deriving from this will be automatically initiated/shutdown by SourceMod
1.23 + */
1.24 +class SMGlobalClass
1.25 +{
1.26 + friend class SourceModBase;
1.27 +public:
1.28 + SMGlobalClass();
1.29 +public:
1.30 + /**
1.31 + * @brief Called when SourceMod is initially loading
1.32 + */
1.33 + virtual void OnSourceModStartup(bool late)
1.34 + {
1.35 + }
1.36 +
1.37 + /**
1.38 + * @brief Called after all global classes have initialized
1.39 + */
1.40 + virtual void OnSourceModAllInitialized()
1.41 + {
1.42 + }
1.43 +
1.44 + /**
1.45 + * @brief Called when SourceMod is shutting down
1.46 + */
1.47 + virtual void OnSourceModShutdown()
1.48 + {
1.49 + }
1.50 +private:
1.51 + SMGlobalClass *m_pGlobalClassNext;
1.52 + static SMGlobalClass *head;
1.53 };
1.54
1.55 extern SourceModBase g_SourceMod;