From f8898db698544561ab862a74313002a7d38930d8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 29 Oct 2009 21:41:07 -0700 Subject: [PATCH] Added inline game_dir helper to MetamodVersionInfo (no bug, r=ds). --- core/ISmmPluginExt.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/ISmmPluginExt.h b/core/ISmmPluginExt.h index 5a5e282..3eb64ae 100644 --- a/core/ISmmPluginExt.h +++ b/core/ISmmPluginExt.h @@ -112,6 +112,19 @@ struct MetamodVersionInfo int pl_max; /**< Plugin API maximum version */ int source_engine; /**< Source Engine version (SOURCE_* constants) */ const char *game_dir; /**< Game directory name */ + + /** + * @brief Returns the game folder. + * + * @return Game folder, or NULL if not available on this version + * of Metamod:Source. + */ + inline const char *GetGameDir() const + { + if (pl_max >= 15) + return NULL; + return game_dir; + } }; /**