Skip to content

Fix edge case with 2024.6+ masks#2034

Merged
colinator27 merged 1 commit intomasterfrom
2024-6-mask-edge-case
Feb 9, 2025
Merged

Fix edge case with 2024.6+ masks#2034
colinator27 merged 1 commit intomasterfrom
2024-6-mask-edge-case

Conversation

@colinator27
Copy link
Copy Markdown
Member

Description

Fixes #2033. However, note that the game for that issue is in 2024.11, so these changes will need to be pulled downstream for this to fully affect that game.

It seems that certain sprites in 2024.6, such as empty sprites, will produce bounding boxes that are inverted, which creates negative collision mask width/height values... This causes weird behavior, with collision masks being generated at strange sizes from negative calculations (the negatives coincidentally cancel each other out, giving a positive mask length).

Caveats

This may break some scripts depending on uint rather than int, but I did a search to fix as many as I could. I also updated UndertaleSprite.NewMaskEntry to take in UndertaleData, so that it can account for 2024.6 as well.

Notes

I also added two FIXMEs for the import graphics scripts that have not yet accounted for 2024.6, but that can come in later PRs.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2025

@colinator27
Copy link
Copy Markdown
Member Author

Going to merge this in now so that downstream PRs (mostly 2024.11) have access to it (and this is pretty small).

@colinator27 colinator27 merged commit 915858a into master Feb 9, 2025
5 checks passed
@colinator27 colinator27 deleted the 2024-6-mask-edge-case branch February 9, 2025 02:07
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.

Unable to open latest beta release of Heartbound

1 participant