FIx anticheat stuff

This commit is contained in:
momo5502 2016-09-20 22:55:40 +02:00
parent 77f38525c4
commit 50dfee6db7
2 changed files with 14 additions and 10 deletions

View File

@ -85,14 +85,14 @@ namespace Components
void Logger::Flush() void Logger::Flush()
{ {
if (!Game::Sys_IsMainThread()) // if (!Game::Sys_IsMainThread())
{ // {
while (!Logger::MessageQueue.empty()) // while (!Logger::MessageQueue.empty())
{ // {
std::this_thread::sleep_for(10ms); // std::this_thread::sleep_for(10ms);
} // }
} // }
else // else
{ {
Logger::Frame(); Logger::Frame();
} }

View File

@ -789,10 +789,12 @@ namespace Components
void Zones::InstallPatches(int version) void Zones::InstallPatches(int version)
{ {
bool patch = (version >= VERSION_ALPHA2);
Zones::ZoneVersion = version;
AssetHandler::ClearRelocations(); AssetHandler::ClearRelocations();
if (Zones::ZoneVersion == version) return;
Zones::ZoneVersion = version;
bool patch = (version >= VERSION_ALPHA2);
if (Zones::ZoneVersion == VERSION_ALPHA2 || Zones::ZoneVersion == VERSION_ALPHA3 || Zones::ZoneVersion == XFILE_VERSION) if (Zones::ZoneVersion == VERSION_ALPHA2 || Zones::ZoneVersion == VERSION_ALPHA3 || Zones::ZoneVersion == XFILE_VERSION)
{ {
Utils::Hook::Set<DWORD>(0x4158F4, version); Utils::Hook::Set<DWORD>(0x4158F4, version);
@ -890,6 +892,8 @@ namespace Components
Zones::Zones() Zones::Zones()
{ {
Zones::ZoneVersion = 0;
// Ignore missing soundaliases for now // Ignore missing soundaliases for now
// TODO: Include them in the dependency zone! // TODO: Include them in the dependency zone!
Utils::Hook::Nop(0x644207, 5); Utils::Hook::Nop(0x644207, 5);