diff --git a/sourcemm/changelog.txt b/sourcemm/changelog.txt index 0293e21..244513d 100644 --- a/sourcemm/changelog.txt +++ b/sourcemm/changelog.txt @@ -1,4 +1,6 @@ 2006/xx/xx 1.2.4: + - Added some extra information to the "meta game" command: Description and Interface. For + example, CS:S would display "Counter-Strike: Source" and "ServerGameDLL004." - Fixed bug where Metamod:Source could load the wrong GameDLL and/or load more than one GameDLL. This issue occured in HL2 CTF, SourceForts, or any other mod that relied on files from another mod directory. @@ -9,7 +11,7 @@ 2006/05/25 1.2.2: - Added the ability to "alias" plugin names in metaplugins.ini. - - Added 'meta alias" command. + - Added "meta alias" command. - Added SourceHook API for manual callclasses. - Added support for the latest Source engine (ServerGameDLL005). - Added API for printing text in a client's console with ClientConPrintf. This does the diff --git a/sourcemm/concommands.cpp b/sourcemm/concommands.cpp index 009054f..e0c97e2 100644 --- a/sourcemm/concommands.cpp +++ b/sourcemm/concommands.cpp @@ -151,8 +151,10 @@ CON_COMMAND(meta, "Metamod:Source Menu") return; } else if (strcmp(command, "game") == 0) { CONMSG("GameDLL Information\n"); - CONMSG(" Mod path: %s\n", g_ModPath.c_str()); - CONMSG(" Dll path: %s\n", g_BinPath.c_str()); + CONMSG(" Description: %s\n", g_GameDll.pGameDLL->GetGameDescription()); + CONMSG(" Mod Path: %s\n", g_ModPath.c_str()); + CONMSG(" DLL Path: %s\n", g_BinPath.c_str()); + CONMSG(" Interface: ServerGameDLL%03d\n", g_GameDllVersion); return; } else if (strcmp(command, "refresh") == 0) { diff --git a/sourcemm/sourcemm.cpp b/sourcemm/sourcemm.cpp index 25cf61f..db1626d 100644 --- a/sourcemm/sourcemm.cpp +++ b/sourcemm/sourcemm.cpp @@ -47,6 +47,7 @@ bool bInFirstLevel = true; bool gParsedGameInfo = false; SourceHook::List gamedll_list; SourceHook::CallClass *dllExec; +int g_GameDllVersion = 0; void ClearGamedllList(); @@ -379,12 +380,12 @@ SMM_API void *CreateInterface(const char *iface, int *ret) if (strncmp(iface, str, len) == 0) { //This is the interface we want! Right now we support versions 3 through 5. - int version = atoi(&(iface[len])); + g_GameDllVersion = atoi(&(iface[len])); int sizeTooBig = 0; //rename this to sizeWrong in the future! - if (version < MIN_GAMEDLL_VERSION || version > MAX_GAMEDLL_VERSION) + if (g_GameDllVersion < MIN_GAMEDLL_VERSION || g_GameDllVersion > MAX_GAMEDLL_VERSION) { //maybe this will get used in the future - sizeTooBig = version; + sizeTooBig = g_GameDllVersion; if (ret) *ret = IFACE_FAILED; } diff --git a/sourcemm/sourcemm.h b/sourcemm/sourcemm.h index 0853887..d347690 100644 --- a/sourcemm/sourcemm.h +++ b/sourcemm/sourcemm.h @@ -112,4 +112,7 @@ extern SourceHook::ISourceHook *g_SHPtr; /** @brief We have our own internal plugin id... */ extern PluginId g_PLID; +/** @brief ServerGameDLL version that is currently loaded */ +extern int g_GameDllVersion; + #endif //_INCLUDE_SOURCEMM_H