diff --git a/rehlds/build.gradle b/rehlds/build.gradle index 3c4a9fa..7a26462 100644 --- a/rehlds/build.gradle +++ b/rehlds/build.gradle @@ -134,7 +134,9 @@ void setupToolchain(NativeBinarySpec b) { if (!rehldsFixes) { cfg.compilerOptions.floatingPointModel = FloatingPointModel.PRECISE cfg.compilerOptions.enhancedInstructionsSet = EnhancedInstructionsSet.DISABLED - } + } else { + cfg.compilerOptions.args '/Oi', '/GF', '/GR-' + } if (swdsLib) { cfg.linkerOptions.randomizedBaseAddress = false cfg.linkerOptions.baseAddress = '0x4970000' @@ -154,7 +156,7 @@ void setupToolchain(NativeBinarySpec b) { '_unlink': 'unlink', '_vsnprintf': 'vsnprintf', ]) - cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp' + cfg.compilerOptions.args '-Qoption,cpp,--treat_func_as_string_literal_cpp', '-fno-rtti' cfg.projectLibpath(project, '/lib/linux32') cfg.extraLibs 'rt', 'dl', 'm', 'steam_api' } diff --git a/rehlds/engine/pr_edict.cpp b/rehlds/engine/pr_edict.cpp index 12056a2..b7e1f34 100644 --- a/rehlds/engine/pr_edict.cpp +++ b/rehlds/engine/pr_edict.cpp @@ -424,6 +424,25 @@ bool SuckOutClassname(char *szInputStream, edict_t *pEdict) szInputStream = COM_Parse(szInputStream); } +#ifdef REHLDS_FIXES + if (pEdict == g_psv.edicts) + { + kvd.szClassName = NULL; + kvd.szKeyName = "classname"; + kvd.szValue = "worldspawn"; + kvd.fHandled = FALSE; + + gEntityInterface.pfnKeyValue(pEdict, &kvd); + + if (kvd.fHandled == FALSE) + { + Host_Error(__FUNCTION__ ": parse error"); + } + + return true; + } +#endif + // classname not found return false; } diff --git a/rehlds/public/rehlds/common_rehlds.h b/rehlds/public/rehlds/common_rehlds.h index b2cf597..6bd6833 100644 --- a/rehlds/public/rehlds/common_rehlds.h +++ b/rehlds/public/rehlds/common_rehlds.h @@ -29,7 +29,11 @@ #include "const.h" +#ifdef REHLDS_FIXES +#define COM_TOKEN_LEN 2048 +#else #define COM_TOKEN_LEN 1024 +#endif // Don't allow overflow #define SIZEBUF_CHECK_OVERFLOW 0 diff --git a/rehlds/rehlds/hookchains_impl.h b/rehlds/rehlds/hookchains_impl.h index db49c41..30cd24a 100644 --- a/rehlds/rehlds/hookchains_impl.h +++ b/rehlds/rehlds/hookchains_impl.h @@ -28,7 +28,7 @@ #pragma once #include "hookchains.h" -#define MAX_HOOKS_IN_CHAIN 63 +#define MAX_HOOKS_IN_CHAIN 19 // Implementation for chains in modules template