diff --git a/src/Components/Modules/QuickPatch.cpp b/src/Components/Modules/QuickPatch.cpp index 73af2b27..be4b5a37 100644 --- a/src/Components/Modules/QuickPatch.cpp +++ b/src/Components/Modules/QuickPatch.cpp @@ -390,20 +390,24 @@ namespace Components bool QuickPatch::IsDynClassnameStub(char* a1) { - for (auto i = 0; i < Game::spawnVars->numSpawnVars; i++) - { - char** kvPair = Game::spawnVars->spawnVars[i]; - auto key = kvPair[0]; - auto val = kvPair[1]; + auto version = Zones::GetEntitiesZoneVersion(); - bool isSpecOps = strncmp(key, "script_specialops", 17) == 0; - bool isSpecOpsOnly = val[0] == '1' && val[1] == '\0'; - - if (isSpecOps && isSpecOpsOnly) + if (version >= VERSION_LATEST_CODO) { + for (auto i = 0; i < Game::spawnVars->numSpawnVars; i++) { - // This will prevent spawning of any entity that contains "script_specialops: '1'" - // It removes extra hitboxes / meshes on 461+ CODO multiplayer maps - return true; + char** kvPair = Game::spawnVars->spawnVars[i]; + auto key = kvPair[0]; + auto val = kvPair[1]; + + bool isSpecOps = strncmp(key, "script_specialops", 17) == 0; + bool isSpecOpsOnly = val[0] == '1' && val[1] == '\0'; + + if (isSpecOps && isSpecOpsOnly) + { + // This will prevent spawning of any entity that contains "script_specialops: '1'" + // It removes extra hitboxes / meshes on 461+ CODO multiplayer maps + return true; + } } } diff --git a/src/Components/Modules/Zones.cpp b/src/Components/Modules/Zones.cpp index d72d4b45..30572989 100644 --- a/src/Components/Modules/Zones.cpp +++ b/src/Components/Modules/Zones.cpp @@ -4,6 +4,7 @@ namespace Components { int Zones::ZoneVersion; + int Zones::EntitiesVersion; int Zones::FxEffectIndex; char* Zones::FxEffectStrings[64]; @@ -2561,6 +2562,8 @@ namespace Components int Zones::LoadMapEnts(bool atStreamStart, Game::MapEnts* buffer, int size) { + EntitiesVersion = Zones::Version(); + if (Zones::Version() >= 446) { size /= 44; diff --git a/src/Components/Modules/Zones.hpp b/src/Components/Modules/Zones.hpp index a869b1c0..dd1b5df6 100644 --- a/src/Components/Modules/Zones.hpp +++ b/src/Components/Modules/Zones.hpp @@ -24,10 +24,13 @@ namespace Components static int Version() { return Zones::ZoneVersion; }; + static int GetEntitiesZoneVersion() { return Zones::EntitiesVersion; }; + private: static int ZoneVersion; - + static int EntitiesVersion; + static int FxEffectIndex; static char* FxEffectStrings[64];