CV64: Fix the first Waterway 3HB ledge setting the flag of one of the Nitro room item locations. #4277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this fixing or adding?
Breaking the "First poison parkour ledge" 3-hit breakable (3HB) in Underground Waterway when the option to randomize the 3HB items was turned off would cause the flag for the item location known as "Castle Center: Magical Nitro shelf - Heinrich side" to be set, both causing the location check to send out when it wasn't supposed to and the item later not spawning when it should be. When I added the two extra item actors in the Nitro room and put flags on them, I evidently chose to put one of them on a flag that I didn't realize at the time was already being used by something else (for whatever reason I didn't record it on my big list of the game's flags). And because I don't ever bother breaking the 3HBs when they are turned off, it wasn't until someone else recently brought it to my attention that I found out.
This fixes the issue by just always applying the 3HB flag hacks regardless of whether the 3HBs are randomized or not, meaning none of them will set flags upon being broken and each item that drops from them are tracked by their own individual flags. I could change what flag the Nitro room item sets, but that would require changing the AP location ID as well due to how the item flags and location IDs correlate to each other, and changing IDs tends to muck things up when it comes to backwards compatibility, so I didn't think it'd be worth opening that can of worms over this.
How was this tested?
Generated a game with the 3HBs not randomized, broke the "First poison parkour ledge" 3HB and picked up its items to make sure the Nitro shelf location did not send, and then checked on that location to make sure the item spawned correctly.