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

Exception when holding bag and closing door, bag disappears. #2

Open
scrain777 opened this issue May 24, 2020 · 1 comment
Open

Exception when holding bag and closing door, bag disappears. #2

scrain777 opened this issue May 24, 2020 · 1 comment

Comments

@scrain777
Copy link

Using version 1.0, with server hosted on Windows 10. To replicate, hold a bag in your hand. Attempt to close a door. Expected behavior is that the door closes. Acceptable behavior would be to place the bag in front of the door. Actual behavior is that the bag disappears forever, with its contents lost. Server logs:
2020-05-23 20:00:31: ACTION[Server]: player [name] (id=[id], hp=20) punched LuaEntitySAO at (408,31,483) (id=1125, hp=4), damage=0
2020-05-23 20:00:56: ERROR[Server]: [mobs] bad velocity in nil
Code should include exception handling to ensure bag is not lost.

@scrain777
Copy link
Author

I did some further investigation. The open door is typically in a solid wall, and the placement code selects a location forward of the open door, which is inside the wall. Then a bug in minetest (minetest/minetest#4759) makes it appear that the bag was placed when it was not.

Relevant code:

   local obj = minetest.env:add_entity(pos, "prestibags:bag_entity")
   if not obj then return stack end

The add_entity returns a reference even though the bag was not added.

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

No branches or pull requests

1 participant