diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index d41cd9607..881912082 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -2414,9 +2414,13 @@ void CGameClient::ConKill(IConsole::IResult *pResult, void *pUserData) void CGameClient::ConchainLanguageUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData) { + CGameClient *pThis = static_cast(pUserData); + const bool Changed = pThis->Client()->GlobalTime() && pResult->NumArguments() && str_comp(pResult->GetString(0), g_Config.m_ClLanguagefile) != 0; pfnCallback(pResult, pCallbackUserData); - if(pResult->NumArguments()) - ((CGameClient *)pUserData)->OnLanguageChange(); + if(Changed) + { + pThis->OnLanguageChange(); + } } void CGameClient::ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)