Allow minetest.get_player_by_name while leaving
Allow minetest.registered_on_leaveplayers to use minetest.get_player_by_name while the player is leaving.
This commit is contained in:
parent
a05b314ccc
commit
398dec3d82
4
core.lua
4
core.lua
|
@ -124,8 +124,6 @@ cloaking.cloak = function(player)
|
|||
player:set_properties({visual_size = {x = 0, y = 0}, collisionbox = {0,0,0,0,0,0}})
|
||||
p:set_nametag_attributes({text = " "})
|
||||
|
||||
cloaked_players[victim] = true
|
||||
|
||||
local t = nil
|
||||
if areas and areas.hud and areas.hud[victim] then
|
||||
t = areas.hud[victim]
|
||||
|
@ -137,6 +135,8 @@ cloaking.cloak = function(player)
|
|||
end
|
||||
end
|
||||
|
||||
cloaked_players[victim] = true
|
||||
|
||||
if t then
|
||||
areas.hud[victim] = t
|
||||
p:hud_change(areas.hud[victim].areasId, "text", "Cloaked")
|
||||
|
|
Loading…
Reference in New Issue