Fix map looping

This commit is contained in:
momo5502 2016-09-19 21:16:26 +02:00
parent 39110c9db7
commit aa89132770
4 changed files with 15 additions and 15 deletions

2
deps/protobuf vendored

@ -1 +1 @@
Subproject commit c44ca26fe89ed8a81d3ee475a2ccc1797141dbce
Subproject commit 7b00595ddf8622ae429ef37de8ea2f44b6333ad0

View File

@ -158,7 +158,7 @@ namespace Components
Maps::DependencyList[expression] = zone;
}
bool Maps::IgnoreEntityStub(const char* entity)
int Maps::IgnoreEntityStub(const char* entity)
{
return (Utils::String::StartsWith(entity, "dyn_") || Utils::String::StartsWith(entity, "node_") || Utils::String::StartsWith(entity, "actor_"));
}
@ -223,7 +223,7 @@ namespace Components
Utils::Hook(0x42C2AF, Maps::LoadMapZones, HOOK_CALL).Install()->Quick();
// Ignore SP entities
Utils::Hook(0x5FBD6E, Maps::IgnoreEntityStub, HOOK_CALL).Install()->Quick();
Utils::Hook(0x444810, Maps::IgnoreEntityStub, HOOK_JUMP).Install()->Quick();
Game::ReallocateAssetPool(Game::XAssetType::ASSET_TYPE_GAME_MAP_SP, 1);
Game::ReallocateAssetPool(Game::XAssetType::ASSET_TYPE_IMAGE, 7168);

View File

@ -24,7 +24,7 @@ namespace Components
static void OverrideMapEnts(Game::MapEnts* ents);
static bool IgnoreEntityStub(const char* entity);
static int IgnoreEntityStub(const char* entity);
void ReallocateEntryPool();
};

View File

@ -1077,17 +1077,17 @@ namespace Components
void Zones::InstallPatches(int version)
{
Zones::ZoneVersion = version;
// AssetHandler::ClearRelocations();
//
// if (Zones::ZoneVersion == VERSION_ALPHA2 || Zones::ZoneVersion == VERSION_ALPHA3 || Zones::ZoneVersion == XFILE_VERSION)
// {
// Utils::Hook::Set<DWORD>(0x4158F4, version);
// Utils::Hook::Set<DWORD>(0x4158FB, version);
// }
//
// PatchMW2_FifthInfinityApply(version, version >= 316);
//
// AntiCheat::EmptyHash();
AssetHandler::ClearRelocations();
if (Zones::ZoneVersion == VERSION_ALPHA2 || Zones::ZoneVersion == VERSION_ALPHA3 || Zones::ZoneVersion == XFILE_VERSION)
{
Utils::Hook::Set<DWORD>(0x4158F4, version);
Utils::Hook::Set<DWORD>(0x4158FB, version);
}
PatchMW2_FifthInfinityApply(version, version >= 316);
AntiCheat::EmptyHash();
}
Zones::Zones()