mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 03:07:32 +01:00
Fixed variable definitions ("undeclared global")
This commit is contained in:
parent
6d927ab1a1
commit
a8fcae0f51
@ -490,7 +490,7 @@ function mcl_potions._clear_cached_player_data(player)
|
|||||||
effect[player] = nil
|
effect[player] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
meta:set_int("night_vision", 0)
|
meta:set_int("night_vision", 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -514,7 +514,7 @@ function mcl_potions._save_player_effects(player)
|
|||||||
if not player:is_player() then
|
if not player:is_player() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
|
|
||||||
for name, effect in pairs(registered_effects) do
|
for name, effect in pairs(registered_effects) do
|
||||||
meta:set_string("mcl_potions:_EF_"..name, minetest.serialize(EF[name][player]))
|
meta:set_string("mcl_potions:_EF_"..name, minetest.serialize(EF[name][player]))
|
||||||
@ -525,7 +525,7 @@ function mcl_potions._load_player_effects(player)
|
|||||||
if not player:is_player() then
|
if not player:is_player() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
|
|
||||||
-- handle legacy meta strings
|
-- handle legacy meta strings
|
||||||
local legacy_invisible = minetest.deserialize(meta:get_string("_is_invisible"))
|
local legacy_invisible = minetest.deserialize(meta:get_string("_is_invisible"))
|
||||||
|
Loading…
Reference in New Issue
Block a user