diff --git a/src/Components/Modules/Zones.cpp b/src/Components/Modules/Zones.cpp index 06034a3f..2c87ae26 100644 --- a/src/Components/Modules/Zones.cpp +++ b/src/Components/Modules/Zones.cpp @@ -8,6 +8,39 @@ namespace Components int Zones::FxEffectIndex; char* Zones::FxEffectStrings[64]; + static std::unordered_map shellshock_replace_list = { + { "66","bg_shock_screenType" }, + { "67","bg_shock_screenBlurBlendTime"}, + { "68","bg_shock_screenBlurBlendFadeTime"}, + { "69","bg_shock_screenFlashWhiteFadeTime"}, + { "70","bg_shock_screenFlashShotFadeTime"}, + { "71","bg_shock_viewKickPeriod"}, + { "72","bg_shock_viewKickRadius"}, + { "73","bg_shock_viewKickFadeTime"}, + { "78","bg_shock_sound"}, + { "74","bg_shock_soundLoop"}, + { "75","bg_shock_soundLoopSilent"}, + { "76","bg_shock_soundEnd"}, + { "77","bg_shock_soundEndAbort"}, + { "79","bg_shock_soundFadeInTime"}, + { "80","bg_shock_soundFadeOutTime"}, + { "81","bg_shock_soundLoopFadeTime"}, + { "82","bg_shock_soundLoopEndDelay"}, + { "83","bg_shock_soundRoomType"}, + { "84","bg_shock_soundDryLevel"}, + { "85","bg_shock_soundWetLevel"}, + { "86","bg_shock_soundModEndDelay"}, + + // guessed, not sure + { "87","bg_shock_lookControl"}, + { "88","bg_shock_lookControl_maxpitchspeed"}, + { "89","bg_shock_lookControl_maxyawspeed"}, + { "90","bg_shock_lookControl_mousesensitivityscale"}, + { "91","bg_shock_lookControl_fadeTime"}, + { "92","bg_shock_movement"} + }; + + Game::XAssetType currentAssetType = Game::XAssetType::ASSET_TYPE_INVALID; Game::XAssetType previousAssetType = Game::XAssetType::ASSET_TYPE_INVALID; @@ -3446,6 +3479,19 @@ namespace Components Game::DB_PopStreamPos(); } + char* Zones::ParseShellShock_Stub(const char** data_p) + { + auto token = Game::Com_Parse(data_p); + if (Zones::Version() >= VERSION_LATEST_CODO) { + if (shellshock_replace_list.find(token) != shellshock_replace_list.end()) + { + return shellshock_replace_list[token].data(); + } + } + return token; + } + + Zones::Zones() { Zones::ZoneVersion = 0; diff --git a/src/Components/Modules/Zones.hpp b/src/Components/Modules/Zones.hpp index c38f4400..3204c32d 100644 --- a/src/Components/Modules/Zones.hpp +++ b/src/Components/Modules/Zones.hpp @@ -3,6 +3,7 @@ #define VERSION_ALPHA2 316 #define VERSION_ALPHA3 318//319 #define VERSION_ALPHA3_DEC 319 +#define VERSION_LATEST_CODO 461 namespace Components { @@ -101,5 +102,6 @@ namespace Components static void LoadTracerDef(bool atStreamStart, Game::TracerDef* tracer, int size); static void LoadTracerDefFxEffect(); static void FixImageCategory(Game::GfxImage* image); + static char* ParseShellShock_Stub(const char** data_p); }; }