joe7575 / signs_bot

A Minetest robot controlled by signs
GNU General Public License v3.0
5 stars 7 forks source link

Fix to fall_down #45

Closed Eternal-Study closed 2 months ago

Eternal-Study commented 2 months ago

Addresses issue #44 .

Due to minetest.line_of_sight returning the coordinates of the first solid node it intercepts, the bot will end its fall inside the solid node. By raising the y value of pos3 by 1, this cause the bot to land on top of the solid node.

It also extends the maximum range the bot will drop by one so it matches the 10 node drop in the documentation. (x-1)-(x-10) = 9, while (x-1)-(x-11) = 10.

To Do

Testing already performed by contributor by following steps outlined in the issue to confirm pull request works, and does not result in undesired behavior. Recommend additional testing by 2nd party to confirm results.

I release this code under the terms of GPL v3, and transfer copyright to Joachim Stolberg.

Eternal-Study commented 2 months ago

Re-rote PR as described in Issue #44. Now uses loop to check nodes for "walkable" property. See comments for details.

To Do

Testing already performed by contributor by following steps outlined in the issue to confirm pull request works, and does not result in undesired behavior. Performed additional testing by placing signs along drop, and rails on the ground. Also tested with bot dropping into water and lava.

Recommend additional testing by 2nd party to confirm results.

The code may benefit from updates to simply the code, to bring it into the standards and good practices for Minetest and Techage coding, and/or other purposes.

I release this code under the terms of GPL v3, and transfer copyright to Joachim Stolberg.

joe7575 commented 2 months ago

Very good work, thanks

Eternal-Study commented 2 months ago

No problem, and I appreciate the positive feedback. :-)