* Remove unused code that was commented out. The code tried to find
fire luaentities in the same spot as the newly created fire luaentity.
It may have been intended to optimize getting set on fire multiple
times, but it makes no sense as it does not discriminate between fire
luaentities attached to the object set on fire and those attached to
other objects. The function that this code was in also has a better
way to prevent adding multiple fire luaentities in the first place.
* 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.
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.
* Add update_hud() function.
* Remove the client channels.
* Unglobalize animation_frames variable.
* Fix bug where player state was not stored on shutdown of singleplayer
game.
* Remove superfluous sanity_check() function, this code could easily be
inlined in its only caller.
The parameters for the flames sprite were incorrect, causing the reverse
side of the sprite to appear as an opaque black rectangle. Use the
correct incantation.
The crash occurs if mcl_burning:data is deserialized to nil. The cause of
mcl_burning being set to "return nil" is unknown. Therefore, when it occurs, it
will be logged as warning.
- Use upright_sprite for 3rd person flame display, which is both closer to minecraft and allows for client side texture animation
- Take care of flame HUD in the MineClone2Client