diff --git a/data/ui_scripts/party/__init__.lua b/data/ui_scripts/party/__init__.lua index b51b1fc0..741d9378 100644 --- a/data/ui_scripts/party/__init__.lua +++ b/data/ui_scripts/party/__init__.lua @@ -71,7 +71,7 @@ DataSources.StartMenuGameOptions = ListHelper_SetupDataSource("StartMenuGameOpti end elseif CoD.isZombie then table.insert(options, {models = {displayText = "MENU_RESUMEGAME_CAPS", action = StartMenuGoBack_ListElement}}) - if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) and (not not (Engine.SessionModeIsMode(CoD.SESSIONMODE_SYSTEMLINK) == true) or Engine.SessionModeIsMode(CoD.SESSIONMODE_OFFLINE) == true) then + if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) and (not Engine.SessionModeIsMode(CoD.SESSIONMODE_SYSTEMLINK) or Engine.SessionModeIsMode(CoD.SESSIONMODE_OFFLINE)) then table.insert(options, {models = {displayText = "MENU_RESTART_LEVEL_CAPS", action = RestartGame}}) end if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) == true then @@ -81,4 +81,4 @@ DataSources.StartMenuGameOptions = ListHelper_SetupDataSource("StartMenuGameOpti end end return options -end, true) \ No newline at end of file +end, true) diff --git a/data/ui_scripts/stats/__init__.lua b/data/ui_scripts/stats/__init__.lua index a20f2ea3..f861651d 100644 --- a/data/ui_scripts/stats/__init__.lua +++ b/data/ui_scripts/stats/__init__.lua @@ -423,6 +423,43 @@ end local MapVote = 0 +CoD.LobbyMenus.MPButtonsLAN = function( arg0, arg1, arg2 ) + if IsStarterPack() then + AddSmallButton( arg0, arg1, CoD.LobbyButtons.QUIT ) + return + end + if arg2 == 1 then + AddSmallButton( arg0, arg1, CoD.LobbyButtons.MP_CUSTOM_START_GAME ) + AddSmallButton( arg0, arg1, CoD.LobbyButtons.MP_CUSTOM_SETUP_GAME ) + AddSpacer( arg1 ) + end + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_CAC ) + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_SPECIALISTS ) + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_SCORESTREAKS ) + AddSpacer( arg1 ) + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_CODCASTER_SETTINGS ) + if Engine.DvarBool( nil, "inventory_test_button_visible" ) then + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_INVENTORY_TEST ) + end + Engine.Mods_Lists_UpdateUsermaps() +end + +CoD.LobbyMenus.MPButtonsMain = function ( arg0, arg1, arg2 ) + if arg2 == 1 then + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_PUBLIC_MATCH ) + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_ARENA ) + AddLargeButton( arg0, arg1, CoD.LobbyButtons.MP_CUSTOM_GAMES ) + AddLargeButton( arg0, arg1, CoD.LobbyButtons.THEATER_MP ) + end + AddSpacer( arg1 ) + if CoD.isPC then + AddLargeButton( arg0, arg1, CoD.LobbyButtons.STEAM_STORE ) + else + AddLargeButton( arg0, arg1, CoD.LobbyButtons.STORE ) + end + Engine.Mods_Lists_UpdateUsermaps() +end + CoD.LobbyMenus.MPButtonsOnline = function ( f26_arg0, f26_arg1, f26_arg2 ) if f26_arg2 == 1 then AddLargeButton( f26_arg0, f26_arg1, CoD.LobbyButtons.MP_FIND_MATCH ) @@ -510,6 +547,7 @@ CoD.LobbyMenus.ZMButtonsOnline = function ( f33_arg0, f33_arg1, f33_arg2 ) AddLargeButton( f33_arg0, f33_arg1, CoD.LobbyButtons.ZM_BUILD_KITS ) AddSpacer( f33_arg1 ) AddSmallButton( f33_arg0, f33_arg1, CoD.LobbyButtons.MP_STATS ) + Engine.Mods_Lists_UpdateUsermaps() end local targetButtons = { diff --git a/deps/curl b/deps/curl index a13ef31d..356dd0b7 160000 --- a/deps/curl +++ b/deps/curl @@ -1 +1 @@ -Subproject commit a13ef31d0fbbf98120b711746bd8802acaba6b0a +Subproject commit 356dd0b73a75ed6d56682c818b73145862881989 diff --git a/deps/libtommath b/deps/libtommath index 53fdf5f9..3f10a288 160000 --- a/deps/libtommath +++ b/deps/libtommath @@ -1 +1 @@ -Subproject commit 53fdf5f9c73cb4fde599dd07e54bac8264f7b236 +Subproject commit 3f10a28885601256c8b5261be3b15c926c93393d diff --git a/src/client/component/bots.cpp b/src/client/component/bots.cpp index 2f334f62..0d06afd0 100644 --- a/src/client/component/bots.cpp +++ b/src/client/component/bots.cpp @@ -115,6 +115,8 @@ namespace bots struct component final : generic_component { + static_assert(offsetof(game::client_s, bIsTestClient) == 0xBB360); + void post_unpack() override { utils::hook::jump(game::select(0x141653B70, 0x1402732E0), get_bot_name); diff --git a/src/client/component/script.cpp b/src/client/component/script.cpp index f840f406..4a9e3eb6 100644 --- a/src/client/component/script.cpp +++ b/src/client/component/script.cpp @@ -13,6 +13,8 @@ namespace script namespace { utils::hook::detour db_findxassetheader_hook; + utils::hook::detour gscr_get_bgb_remaining_hook; + std::unordered_map loaded_scripts; game::RawFile* get_loaded_script(const std::string& name) @@ -110,6 +112,11 @@ namespace script return asset_header; } + + void gscr_get_bgb_remaining_stub(game::scriptInstance_t inst, void* entref) + { + game::Scr_AddInt(game::SCRIPTINSTANCE_SERVER, 255); + } } struct component final : generic_component @@ -126,6 +133,7 @@ namespace script } db_findxassetheader_hook.create(game::select(0x141420ED0, 0x1401D5FB0), db_findxassetheader_stub); + gscr_get_bgb_remaining_hook.create(game::select(0x141A8CAB0, 0x1402D2310), gscr_get_bgb_remaining_stub); } }; };