diff --git a/src/client/game/game.cpp b/src/client/game/game.cpp index 0fb8f24a..bcd52d81 100644 --- a/src/client/game/game.cpp +++ b/src/client/game/game.cpp @@ -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 = [] diff --git a/src/client/game/game.hpp b/src/client/game/game.hpp index 2a825538..6c48470f 100644 --- a/src/client/game/game.hpp +++ b/src/client/game/game.hpp @@ -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) { diff --git a/src/client/main.cpp b/src/client/main.cpp index 23b3f708..cd04cf9f 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -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())