Added 'Fix enemies not spawning near water' checkbox to Fixes (#3179)

This commit is contained in:
Andrew Van Caem 2023-10-31 02:55:02 +11:00 committed by GitHub
parent e4cfc8852d
commit dab070a8a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -216,6 +216,7 @@ const std::vector<const char*> enhancementsCvars = {
"gBowReticle",
"gFixTexturesOOB",
"gIvanCoopModeEnabled",
"gEnemySpawnsOverWaterboxes",
};
const std::vector<const char*> cheatCvars = {
@ -523,6 +524,8 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
PRESET_ENTRY_S32("gNaviTextFix", 1),
// Extend Silver Rupee Jingle
PRESET_ENTRY_S32("gSilverRupeeJingleExtend", 1),
// Fix enemies not spawning on ground over water
PRESET_ENTRY_S32("gEnemySpawnsOverWaterboxes", 1),
// Red Ganon blood
PRESET_ENTRY_S32("gRedGanonBlood", 1),

View File

@ -1042,6 +1042,9 @@ void DrawEnhancementsMenu() {
UIWidgets::PaddedEnhancementCheckbox("Fix Poacher's Saw Softlock", "gFixSawSoftlock", true, false, CVarGetInteger("gSkipText", 0),
"This is disabled because it is forced on when Skip Text is enabled.", UIWidgets::CheckboxGraphics::Checkmark);
UIWidgets::Tooltip("Prevents the Poacher's Saw softlock from mashing through the text, or with Skip Text enabled.");
UIWidgets::PaddedEnhancementCheckbox("Fix enemies not spawning near water", "gEnemySpawnsOverWaterboxes", true, false);
UIWidgets::Tooltip("Causes respawning enemies, like stalchildren, to appear on land near bodies of water. "
"Fixes an incorrect calculation that acted like water underneath ground was above it.");
UIWidgets::PaddedEnhancementCheckbox("Fix Bush Item Drops", "gBushDropFix", true, false);
UIWidgets::Tooltip("Fixes the bushes to drop items correctly rather than spawning undefined items.");

View File

@ -278,7 +278,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
break;
}
if ((player->actor.yDistToWater != BGCHECK_Y_MIN) &&
(floorY < (player->actor.world.pos.y - player->actor.yDistToWater))) {
(floorY < (player->actor.world.pos.y + player->actor.yDistToWater*(CVarGetInteger("gEnemySpawnsOverWaterboxes", 0) ? 1 : -1)))) {
break;
}
spawnPos.y = floorY;