1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-19 08:52:34 +01:00

Added some extra information to the "meta game" command: Description and Interface

(This is BAILOPAN's excellent idea!)

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40218
This commit is contained in:
Scott Ehlert 2006-07-13 06:08:08 +00:00
parent 2972849a8d
commit 199f634592
4 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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) {

View File

@ -47,6 +47,7 @@ bool bInFirstLevel = true;
bool gParsedGameInfo = false;
SourceHook::List<GameDllInfo *> gamedll_list;
SourceHook::CallClass<IServerGameDLL> *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;
}

View File

@ -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