-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove use of static variable in en_box #3536
Remove use of static variable in en_box #3536
Conversation
@@ -628,7 +627,7 @@ void EnBox_Update(Actor* thisx, PlayState* play) { | |||
} | |||
|
|||
if (((!IS_RANDO && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) || | |||
(IS_RANDO && ABS(sItem.getItemId) == RG_ICE_TRAP)) && | |||
(IS_RANDO && this->getItemEntry.getItemId == RG_ICE_TRAP)) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know why we used to have ABS
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the static sItem
was what was handed off to player, with the getItemId negated (which allows the player to interact with the chest)
Now this just uses the this->getItemEntry
I added later on for Chest Style Matches Contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See
Shipwright/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
Lines 507 to 512 in bb6fef6
// Chests need to have a negative getItemId in order to not immediately give their item | |
// when approaching. | |
if (IS_RANDO) { | |
sItem.getItemId = 0 - sItem.getItemId; | |
sItem.getItemFrom = ITEM_FROM_CHEST; | |
GiveItemEntryFromActorWithFixedRange(&this->dyna.actor, play, sItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you're wondering, we should be able to just replace what's left of sItem
with this->getItemEntry
, but this is all going away anyway so I erred on the side of safety and just left most of it untouched.
ef910a0
into
HarbourMasters:develop-macready
I'm basically removing all of this rando specific code in rando v3, so for now a bandaid that touches the least amount possible.
This was probably the source of #1565
Build Artifacts