1.1 --- a/sourcemm/concommands.cpp Thu May 05 21:02:31 2005 +0000
1.2 +++ b/sourcemm/concommands.cpp Fri May 06 09:44:41 2005 +0000
1.3 @@ -22,13 +22,27 @@
1.4 {
1.5 // Add the FCVAR_GAMEDLL flag
1.6 // => No crash on exit!
1.7 - pCommand->AddFlags(FCVAR_GAMEDLL);
1.8 + // UPDATE: Do _not_ add the FCVAR_GAMEDLL flag here, as it
1.9 + // causes the command to be unusable on listenservers until you load a map
1.10 + // We will set the FCVAR_GAMEDLL flag on all commands we have registered once we are being unloaded
1.11 + //pCommand->AddFlags(FCVAR_GAMEDLL);
1.12 + m_RegisteredCommands.push_back(pCommand);
1.13 +
1.14 pCommand->SetNext( NULL );
1.15 g_Engine.icvar->RegisterConCommandBase(pCommand);
1.16
1.17 return true;
1.18 }
1.19
1.20 +void SMConVarAccessor::MarkCommandsAsGameDLL()
1.21 +{
1.22 + for (std::list<ConCommandBase*>::iterator iter = m_RegisteredCommands.begin();
1.23 + iter != m_RegisteredCommands.end(); ++iter)
1.24 + {
1.25 + (*iter)->AddFlags(FCVAR_GAMEDLL);
1.26 + }
1.27 +}
1.28 +
1.29 ConVar metamod_version("metamod_version", SOURCEMM_VERSION, FCVAR_REPLICATED | FCVAR_SPONLY, "Metamod:Source Version");
1.30
1.31 CON_COMMAND(meta, "Metamod:Source Menu")
1.32 @@ -54,6 +68,7 @@
1.33 Msg("Metamod:Source version %s\n", SOURCEMM_VERSION);
1.34 Msg("Compiled on: %s\n", SOURCEMM_DATE);
1.35 Msg("Plugin interface version: %d:%d\n", PLAPI_VERSION, PLAPI_MIN_VERSION);
1.36 + Msg("SourceHook version: %d:%d\n", g_SourceHook.GetIfaceVersion(), g_SourceHook.GetImplVersion());
1.37 Msg("http://www.sourcemm.net/\n\n");
1.38
1.39 return;