* In mineclone5 a crash was reported to occur when deserialization of
storage returned nil in on_joinplayer. https://git.minetest.land/
MineClone5/MineClone5/commit/96c4fb60d8641b4181edb902ed24dbf173828d09
This commit uses a different, but equally effective fix.
* Remove animation_frame from fire entity state, it is now kept in the
storage table of the parent entity.
* Rename animation_timer in fire entity table to _mcl_animation_timer,
in line with mineclone2 policy on adding custom members to minetest
tables.
* Comment out code that does nothing sensible. Scheduled for deletion
at a later time.
* Make carpets walkable. When a carpet is placed on top of a fence or a
wall, the carpet can be jumped upon, allowing to in effect jump over
fences and walls.
The daylight detector code used get_node_light(), which detects both
natural and artificial light. This patch improves the code to use
get_natural_light(), which was introduced with Minetest 5.4.0.
* Check if node has a definition table before attempting to evaluate its
attributes. By application of De Morgan's law, the compound logic
expression can be rewritten so that the existence of the table is
checked before all following attribute references.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Clarify code flow.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Mobs redo uses `registered_items[]` where clearly the proper table
accessed should be `registered_nodes[]`. Perhaps this magically
works, but it looks nonsensical. Switch to the use the more
sensible `registered_nodes[]` table.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate its
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Check if node has a definition table before attempting to evaluate
attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
and improve readability.
* Reduce redundant `== false` condition check.
This solves a problem were nether portal removal would trigger deep
recursion through node callbacks. For large portals this could result
in stack overflow crashes on LuaJIT. The issue is solved by rewriting
the portal removal to avoid recursion and removing the portal in one
operation using minetest.bulk_set_node.
Changes to mcl_burning.set_on_fire():
* Add logic that only updates the burn time, but skips adding fire
entities to objects that are already burning.
* Condense code a little, remove single use variables.
* Add a comment to a questionable piece of code.
* Add comments to the function.