diff --git a/.gitignore b/.gitignore index 4395abd3..80c624c6 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ $RECYCLE.BIN/ # ========================= # Operating System Files # ========================= +# Windows +*.lnk # OSX # ========================= diff --git a/src/Components/Modules/Dvar.cpp b/src/Components/Modules/Dvar.cpp index 52e8b05d..f2afec22 100644 --- a/src/Components/Modules/Dvar.cpp +++ b/src/Components/Modules/Dvar.cpp @@ -129,6 +129,18 @@ namespace Components { // TODO: Register string dvars here + // TODO: Support multiple languages here and find a better place for this. :/ + if (std::string(Game::Win_GetLanguage()) == "german") + { + Localization::Set("MP_SEARCHING_FOR_PLAYER", "Warte"); + Localization::Set("MENU_WAITING_FOR_MORE_PLAYERS_TEAMS", "Auf weitere Spieler zum Teamausgleich warten"); + } + else + { + Localization::Set("MP_SEARCHING_FOR_PLAYER", "Waiting"); + Localization::Set("MENU_WAITING_FOR_MORE_PLAYERS_TEAMS", "Waiting for more players to balance teams"); + } + return Dvar::Register(name, "Unknown Soldier", Dvar::Flag(flag | Game::dvar_flag::DVAR_FLAG_SAVED).val, description).Get(); } diff --git a/src/Components/Modules/Localization.cpp b/src/Components/Modules/Localization.cpp index c9f1f21f..ee5f9c2d 100644 --- a/src/Components/Modules/Localization.cpp +++ b/src/Components/Modules/Localization.cpp @@ -34,6 +34,9 @@ namespace Components Utils::Hook(0x629B90, Localization::Get, HOOK_JUMP).Install()->Quick(); //Localization::Set("MENU_MULTIPLAYER_CAPS", "^5Fotze"); + + Localization::Set("MENU_SEARCHINGFORGAMES_100MS", ""); + Localization::UseLocalization = Dvar::Register("ui_localize", true, Game::dvar_flag::DVAR_FLAG_NONE, "Use localization strings"); } diff --git a/src/Components/Modules/Menus.cpp b/src/Components/Modules/Menus.cpp index 466fba1c..e513b99b 100644 --- a/src/Components/Modules/Menus.cpp +++ b/src/Components/Modules/Menus.cpp @@ -252,6 +252,16 @@ namespace Components } } + // TODO: beautify + if (!_stricmp(menuList->name, "ui_mp/code.txt")) + { + std::vector _menus = Menus::LoadMenu("ui_mp/theater_menu.menu"); + std::vector _menus2 = Menus::LoadMenu("ui_mp/pc_options_multi.menu"); + + for (auto newMenu : _menus) { menus.push_back(newMenu); } + for (auto newMenu : _menus2) { menus.push_back(newMenu); } + } + // Allocate new menu list Game::MenuList* newList = (Game::MenuList*)calloc(1, sizeof(Game::MenuList)); newList->name = _strdup(menuList->name); diff --git a/src/Components/Modules/Party.cpp b/src/Components/Modules/Party.cpp index 00abe503..3e6cb14f 100644 --- a/src/Components/Modules/Party.cpp +++ b/src/Components/Modules/Party.cpp @@ -112,7 +112,7 @@ namespace Components Utils::Hook::Set(0x5A969E, 0xEB); // Patch party_minplayers to 1 and protect it - Utils::Hook(0x4D5D51, Party::RegisterMinPlayers, HOOK_CALL).Install()->Quick(); + //Utils::Hook(0x4D5D51, Party::RegisterMinPlayers, HOOK_CALL).Install()->Quick(); Command::Add("connect", [] (Command::Params params) {