From 99b5da72f6c6ef0b0bbdd5adc862561700ca4bd5 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 3 Aug 2021 21:36:57 +0200 Subject: [PATCH] Fix codol dynentity patch not respecting that the return type should be BOOL so 32bit instead of bool 8bit --- src/Components/Modules/QuickPatch.cpp | 8 ++++---- src/Components/Modules/QuickPatch.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 1e0be026..de545962 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -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(0x444810)(a1); + return Utils::Hook::Call(0x444810)(a1); } QuickPatch::QuickPatch() diff --git a/src/Components/Modules/QuickPatch.hpp b/src/Components/Modules/QuickPatch.hpp index 1b0c979b..7345b994 100644 --- a/src/Components/Modules/QuickPatch.hpp +++ b/src/Components/Modules/QuickPatch.hpp @@ -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); }; }