diff -r 90513b7e3d99 -r ee7abd0da4dd sourcemm/concommands.cpp --- a/sourcemm/concommands.cpp Thu May 05 21:02:31 2005 +0000 +++ b/sourcemm/concommands.cpp Fri May 06 09:44:41 2005 +0000 @@ -22,13 +22,27 @@ { // Add the FCVAR_GAMEDLL flag // => No crash on exit! - pCommand->AddFlags(FCVAR_GAMEDLL); + // UPDATE: Do _not_ add the FCVAR_GAMEDLL flag here, as it + // causes the command to be unusable on listenservers until you load a map + // We will set the FCVAR_GAMEDLL flag on all commands we have registered once we are being unloaded + //pCommand->AddFlags(FCVAR_GAMEDLL); + m_RegisteredCommands.push_back(pCommand); + pCommand->SetNext( NULL ); g_Engine.icvar->RegisterConCommandBase(pCommand); return true; } +void SMConVarAccessor::MarkCommandsAsGameDLL() +{ + for (std::list::iterator iter = m_RegisteredCommands.begin(); + iter != m_RegisteredCommands.end(); ++iter) + { + (*iter)->AddFlags(FCVAR_GAMEDLL); + } +} + ConVar metamod_version("metamod_version", SOURCEMM_VERSION, FCVAR_REPLICATED | FCVAR_SPONLY, "Metamod:Source Version"); CON_COMMAND(meta, "Metamod:Source Menu") @@ -54,6 +68,7 @@ Msg("Metamod:Source version %s\n", SOURCEMM_VERSION); Msg("Compiled on: %s\n", SOURCEMM_DATE); Msg("Plugin interface version: %d:%d\n", PLAPI_VERSION, PLAPI_MIN_VERSION); + Msg("SourceHook version: %d:%d\n", g_SourceHook.GetIfaceVersion(), g_SourceHook.GetImplVersion()); Msg("http://www.sourcemm.net/\n\n"); return;