From 2fcce088406cd861394c41a90415b09b458db039 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 13 Jan 2024 11:38:58 +0100 Subject: [PATCH] Remove the `fix_liquid_out_of_bounds` (#49) * Update bug_fixes.cpp * Update bug_fixes.h * Update mod_manager.cpp * Update bug_fixes.cpp * Update playlunky_settings.cpp --- source/playlunky/mod/bug_fixes.cpp | 12 ------------ source/playlunky/mod/bug_fixes.h | 1 - source/playlunky/mod/mod_manager.cpp | 3 --- source/playlunky/playlunky_settings.cpp | 1 - 4 files changed, 17 deletions(-) diff --git a/source/playlunky/mod/bug_fixes.cpp b/source/playlunky/mod/bug_fixes.cpp index 0f0fe5e..76305b2 100644 --- a/source/playlunky/mod/bug_fixes.cpp +++ b/source/playlunky/mod/bug_fixes.cpp @@ -26,8 +26,6 @@ SpelunkyScript* g_ExtraPipesScript{ nullptr }; using GetNeighbouringGridEntityOfSameType = uint32_t(Entity* thorns, float offset_x, float offset_y); GetNeighbouringGridEntityOfSameType* g_GetNeighbouringGridEntityOfSameType{ nullptr }; -bool g_OutOfBoundsLiquids{ false }; - struct PackedResource { PackedResource(LPSTR resource, LPSTR resource_type) @@ -276,18 +274,8 @@ bool BugFixesInit(const PlaylunkySettings& settings, LogError("Could not fix pipes: {}", error); } } - - g_OutOfBoundsLiquids = settings.GetBool("bug_fixes", "out_of_bounds_liquids", true); - return true; } -void BugFixesUpdate() -{ - if (g_OutOfBoundsLiquids) - { - Spelunky_UpdateLiquidOutOfBoundsBugfix(); - } -} void BugFixesCleanup() { DetourTransactionBegin(); diff --git a/source/playlunky/mod/bug_fixes.h b/source/playlunky/mod/bug_fixes.h index f5f9375..8ce8397 100644 --- a/source/playlunky/mod/bug_fixes.h +++ b/source/playlunky/mod/bug_fixes.h @@ -11,5 +11,4 @@ void BugFixesMount(VirtualFilesystem& vfs, bool BugFixesInit(const PlaylunkySettings& settings, const std::filesystem::path& db_folder, const std::filesystem::path& original_data_folder); -void BugFixesUpdate(); void BugFixesCleanup(); diff --git a/source/playlunky/mod/mod_manager.cpp b/source/playlunky/mod/mod_manager.cpp index 46ecf70..b08d34f 100644 --- a/source/playlunky/mod/mod_manager.cpp +++ b/source/playlunky/mod/mod_manager.cpp @@ -1006,9 +1006,6 @@ void ModManager::Update() UpdateShaderHotReload(db_original_folder, "shaders.hlsl", mVfs); } } - - BugFixesUpdate(); - mScriptManager.Update(); } void ModManager::Draw() diff --git a/source/playlunky/playlunky_settings.cpp b/source/playlunky/playlunky_settings.cpp index 10d0ca9..3d83ee6 100644 --- a/source/playlunky/playlunky_settings.cpp +++ b/source/playlunky/playlunky_settings.cpp @@ -115,7 +115,6 @@ void PlaylunkySettings::WriteToFile(std::string settings_file) const KnownSetting{ .Name{ "enable_luminance_scaling" }, .DefaultValue{ "true" }, .Comment{ "Scales luminance of customized images based on the color" } }, } }, KnownCategory{ { "bug_fixes" }, { - KnownSetting{ .Name{ "out_of_bounds_liquids" }, .DefaultValue{ "true" }, .Comment{ "Removes liquids that go out of bounds, otherwise the game would crash" } }, KnownSetting{ .Name{ "missing_thorns" }, .DefaultValue{ "true" }, .Comment{ "Adds textures for the missing jungle thorns configurations" } }, KnownSetting{ .Name{ "missing_pipes" }, .DefaultValue{ "false" }, .Comment{ "May cause issues in multiplayer. Adds textures for the missing sunken city pipes configurations and makes those pipes work, some requiring user input" } }, } },