Add Y distance check to business Deku Scrub talk#2552
Open
djevangelia wants to merge 1 commit intoOoTRandomizer:Devfrom
Open
Add Y distance check to business Deku Scrub talk#2552djevangelia wants to merge 1 commit intoOoTRandomizer:Devfrom
djevangelia wants to merge 1 commit intoOoTRandomizer:Devfrom
Conversation
|
If the code doesn't make sense in ASM but makes sense in C, I think you should create a C function for it instead. You're already successfully recompiling the C which isn't necessary for ASM only hacks, so you have already finished the hard part of getting a toolchain setup. Instead of creating a label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ASM fix to add Y distance check to business Deku Scrub talking, which includes selling items. Fixes #2285.
Deku Scrubs have a Y distance check for giving the item, but not for selling it. In MQ Deku Tree player can buy the item from the water (is within XZ distance), but cannot receive it (is outside Y distance), potentially losing the check. This adds Y distance check of 100.0f to talking, which is the same as receiving item.
The float distance checking is 100% a product of disassembly of C code and I cannot explain how it works at all, but it does. I used matching decomp NTSC 1.0 as base, added check, took the disassembly and modified it to fit with jumps.
Testing
Works in Ares 1.47, Project64 3.0.1 and Mupen64plus 2.8. https://www.youtube.com/watch?v=qhhwmbkHhbo
Tested with adult as well.
I have not tested any scrubs beyond MQ Deku Tree and Lost Woods bridge. If the added check somehow would mess with a scrub I'll look into how that could be solved. A scene id check could be added to make this change only apply to the MQ Deku Tree scrub etc.