Skip to content
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

Different param2 of the bed bottom the top causes crash on dig. #3171

Open
nininik0 opened this issue Jan 2, 2025 · 5 comments · May be fixed by #3173
Open

Different param2 of the bed bottom the top causes crash on dig. #3171

nininik0 opened this issue Jan 2, 2025 · 5 comments · May be fixed by #3173
Labels

Comments

@nininik0
Copy link

nininik0 commented Jan 2, 2025

If you change the param2 of the base of the bed to be very or slightly different from the top, maybe param2 tool or some glitch, when dug or removed in any way(tnt, worldedit remover) it causes a crash where "b" is a nil value.

@appgurueu appgurueu added the Bug label Jan 3, 2025
@SmallJoker
Copy link
Member

Cannot reproduce. Please provide a backtrace and a screenshot before the error.

@sfan5 sfan5 added Unconfirmed bug and removed Bug labels Jan 5, 2025
@SmallJoker SmallJoker linked a pull request Jan 5, 2025 that will close this issue
@nininik0
Copy link
Author

nininik0 commented Jan 5, 2025

Cannot reproduce. Please provide a backtrace and a screenshot before the error.

It has to be some INSANE value like in the 200s maybe 250s, here is some screenshots
Screenshot_20250105-084150_Luanti
Screenshot_20250105-084114_Luanti
Screenshot_20250105-084018_Luanti

@nininik0
Copy link
Author

nininik0 commented Jan 5, 2025

This bug has been plaguing my server since a bad person got a param2 tool and has several crashing beds hidden, so after he got banned he uses a VPN to ban evade xban2 and digs those beds which is very annoying, I already managed to destroy some of the beds by setting their param2 of the top and bottom with worldedit to 0 and then rotating the bottom properly.

@sfan5 sfan5 added Bug and removed Unconfirmed bug labels Jan 5, 2025
@SmallJoker
Copy link
Member

This brings me back to one of my first memories related to Minetest in 0.4.7, where a badly rotated node would cause a client crash on the "Landrush" server which required to download the newer development version, 0.4.7-dev from the forums.

The root cause lies here:
https://github.com/minetest/minetest/blob/f467bde6ac3f906fcb3cf0a7e80b25f4db3beca0/builtin/common/item_s.lua#L75-L94

Only 24 out of the 255 possible values are mapped to a direction. As for the visuals, the engine does use the following calculation:
https://github.com/minetest/minetest/blob/f467bde6ac3f906fcb3cf0a7e80b25f4db3beca0/src/mapnode.cpp#L41-L48

I'll include a fix for this in my other PR.

@appgurueu
Copy link
Contributor

appgurueu commented Jan 6, 2025

since a bad person got a param2 tool

Out of curiosity, how did this happen?

(Also, have you considered registering the param2tool under a new name, so old param2 tools become unusable; additionally, register old param2tools to something that blows up in his face in some funny way 😄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants