Merge branch 'develop' into feature/scripting

This commit is contained in:
quaK 2021-03-21 17:58:28 +02:00
commit 90b7884024
23 changed files with 29 additions and 36 deletions

3
.gitmodules vendored
View File

@ -31,8 +31,7 @@
url = https://github.com/discord/discord-rpc.git
[submodule "deps/asmjit"]
path = deps/asmjit
url = https://github.com/Joelrau/asmjit.git
branch = old-state
url = https://github.com/asmjit/asmjit.git
[submodule "deps/WinToast"]
path = deps/WinToast
url = https://github.com/mohabouje/WinToast.git

View File

@ -9,7 +9,7 @@
# S1x: Client
<p align="center">
<img alig src="assets/github/banner.png?raw=true" />
<img src="assets/github/banner.png?raw=true" />
</p>
<br/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

BIN
assets/github/banner.psd Normal file

Binary file not shown.

BIN
assets/icons/s1x-128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

BIN
assets/icons/s1x-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
assets/icons/s1x-256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
assets/icons/s1x-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
assets/icons/s1x-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

BIN
assets/icons/s1x-icon.psd Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 734 KiB

Binary file not shown.

2
deps/asmjit vendored

@ -1 +1 @@
Subproject commit 9cb2b298e1cdcc82cd014302cc19891bdbe4dd2b
Subproject commit e7a728018e5d88ffa477430fa63bdebbf480fb02

View File

@ -56,7 +56,7 @@ namespace fastfiles
return;
}
game::XZoneInfo info;
game::XZoneInfo info{};
info.name = params.get(1);
info.allocFlags = 1;
info.freeFlags = 0;

View File

@ -208,17 +208,6 @@ namespace party
return;
}
if (!game::environment::is_dedi())
{
if(game::SV_Loaded())
{
const auto* args = "Leave";
game::UI_RunMenuScript(0, &args);
}
perform_game_initialization();
}
auto* current_mapname = game::Dvar_FindVar("mapname");
if (current_mapname && utils::string::to_lower(current_mapname->current.string) ==
utils::string::to_lower(mapname) && (game::SV_Loaded() && !game::VirtualLobby_Loaded()))
@ -228,6 +217,17 @@ namespace party
return;
}
if (!game::environment::is_dedi())
{
if (game::SV_Loaded())
{
const auto* args = "Leave";
game::UI_RunMenuScript(0, &args);
}
perform_game_initialization();
}
printf("Starting map: %s\n", mapname.data());
auto* gametype = game::Dvar_FindVar("g_gametype");
@ -249,29 +249,22 @@ namespace party
}
}
void send_disconnect()
void disconnect_stub()
{
if (game::CL_IsCgameInitialized() && !game::VirtualLobby_Loaded())
if (!game::VirtualLobby_Loaded())
{
// CL_ForwardCommandToServer
reinterpret_cast<void (*)(int, const char*)>(0x14020B310)(0, "disconnect");
// CL_WritePacket
reinterpret_cast<void (*)(int)>(0x1402058F0)(0);
if (game::CL_IsCgameInitialized())
{
// CL_ForwardCommandToServer
reinterpret_cast<void (*)(int, const char*)>(0x14020B310)(0, "disconnect");
// CL_WritePacket
reinterpret_cast<void (*)(int)>(0x1402058F0)(0);
}
// CL_Disconnect
reinterpret_cast<void (*)(int)>(0x140209EC0)(0);
}
}
const auto disconnect_stub = utils::hook::assemble([](utils::hook::assembler& a)
{
a.pushad64();
a.call_aligned(send_disconnect);
a.popad64();
a.mov(edx, 1);
a.xor_(ecx, ecx);
a.jmp(0x140209EC0);
});
class component final : public component_interface
{
public:
@ -283,7 +276,7 @@ namespace party
}
// hook disconnect command function
utils::hook::jump(0x14020A010, disconnect_stub, true);
utils::hook::jump(0x14020A010, disconnect_stub);
command::add("map", [](const command::params& argument)
{

View File

@ -56,7 +56,8 @@ namespace system_check
static std::unordered_map<std::string, std::string> sp_zone_hashes =
{
{"patch_common.ff", "4624A974C6C7F8BECD9C343E7951722D8378889AC08ED4F2B22459B171EC553C"},
// Steam doesn't necessarily deliver this file :(
//{"patch_common.ff", "4624A974C6C7F8BECD9C343E7951722D8378889AC08ED4F2B22459B171EC553C"},
{"patch_common_zm_mp.ff", "DA16B546B7233BBC4F48E1E9084B49218CB9271904EA7120A0EB4CB8723C19CF"},
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB