From 22dd1ba5926c2b6fb620e916f5395e58055abb89 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Wed, 28 Mar 2007 20:28:42 +0000 Subject: [PATCH] Couple of quick things... - Changed SourceMod logtag from SRCMOD to SM - ConVars dynamically created by convar manager now can properly be set on srcds command line --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40663 --- core/sm_srvcmds.cpp | 7 +++++++ core/sourcemm_api.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/core/sm_srvcmds.cpp b/core/sm_srvcmds.cpp index 8771eb78..77cf815d 100644 --- a/core/sm_srvcmds.cpp +++ b/core/sm_srvcmds.cpp @@ -59,6 +59,13 @@ bool RootConsoleMenu::RegisterConCommandBase(ConCommandBase *pCommand) { META_REGCVAR(pCommand); + /* Override values of convars created by SourceMod convar manager if specified on command line */ + const char *cmdLineValue = icvar->GetCommandLineValue(pCommand->GetName()); + if (cmdLineValue && !pCommand->IsCommand()) + { + static_cast(pCommand)->SetValue(cmdLineValue); + } + return true; } diff --git a/core/sourcemm_api.cpp b/core/sourcemm_api.cpp index ea4cdcd7..c2461049 100644 --- a/core/sourcemm_api.cpp +++ b/core/sourcemm_api.cpp @@ -121,5 +121,5 @@ const char *SourceMod_Core::GetDate() const char *SourceMod_Core::GetLogTag() { - return "SRCMOD"; + return "SM"; }