Merge pull request #218 from Brentdevent/zombie_dedi
Allow clients to connect to dedicated zombie servers
This commit is contained in:
commit
6716c828db
@ -228,14 +228,22 @@ namespace party
|
|||||||
return *reinterpret_cast<game::netadr_t*>(address);
|
return *reinterpret_cast<game::netadr_t*>(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_mp()
|
||||||
|
{
|
||||||
|
return game::Com_SessionMode_GetMode() == game::MODE_MULTIPLAYER;
|
||||||
|
}
|
||||||
|
|
||||||
int should_transfer_stub(uint8_t* storage_file_info)
|
int should_transfer_stub(uint8_t* storage_file_info)
|
||||||
{
|
{
|
||||||
auto should_transfer = game::ShouldTransfer(storage_file_info);
|
auto should_transfer = game::ShouldTransfer(storage_file_info);
|
||||||
|
|
||||||
const auto offset = storage_file_info - reinterpret_cast<uint8_t*>(0x14343CDF0_g);
|
const auto offset = storage_file_info - reinterpret_cast<uint8_t*>(0x14343CDF0_g);
|
||||||
const auto index = offset / 120;
|
const auto index = offset / 120;
|
||||||
|
|
||||||
if (index >= 12 && index <= 15 && is_connecting_to_dedi && get_connected_server() == connect_host)
|
// Choose between multiplayer or zombies indices
|
||||||
|
const auto stats_index = is_mp() ? 12 : 17;
|
||||||
|
const auto loadout_index = is_mp() ? 15 : 20;
|
||||||
|
|
||||||
|
if (index >= stats_index && index <= loadout_index && is_connecting_to_dedi && get_connected_server() == connect_host)
|
||||||
{
|
{
|
||||||
should_transfer = !should_transfer;
|
should_transfer = !should_transfer;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user