mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-21 14:54:14 +01:00
Added inline game_dir helper to MetamodVersionInfo (no bug, r=ds).
This commit is contained in:
parent
9408b525ac
commit
f8898db698
@ -112,6 +112,19 @@ struct MetamodVersionInfo
|
|||||||
int pl_max; /**< Plugin API maximum version */
|
int pl_max; /**< Plugin API maximum version */
|
||||||
int source_engine; /**< Source Engine version (SOURCE_* constants) */
|
int source_engine; /**< Source Engine version (SOURCE_* constants) */
|
||||||
const char *game_dir; /**< Game directory name */
|
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;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user