maint: remove spooky references
This commit is contained in:
@ -153,7 +153,7 @@ namespace Components
|
||||
CoTaskMemFree(path);
|
||||
});
|
||||
|
||||
return std::filesystem::path(path) / "xlabs";
|
||||
return std::filesystem::path(path);
|
||||
}
|
||||
|
||||
std::vector<std::string> FileSystem::GetFileList(const std::string& path, const std::string& extension)
|
||||
@ -376,7 +376,7 @@ namespace Components
|
||||
// Handle IWD freeing
|
||||
Utils::Hook(0x642F60, IwdFreeStub, HOOK_CALL).install()->quick();
|
||||
|
||||
// Set the working dir based on info from the Xlabs launcher
|
||||
// Set the working dir based on info from the AlterWare launcher
|
||||
Utils::Hook(0x4326E0, Sys_DefaultInstallPath_Hk, HOOK_JUMP).install()->quick();
|
||||
}
|
||||
|
||||
|
@ -767,16 +767,7 @@ namespace Components
|
||||
|
||||
UIScript::Add("downloadDLC", []([[maybe_unused]] const UIScript::Token& token, [[maybe_unused]] const Game::uiInfo_s* info)
|
||||
{
|
||||
int dlc = token.get<int>();
|
||||
|
||||
for (const auto& pack : Maps::DlcPacks)
|
||||
{
|
||||
if (pack.index == dlc)
|
||||
{
|
||||
ShellExecuteW(0, 0, L"https://xlabs.dev/support_iw4x_client.html", 0, 0, SW_SHOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
const auto dlc = token.get<int>();
|
||||
|
||||
Game::ShowMessageBox(Utils::String::VA("DLC %d does not exist!", dlc), "ERROR");
|
||||
});
|
||||
|
@ -245,10 +245,10 @@ namespace Components
|
||||
}
|
||||
|
||||
auto workingDir = std::filesystem::current_path().string();
|
||||
auto binary = FileSystem::GetAppdataPath() / "data" / "iw4x" / *Game::sys_exitCmdLine;
|
||||
const std::string binary = *Game::sys_exitCmdLine;
|
||||
|
||||
SetEnvironmentVariableA("XLABS_MW2_INSTALL", workingDir.data());
|
||||
Utils::Library::LaunchProcess(binary.string(), "-singleplayer", workingDir);
|
||||
SetEnvironmentVariableA("MW2_INSTALL", workingDir.data());
|
||||
Utils::Library::LaunchProcess(binary, "-singleplayer", workingDir);
|
||||
}
|
||||
|
||||
__declspec(naked) void QuickPatch::SND_GetAliasOffset_Stub()
|
||||
@ -320,7 +320,7 @@ namespace Components
|
||||
|
||||
Utils::Hook::Set<void(*)(Game::XAssetHeader, void*)>(0x51FCDD, QuickPatch::R_AddImageToList_Hk);
|
||||
|
||||
Utils::Hook::Set<const char*>(0x41DB8C, "iw4x-sp.exe");
|
||||
Utils::Hook::Set<const char*>(0x41DB8C, "iw4-sp.exe");
|
||||
Utils::Hook(0x4D6989, QuickPatch::Sys_SpawnQuitProcess_Hk, HOOK_CALL).install()->quick();
|
||||
|
||||
// Fix crash as nullptr goes unchecked
|
||||
|
Reference in New Issue
Block a user