Let logic binary access ServerLang value on startup (bug 4675, r=dvander).

This commit is contained in:
Fyren
2011-07-24 19:52:22 -07:00
parent c01101dbd0
commit 458378be66
3 changed files with 15 additions and 1 deletions
+6
View File
@@ -750,6 +750,12 @@ void Translator::OnSourceModAllInitialized()
{
AddLanguage("en", "English");
const char* lang = smcore.GetCoreConfigValue("ServerLang");
if (lang)
{
strncpy(m_InitialLang, lang, sizeof(m_InitialLang));
}
g_pCorePhrases = CreatePhraseCollection();
g_pCorePhrases->AddPhraseFile("core.phrases");
+2 -1
View File
@@ -42,7 +42,7 @@ using namespace SourceMod;
* Add 1 to the RHS of this expression to bump the intercom file
* This is to prevent mismatching core/logic binaries
*/
#define SM_LOGIC_MAGIC (0x0F47C0DE - 16)
#define SM_LOGIC_MAGIC (0x0F47C0DE - 17)
#if defined SM_LOGIC
class IVEngineServer
@@ -115,6 +115,7 @@ struct sm_core_t
const char * (*GetGameDescription)();
const char * (*GetSourceEngineName)();
bool (*SymbolsAreHidden)();
const char * (*GetCoreConfigValue)(const char*);
/* Data */
ServerGlobals *serverGlobals;
void * serverFactory;