8000 Make minimap respect `drawtype = "airlike"` by Xeno333 · Pull Request #16251 · luanti-org/luanti · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make minimap respect drawtype = "airlike" #16251

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

Merged
merged 4 commits into from
Jun 13, 2025
Merged

Conversation

Xeno333
Copy link
Contributor
@Xeno333 Xeno333 commented Jun 11, 2025

Solves #15403 by making minimap respect drawtype = "airlike".

  • Goal of the PR
    Make minimap treat all airlike nodes as transparent.
  • How does the PR work?
    It checks for draw type rather than content id.
  • Does it resolve any reported issue?
    Yes, Node (mtg firefly) shows as black on minimap #15403
  • Does this relate to a goal in the roadmap?
    Yes its a bug fix.
  • If not a bug fix, why is this PR needed? What usecases does it solve?
    It is a bug fix

To do

Ready for Review.

How to test

Pull, compile, add mtg, place a fire fly at day time and wait for it to hide, and observer that there is no black spot on minimap.

@Xeno333 Xeno333 changed the title Dev 3 Make minimap respect drawtype = "airlike" Jun 11, 2025
@Xeno333 Xeno333 changed the title Make minimap respect drawtype = "airlike" Make minimap respect drawtype = "airlike" Jun 11, 2025
@Xeno333 Xeno333 changed the title Make minimap respect drawtype = "airlike" Make minimap respect drawtype = "airlike" Jun 11, 2025
@sfan5 sfan5 added Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines Bugfix 🐛 PRs that fix a bug labels Jun 11, 2025
Copy link
Collaborator
@sfan5 sfan5 left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Member
@Desour Desour left a comment

Choose a reason for hiding this comment

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

Could consider using minimap clolor alpha == 0 instead.
But this is fine enough, works.

@appgurueu
Copy link
Contributor

Does the following line not need to be updated? If so, why?

if (in_pixel.n.param0 != CONTENT_AIR) {

@Xeno333
Copy link
Contributor Author
Xeno333 commented Jun 12, 2025

Does the following line not need to be updated? If so, why?

No, it does not as MinimapMapblock::getMinimapNodes sets all nodes that aren't found to CONTENT_AIR, thus at the point that MinimapUpdateThread::getMap is called it is CONTENT_AIR if there is no other node found at that (x,z).

@appgurueu
Copy link
Contributor

Alright, makes sense. 👍

@sfan5 sfan5 merged commit 225d2cf into luanti-org:master Jun 13, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix 🐛 PRs that fix a bug Trivial The change is a trivial bug fix, documentation or maintenance change, as per the Git Guidelines >= Two approvals ✅ ✅
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0