Commit Graph

24 Commits

Author SHA1 Message Date
kabou 1b99b73894 Fix wrong player name accessor.
* Duh..
2022-03-30 01:31:38 +02:00
kabou 14da059ce7 Add extra check and warning on missing player data.
* For some unexplained reason, `mcl_burning.storage[player]` can
  sometimes be `nil`, causing a crash in `on_leaveplayer()`.  This
  commit adds a check for that.  If a `nil` is encountered, a sane
  value is substituted and a warning is set to the log.
2022-03-29 12:06:00 +02:00
kabou 90311da514 Preempt possible crash on nil in on_joinplayer.
* 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.
2022-03-18 11:36:33 +01:00
kabou e9ff2ba32a Minor changes to mcl_burning.
* 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.
2022-03-18 11:36:23 +01:00
kabou c3e0996902 Fix fire HUD not showing on join while burning.
* Add the fire HUD to a player who joins the server while still burning
  from the previous session.
2022-03-02 17:15:05 +01:00
kabou b17776699e Add comments to "storage" table.
* Document attributes of the "storage" table.
2022-03-02 15:40:29 +01:00
kabou 86a4ece7d2 Add local copy of minetest.find_nodes_in_area. 2022-03-02 15:25:03 +01:00
kabou df5d24104d Make player burning HUD work without csm.
* 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.
2022-03-02 15:21:55 +01:00
kabou 56b63463a5 Fix burning entity animation.
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.
2022-03-02 10:47:46 +01:00
iliekprogrammar 96c4fb60d8
Fix crash on startup during immediate runtime by mcl_burning
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.
2021-11-13 10:55:24 +08:00
Elias Fleckenstein 27e4bd6d09 Fix burning entity packet spam
- 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
2021-09-18 22:28:20 +02:00
AFCMS cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS ad16fe7072 [mcl_burning] fix warnings 2021-05-25 00:48:46 +02:00
Elias Fleckenstein fb60bd0253 Disable backface culling of fire entity 2021-05-21 20:45:53 +02:00
Elias Fleckenstein 9eba2add3f Rewrite burning API 2021-04-25 13:09:20 +02:00
Elias Fleckenstein a03e7f6f3a Re-enable player ignition from lava 2021-04-23 13:46:20 +02:00
Elias Fleckenstein bd3c08d367 Improve mcl_burning player performance 2021-04-16 19:50:56 +02:00
AFCMS 5d17a6b699 fix SO MANY pairs/ipairs 2021-03-16 17:35:46 +01:00
Elias Fleckenstein 5de9d90569 Simplify mcl_burning API 2021-02-22 10:55:14 +01:00
Elias Fleckenstein b338d36d63 Remove the /burn command 2021-01-12 09:19:18 +00:00
Elias Fleckenstein 071ba77bb0 mcl_burning fully working 2021-01-01 19:25:47 +01:00
Elias Fleckenstein a6eed5c5b3 Rework system 2020-12-29 22:08:38 +01:00
Elias Fleckenstein 758a3470f3 Fire resistance potion working 2020-12-24 17:55:33 +01:00
Elias Fleckenstein 7545e29f58 Burning objects 2020-12-24 17:48:40 +01:00