fixed (?) creative upon respawn
This commit is contained in:
parent
fc300d1d11
commit
c22b9d9204
|
@ -296,8 +296,6 @@ function distance(pos1,pos2)
|
||||||
return math.sqrt( (pos1.x - pos2.x)^2 + (pos1.y - pos2.y)^2 + (pos1.z - pos2.z)^2 )
|
return math.sqrt( (pos1.x - pos2.x)^2 + (pos1.y - pos2.y)^2 + (pos1.z - pos2.z)^2 )
|
||||||
end
|
end
|
||||||
|
|
||||||
local damage_enabled = multicraft.setting_getbool("enable_damage")
|
|
||||||
|
|
||||||
function init_hunger(player, force)
|
function init_hunger(player, force)
|
||||||
if player then
|
if player then
|
||||||
local pll = player:get_player_name()
|
local pll = player:get_player_name()
|
||||||
|
@ -308,7 +306,7 @@ function init_hunger(player, force)
|
||||||
if not timers[pll] or force then timers[pll] = -1 end
|
if not timers[pll] or force then timers[pll] = -1 end
|
||||||
if not keypress_track[pll] or force then keypress_track[pll] = {} end
|
if not keypress_track[pll] or force then keypress_track[pll] = {} end
|
||||||
if not state[pll] or type(state[pll])~="table" or force then state[pll] = {} end
|
if not state[pll] or type(state[pll])~="table" or force then state[pll] = {} end
|
||||||
|
local damage_enabled = multicraft.setting_getbool("enable_damage")
|
||||||
if damage_enabled then
|
if damage_enabled then
|
||||||
multicraft.after(0.5, function()
|
multicraft.after(0.5, function()
|
||||||
if not player then return end
|
if not player then return end
|
||||||
|
|
Loading…
Reference in New Issue