Merge remote-tracking branch 'origin/main' into feature/auth-protocol

# Conflicts:
#	src/client/component/dedicated_patches.cpp
#	src/client/game/structs.hpp
#	src/client/game/symbols.hpp
This commit is contained in:
momo5502 2023-04-07 14:30:24 +02:00
commit f88c19bae2
6 changed files with 52 additions and 4 deletions

View File

@ -71,7 +71,7 @@ DataSources.StartMenuGameOptions = ListHelper_SetupDataSource("StartMenuGameOpti
end end
elseif CoD.isZombie then elseif CoD.isZombie then
table.insert(options, {models = {displayText = "MENU_RESUMEGAME_CAPS", action = StartMenuGoBack_ListElement}}) 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}}) table.insert(options, {models = {displayText = "MENU_RESTART_LEVEL_CAPS", action = RestartGame}})
end end
if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) == true then if Engine.IsLobbyHost(Enum.LobbyType.LOBBY_TYPE_GAME) == true then
@ -81,4 +81,4 @@ DataSources.StartMenuGameOptions = ListHelper_SetupDataSource("StartMenuGameOpti
end end
end end
return options return options
end, true) end, true)

View File

@ -423,6 +423,43 @@ end
local MapVote = 0 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 ) CoD.LobbyMenus.MPButtonsOnline = function ( f26_arg0, f26_arg1, f26_arg2 )
if f26_arg2 == 1 then if f26_arg2 == 1 then
AddLargeButton( f26_arg0, f26_arg1, CoD.LobbyButtons.MP_FIND_MATCH ) 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 ) AddLargeButton( f33_arg0, f33_arg1, CoD.LobbyButtons.ZM_BUILD_KITS )
AddSpacer( f33_arg1 ) AddSpacer( f33_arg1 )
AddSmallButton( f33_arg0, f33_arg1, CoD.LobbyButtons.MP_STATS ) AddSmallButton( f33_arg0, f33_arg1, CoD.LobbyButtons.MP_STATS )
Engine.Mods_Lists_UpdateUsermaps()
end end
local targetButtons = { local targetButtons = {

2
deps/curl vendored

@ -1 +1 @@
Subproject commit a13ef31d0fbbf98120b711746bd8802acaba6b0a Subproject commit 356dd0b73a75ed6d56682c818b73145862881989

2
deps/libtommath vendored

@ -1 +1 @@
Subproject commit 53fdf5f9c73cb4fde599dd07e54bac8264f7b236 Subproject commit 3f10a28885601256c8b5261be3b15c926c93393d

View File

@ -115,6 +115,8 @@ namespace bots
struct component final : generic_component struct component final : generic_component
{ {
static_assert(offsetof(game::client_s, bIsTestClient) == 0xBB360);
void post_unpack() override void post_unpack() override
{ {
utils::hook::jump(game::select(0x141653B70, 0x1402732E0), get_bot_name); utils::hook::jump(game::select(0x141653B70, 0x1402732E0), get_bot_name);

View File

@ -13,6 +13,8 @@ namespace script
namespace namespace
{ {
utils::hook::detour db_findxassetheader_hook; utils::hook::detour db_findxassetheader_hook;
utils::hook::detour gscr_get_bgb_remaining_hook;
std::unordered_map<std::string, game::RawFile*> loaded_scripts; std::unordered_map<std::string, game::RawFile*> loaded_scripts;
game::RawFile* get_loaded_script(const std::string& name) game::RawFile* get_loaded_script(const std::string& name)
@ -110,6 +112,11 @@ namespace script
return asset_header; 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 struct component final : generic_component
@ -126,6 +133,7 @@ namespace script
} }
db_findxassetheader_hook.create(game::select(0x141420ED0, 0x1401D5FB0), db_findxassetheader_stub); 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);
} }
}; };
}; };