Detect steam update
This commit is contained in:
parent
b8505abef1
commit
f825668720
@ -37,6 +37,18 @@ namespace game
|
||||
return server;
|
||||
}
|
||||
|
||||
bool is_client()
|
||||
{
|
||||
static const auto server = get_host_library().get_optional_header()->CheckSum == 0x888C368;
|
||||
return server;
|
||||
}
|
||||
|
||||
bool is_legacy_client()
|
||||
{
|
||||
static const auto server = get_host_library().get_optional_header()->CheckSum == 0x8880704;
|
||||
return server;
|
||||
}
|
||||
|
||||
std::filesystem::path get_appdata_path()
|
||||
{
|
||||
static const auto appdata_path = []
|
||||
|
@ -7,6 +7,8 @@ namespace game
|
||||
{
|
||||
size_t get_base();
|
||||
bool is_server();
|
||||
bool is_client();
|
||||
bool is_legacy_client();
|
||||
|
||||
inline size_t relocate(const size_t val)
|
||||
{
|
||||
|
@ -314,6 +314,16 @@ namespace
|
||||
throw std::runtime_error("Bad binary loaded into memory");
|
||||
}
|
||||
|
||||
if (!is_server && !game::is_legacy_client())
|
||||
{
|
||||
if(game::is_client())
|
||||
{
|
||||
throw std::runtime_error("You are running the latest Steam update. We're working on supporting it. For the time being, however, you have to revert to the old binary.");
|
||||
}
|
||||
|
||||
throw std::runtime_error("Bad binary loaded into memory");
|
||||
}
|
||||
|
||||
patch_imports();
|
||||
|
||||
if (!component_loader::post_load())
|
||||
|
Loading…
Reference in New Issue
Block a user