From 3a6f1df52dcabfaa9130c70467d975330f2e9f97 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 1 Jun 2007 17:28:11 +0000 Subject: [PATCH] added ServerGameClients info output to the "meta game" command --HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40405 --- sourcemm/concommands.cpp | 2 +- sourcemm/sourcemm.cpp | 2 ++ sourcemm/sourcemm.h | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sourcemm/concommands.cpp b/sourcemm/concommands.cpp index 4a3344f..5e0969e 100644 --- a/sourcemm/concommands.cpp +++ b/sourcemm/concommands.cpp @@ -154,7 +154,7 @@ CON_COMMAND(meta, "Metamod:Source Menu") 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); + CONMSG(" Interface: ServerGameDLL%03d, ServerGameClients%03d\n", g_GameDllVersion, g_GameClientsVersion); // Display user messages if (g_SmmAPI.MsgCacheSuccessful()) diff --git a/sourcemm/sourcemm.cpp b/sourcemm/sourcemm.cpp index 4db2a91..92e84d5 100644 --- a/sourcemm/sourcemm.cpp +++ b/sourcemm/sourcemm.cpp @@ -57,6 +57,7 @@ bool gParsedGameInfo = false; bool bGameInit = false; SourceHook::List gamedll_list; int g_GameDllVersion = 0; +int g_GameClientsVersion = 0; int g_VspVersion = 0; const char VSPIFACE[] = "ISERVERPLUGINCALLBACKS"; const char GAMEINFO_PATH[] = "|gameinfo_path|"; @@ -448,6 +449,7 @@ SMM_API void *CreateInterface(const char *iface, int *ret) { void *ptr = (g_GameDll.factory)(iface, ret); g_GameDll.pGameClients = static_cast(ptr); + g_GameClientsVersion = atoi(&iface[17]); return ptr; } diff --git a/sourcemm/sourcemm.h b/sourcemm/sourcemm.h index 78ca878..29e13b9 100644 --- a/sourcemm/sourcemm.h +++ b/sourcemm/sourcemm.h @@ -120,6 +120,9 @@ extern int g_GameDllVersion; /** @brief Highest IServerPluginCallbacks version that is supported by engine */ extern int g_VspVersion; +/** @brief IServerGameClients version the mod uses */ +extern int g_GameClientsVersion; + extern bool bGameInit; #endif //_INCLUDE_SOURCEMM_H