Fix codol dynentity patch not respecting that the return type should be BOOL so 32bit instead of bool 8bit

This commit is contained in:
Jan 2021-08-03 21:36:57 +02:00
parent a52f2e9f32
commit 99b5da72f6
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(); auto version = Zones::GetEntitiesZoneVersion();
if (version >= VERSION_LATEST_CODO) if (version >= VERSION_LATEST_CODO)
{ {
for (auto i = 0; i < Game::spawnVars->numSpawnVars; i++) 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'" // This will prevent spawning of any entity that contains "script_specialops: '1'"
// It removes extra hitboxes / meshes on 461+ CODO multiplayer maps // It removes extra hitboxes / meshes on 461+ CODO multiplayer maps
return true; return TRUE;
} }
} }
} }
// Passthrough to the game's own IsDynClassname // 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() QuickPatch::QuickPatch()

View File

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