mirror of
https://github.com/XLabsProject/s1x-client.git
synced 2023-08-02 15:02:12 +02:00
Proper gamemode redirection
Added fix for zombieMode & survival. Made the game inject as lib again. Patched a steambit check for mp
This commit is contained in:
parent
2e22126560
commit
51bcaefa7e
@ -58,6 +58,7 @@ namespace auth
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
utils::hook::jump(0x140538920, 0x140538976);
|
utils::hook::jump(0x140538920, 0x140538976);
|
||||||
|
utils::hook::jump(0x140009801, 0x140009B48);
|
||||||
utils::hook::jump(0x140009AEB, 0x140009B48);
|
utils::hook::jump(0x140009AEB, 0x140009B48);
|
||||||
utils::hook::jump(0x14053995F, 0x1405399A0);
|
utils::hook::jump(0x14053995F, 0x1405399A0);
|
||||||
utils::hook::jump(0x140539E70, 0x140539EB6);
|
utils::hook::jump(0x140539E70, 0x140539EB6);
|
||||||
|
@ -7,7 +7,7 @@ namespace redirect
|
|||||||
{
|
{
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
void launch_complementary_game(const bool singleplayer)
|
void launch_complementary_game(const bool singleplayer, const std::string& mode = "")
|
||||||
{
|
{
|
||||||
const utils::nt::library self;
|
const utils::nt::library self;
|
||||||
|
|
||||||
@ -18,8 +18,9 @@ namespace redirect
|
|||||||
ZeroMemory(&process_info, sizeof(process_info));
|
ZeroMemory(&process_info, sizeof(process_info));
|
||||||
startup_info.cb = sizeof(startup_info);
|
startup_info.cb = sizeof(startup_info);
|
||||||
|
|
||||||
auto* arguments = const_cast<char*>(utils::string::va("%s%s", self.get_path().data(),
|
auto* arguments = const_cast<char*>(utils::string::va("%s%s%s", self.get_path().data(),
|
||||||
(singleplayer ? " -singleplayer" : " -multiplayer")));
|
(singleplayer ? " -singleplayer" : " -multiplayer"),
|
||||||
|
(mode.empty() ? "" : (" +"s + mode).data())));
|
||||||
CreateProcessA(self.get_path().data(), arguments, nullptr, nullptr, false, NULL, nullptr, nullptr,
|
CreateProcessA(self.get_path().data(), arguments, nullptr, nullptr, false, NULL, nullptr, nullptr,
|
||||||
&startup_info, &process_info);
|
&startup_info, &process_info);
|
||||||
|
|
||||||
@ -44,7 +45,15 @@ namespace redirect
|
|||||||
}
|
}
|
||||||
else if (utils::string::starts_with(file, "steam://run/209660/"))
|
else if (utils::string::starts_with(file, "steam://run/209660/"))
|
||||||
{
|
{
|
||||||
launch_complementary_game(false);
|
std::string mode(file);
|
||||||
|
mode.erase(0, 20);
|
||||||
|
if (!mode.empty())
|
||||||
|
{
|
||||||
|
mode = utils::string::replace(mode, "%2b", ""); // '+'
|
||||||
|
mode = utils::string::replace(mode, "%2", " "); // ' '
|
||||||
|
}
|
||||||
|
|
||||||
|
launch_complementary_game(false, mode);
|
||||||
return HINSTANCE(33);
|
return HINSTANCE(33);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#pragma comment(linker, "/stack:0x1000000")
|
#pragma comment(linker, "/stack:0x1000000")
|
||||||
|
|
||||||
#ifdef INJECT_HOST_AS_LIB
|
#ifdef INJECT_HOST_AS_LIB
|
||||||
#pragma comment(linker, "/base:0x150000000")
|
#pragma comment(linker, "/base:0x152000000")
|
||||||
#else
|
#else
|
||||||
#pragma comment(linker, "/base:0x140000000")
|
#pragma comment(linker, "/base:0x140000000")
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define BINARY_PAYLOAD_SIZE 0x15000000
|
#define BINARY_PAYLOAD_SIZE 0x12000000
|
||||||
|
|
||||||
// Decide whether to load the game as lib or to inject it
|
// Decide whether to load the game as lib or to inject it
|
||||||
//#define INJECT_HOST_AS_LIB
|
#define INJECT_HOST_AS_LIB
|
||||||
|
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
#pragma warning(disable: 4100)
|
#pragma warning(disable: 4100)
|
||||||
|
Loading…
Reference in New Issue
Block a user