Another zones::version specific to the map
This commit is contained in:
parent
9de63a3772
commit
2dd703c037
@ -390,20 +390,24 @@ namespace Components
|
|||||||
|
|
||||||
bool QuickPatch::IsDynClassnameStub(char* a1)
|
bool QuickPatch::IsDynClassnameStub(char* a1)
|
||||||
{
|
{
|
||||||
for (auto i = 0; i < Game::spawnVars->numSpawnVars; i++)
|
auto version = Zones::GetEntitiesZoneVersion();
|
||||||
{
|
|
||||||
char** kvPair = Game::spawnVars->spawnVars[i];
|
|
||||||
auto key = kvPair[0];
|
|
||||||
auto val = kvPair[1];
|
|
||||||
|
|
||||||
bool isSpecOps = strncmp(key, "script_specialops", 17) == 0;
|
if (version >= VERSION_LATEST_CODO) {
|
||||||
bool isSpecOpsOnly = val[0] == '1' && val[1] == '\0';
|
for (auto i = 0; i < Game::spawnVars->numSpawnVars; i++)
|
||||||
|
|
||||||
if (isSpecOps && isSpecOpsOnly)
|
|
||||||
{
|
{
|
||||||
// This will prevent spawning of any entity that contains "script_specialops: '1'"
|
char** kvPair = Game::spawnVars->spawnVars[i];
|
||||||
// It removes extra hitboxes / meshes on 461+ CODO multiplayer maps
|
auto key = kvPair[0];
|
||||||
return true;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
int Zones::ZoneVersion;
|
int Zones::ZoneVersion;
|
||||||
|
int Zones::EntitiesVersion;
|
||||||
|
|
||||||
int Zones::FxEffectIndex;
|
int Zones::FxEffectIndex;
|
||||||
char* Zones::FxEffectStrings[64];
|
char* Zones::FxEffectStrings[64];
|
||||||
@ -2561,6 +2562,8 @@ namespace Components
|
|||||||
|
|
||||||
int Zones::LoadMapEnts(bool atStreamStart, Game::MapEnts* buffer, int size)
|
int Zones::LoadMapEnts(bool atStreamStart, Game::MapEnts* buffer, int size)
|
||||||
{
|
{
|
||||||
|
EntitiesVersion = Zones::Version();
|
||||||
|
|
||||||
if (Zones::Version() >= 446)
|
if (Zones::Version() >= 446)
|
||||||
{
|
{
|
||||||
size /= 44;
|
size /= 44;
|
||||||
|
@ -24,10 +24,13 @@ namespace Components
|
|||||||
|
|
||||||
static int Version() { return Zones::ZoneVersion; };
|
static int Version() { return Zones::ZoneVersion; };
|
||||||
|
|
||||||
|
static int GetEntitiesZoneVersion() { return Zones::EntitiesVersion; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static int ZoneVersion;
|
static int ZoneVersion;
|
||||||
|
static int EntitiesVersion;
|
||||||
|
|
||||||
static int FxEffectIndex;
|
static int FxEffectIndex;
|
||||||
static char* FxEffectStrings[64];
|
static char* FxEffectStrings[64];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user