Merge pull request #104 from Laupetin/fix/codol-dynent-hook-bug

Fix codol dynent patch bug
This commit is contained in:
Dss0 2021-08-04 18:47:38 +02:00 committed by GitHub
commit 830a60c8c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -380,10 +380,10 @@ namespace Components
}
}
bool QuickPatch::IsDynClassnameStub(char* a1)
BOOL QuickPatch::IsDynClassnameStub(char* a1)
{
auto version = Zones::GetEntitiesZoneVersion();
if (version >= VERSION_LATEST_CODO)
{
for (auto i = 0; i < Game::spawnVars->numSpawnVars; i++)
@ -399,13 +399,13 @@ namespace Components
{
// This will prevent spawning of any entity that contains "script_specialops: '1'"
// It removes extra hitboxes / meshes on 461+ CODO multiplayer maps
return true;
return TRUE;
}
}
}
// Passthrough to the game's own IsDynClassname
return Utils::Hook::Call<bool(char*)>(0x444810)(a1);
return Utils::Hook::Call<BOOL(char*)>(0x444810)(a1);
}
QuickPatch::QuickPatch()

View File

@ -47,6 +47,6 @@ namespace Components
static void PlayerCollisionStub();
static Game::dvar_t* g_playerEjection;
static void PlayerEjectionStub();
static bool IsDynClassnameStub(char* a1);
static BOOL IsDynClassnameStub(char* a1);
};
}