Commit Graph

99 Commits

Author SHA1 Message Date
cora f5ba6f5649
Fix memory leak & C stack overflow
Before this patch, when placing a fire above a node that would turn it
into eternal fire (e.g. Netherrack or Magma) the spawn_fire() function
would call itself infinitely via the on_construct() handler of eternal
fire – because the latter called spawn_fire() itself.

On an x86 machine, this caused a memory leak, hanging Minetest. On an
x86_64 machine though, Minetest crashed immediately, showing an error
message about a stack overflow.
2022-02-11 17:44:11 +01:00
cora 4647710945
Extinguish fire without nearby “fuel” faster
This patch adjusts how often the ABM runs that removes fire nodes with
no adjacent nodes that can burn up. This makes fire linger less in air.
2022-02-11 17:44:10 +01:00
cora 5d09ec311c
Extinguish fire using an ABM instead of timers
Even the mitigated timers seem to have lead to slow
memory leaks. Once Minetest has used up all the RAM,
it will free some, then quickly use memory up again,
then repeat it ad nauseum, requiring 100% CPU. On a
PC with 2GB of RAM this could be reliably triggered
by having a fire burn a forest for 20 to 30 minutes.

This patch removes fire node timers completely and
instead extinguishes fire using an ABM.
2022-02-11 17:44:09 +01:00
cora ef7370550f
Make fire spread direction truly random
This patch initializes the random number generator used in mcl_fire with
the current Unix timestamp. It also corrects two biases in fire spread
that were caused by nodes being iterated over in a predictable way.
2022-02-11 17:41:42 +01:00
cora 6c2fb98160
Fix nodes with “flammable = -1” not catching fire 2022-02-07 04:51:27 +01:00
cora 052c9fcbcf
Fix diagonal fire-spread
In Minecraft fire spread logic, “adjacent” does not mean “diagonal”.
2022-02-07 04:51:06 +01:00
cora 1b89c15193
Fix double nodes not being properly removed 2022-02-07 03:39:51 +01:00
cora 02fa2c9e07
Fix nodes that should not burn up burning up
Nodes with the group “flammable = -1” (e.g. crafting tables) must be
able to catch fire, but must not burn up. This patch adds checks for
this group.
2022-02-07 03:39:51 +01:00
cora c12076e74d
Reimplement basic Minecraft-like fire spread 2022-02-07 03:39:45 +01:00
cora 4deca628dc
Make fire actually remove nodes 2022-02-07 03:22:15 +01:00
cora df4ea94dbc
Add node timer back in so fires burn out 2022-02-07 03:22:02 +01:00
cora 8e8ccddb68
Replace MineClone2 fire with Minetest Game ABMs
ABMs have better performance than the laggy timer-based implementation.
2022-02-07 03:18:54 +01:00
Elias Åström 5d3514880a Move data from deprecated files to mod.conf
Move data from deprecated files (depends.txt and description.txt) into
fields in mod.conf for all mods.
2021-05-16 13:44:04 +02:00
MysticTempest 689e6edac2 Make 'mcl_burning' support other texture packs. 2021-01-22 03:07:21 -06:00
Elias Fleckenstein 071ba77bb0 mcl_burning fully working 2021-01-01 19:25:47 +01:00
Elias Fleckenstein ef9a54872e Merge branch 'master' of https://git.minetest.land/Wuzzy/MineClone2 2020-12-21 17:58:39 +01:00
Elias Fleckenstein a4d9d22bb0 Mending 2020-12-21 15:12:24 +01:00
Wuzzy 39a0fdd24c No enchant 4 flint&steel,pumpkin,head,screwdriver 2020-12-19 16:26:12 +01:00
kay27 8eed6eaf4e Slightly optimize fire ignition by lava and make it more MC-like 2020-12-15 00:27:20 +04:00
Elias Fleckenstein ed738da016 Added Enchanting Table 2020-11-25 12:47:27 +01:00
kay27 15cb94b9b3 Close minor issues with fishing rod timing and permanent_flame alias, https://git.minetest.land/Wuzzy/MineClone2/issues/834 & https://git.minetest.land/Wuzzy/MineClone2/issues/836 2020-09-20 03:38:31 +04:00
Wuzzy ce0b31123b Increase smoke anim duration for fire smoke 2020-08-19 20:44:12 +02:00
Wuzzy c2afc82754 Disable some demanding particles by default
Fire smoke, lava droplets
2020-08-19 20:39:05 +02:00
Wuzzy 101391cbcc Fire nodes spawn smoke particles 2020-08-19 19:32:23 +02:00
Wuzzy 13963d00e5 Fix missing definition of age_next in mcl_fire 2020-08-05 18:04:37 +02:00
kay27 ba51686e6c Russian translation 2020-07-20 00:11:13 +00:00
Wuzzy c106a62979 Use minetest.is_creative_enabled 2020-07-10 16:45:40 +02:00
Wuzzy 1a0e979b0c Update incomplete license information and credits 2020-05-11 17:18:04 +02:00
Wuzzy c156398fb5 Merge branch 'translate-fr' of https://git.minetest.land/lrocher/MineClone2 into translate_fr 2020-05-09 18:57:40 +02:00
Wuzzy 728db50baf Fire doesn't destroy flammable=-1 nodes 2020-05-09 18:55:50 +02:00
Wuzzy 621946546b Ignite TNT by fire 2020-05-09 18:52:03 +02:00
Wuzzy ffcad31871 Update falling nodes when fire replaces a block 2020-05-09 17:53:32 +02:00
Wuzzy bfb1e3e447 Add age to of fire to greatly limit fire spread 2020-05-09 17:44:23 +02:00
Rocher Laurent 4957bd1118 Translate In French 2020-05-03 22:39:07 +02:00
Wuzzy 0929ce4f20 Remove fire below air 2020-04-22 01:31:30 +02:00
Wuzzy a1ea41e760 Lava: Don't ignite 2 blocks above if 1 layer above is blocked 2020-04-08 03:17:34 +02:00
Wuzzy c5e4ec5e27 Use ephemeral sounds 2020-04-07 00:55:45 +02:00
Wuzzy b56ead7a23 Don't allow to set fire on fire 2020-03-24 19:53:08 +01:00
wuniversales 3772dd51cc Update Spanish translation 2020-03-15 08:32:00 +01:00
Wuzzy feba60cad8 Translate all extended tooltips to German 2020-03-12 01:35:11 +01:00
Wuzzy ba74546d48 Add extended tooltips 2020-02-19 04:54:17 +01:00
wuniversales 15481cb24d Add Spanish translation 2020-02-04 21:43:50 +01:00
Wuzzy 101c9b7322 Use minetest.LIGHT_MAX 2019-12-14 18:57:17 +01:00
Wuzzy ed336829b4 Fade out rain and fire sounds 2019-09-05 00:07:32 +02:00
Wuzzy ab81dfb4b4 Stop fire spread if enable_fire=false 2019-04-09 15:25:27 +02:00
Wuzzy c5db9987c3 Fix various typos in German translation 2019-03-25 11:01:52 +01:00
Wuzzy 661e10e992 Fix crash when dying cuz fire, lava or magmablock 2019-03-15 07:10:18 +01:00
Wuzzy 86e5eb748f More fire fixes 2019-03-15 04:36:17 +01:00
Wuzzy f5c1e19781 Add help for disabled fire and translate 2019-03-15 04:25:54 +01:00
Wuzzy 5aeb4aea74 Add translation templates for most mods
Using the findtext.lua script
2019-03-13 23:40:59 +01:00