Skip to content

Some location access fixes#5121

Merged
aMannus merged 3 commits intoHarbourMasters:developfrom
serprex:location-access-fixes
Mar 19, 2025
Merged

Some location access fixes#5121
aMannus merged 3 commits intoHarbourMasters:developfrom
serprex:location-access-fixes

Conversation

@serprex
Copy link
Contributor

@serprex serprex commented Mar 16, 2025

Split out a few fixes I've made while working on #5105

Build Artifacts

@serprex serprex force-pushed the location-access-fixes branch from f0543aa to fb04796 Compare March 16, 2025 16:33
serprex added 2 commits March 18, 2025 21:23
Split out a few fixes I've made while working on HarbourMasters#5105
@serprex serprex force-pushed the location-access-fixes branch from fb04796 to 6b8cbbe Compare March 18, 2025 21:23
@serprex serprex requested a review from Malkierian March 18, 2025 23:38
Copy link
Contributor

@Malkierian Malkierian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one other thing I saw is that a CanGetEnemyDrop() function exists in logic.cpp, and my thought was that it would be useful for GS locations, but considering it requires boomerang even for ED_CLOSE for gold skulltulas, I don't think it's finished, so :shipit:

@Pepper0ni
Copy link
Contributor

Pepper0ni commented Mar 19, 2025

CanGetEnemyDrop globally returns true if range is less than or equal to MS jumpslash and you can kill the enemy.

@Malkierian
Copy link
Contributor

Then perhaps those cases should be removed from the gold skulltula flow to avoid confusion. I was looking directly at that rather than what came before XD. Not in this PR, though, probably.

@Pepper0ni
Copy link
Contributor

The enemy kill functions are not in anything close to a final state, I'm not even 100% is I want to handle gold skulls and other drops in the same function, it just doesn't matter until we get proper enemy logic. The logic for the catch-all was to not bother processing cases where the player can just pick the thing up without height or distance issues.

A different style option would be to remove the shortest ranges and add a default to suppress a warning.

Copy link
Contributor

@Pepper0ni Pepper0ni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor things I noticed, though none of them are blocking (maybe the shadow trick should be, but it's basically irrelevant as you need to do a hover to get that far backwards...)

areaTable[RR_SHADOW_TEMPLE_MQ_B2_TO_B3_CORRIDOR] = Region("Shadow Temple MQ B2 to B3 Corridor", "Shadow Temple", {RA_SHADOW_TEMPLE}, NO_DAY_NIGHT_CYCLE, {}, {}, {
//Exits
Entrance(RR_SHADOW_TEMPLE_MQ_FIRST_BEAMOS, []{return logic->HasExplosives() && logic->SmallKeys(RR_SHADOW_TEMPLE, 2);}),
Entrance(RR_SHADOW_TEMPLE_MQ_FIRST_BEAMOS, []{return logic->SmallKeys(RR_SHADOW_TEMPLE, 2);}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch on this wall being 1 way collision, but there's a trick for moving through such walls (RT_VISIBLE_COLLISION).

I tend to forget this trick exists too, so it probably needs adding to a lot more places....

Copy link
Contributor Author

@serprex serprex Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, doors runs into it a lot

Looks like it only applies to couple kak checks. In particular it refers to visible one way collision. But in this case the bombable wall is not visible when facing it from the wrong side

@aMannus aMannus merged commit b7b5949 into HarbourMasters:develop Mar 19, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants