#195 Fix missing player storage initialisation

This commit is contained in:
kay27 2022-02-13 04:19:57 +04:00
parent fc48ba9a62
commit ac1ec1d77d
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ dofile(modpath .. "/api.lua")
minetest.register_globalstep(function(dtime)
for _, player in pairs(get_connected_players()) do
local storage = mcl_burning.storage[player]
if not storage then
mcl_burning.init_player(player)
storage = mcl_burning.storage[player]
end
if not mcl_burning.tick(player, dtime, storage) and not mcl_burning.is_affected_by_rain(player) then
local nodes = mcl_burning.get_touching_nodes(player, {"group:puts_out_fire", "group:set_on_fire"}, storage)
local burn_time = 0