Added a check against constant reading of the array if the player is not on the server.
Some checks are pending
luacheck / luacheck (push) Waiting to run
Some checks are pending
luacheck / luacheck (push) Waiting to run
This commit is contained in:
parent
a094097b5e
commit
2111a21f68
@ -352,7 +352,14 @@ local move_entities_globalstep_part2 = function(dtime)
|
||||
if not luaentity.entities then
|
||||
luaentity.entities = read_entities()
|
||||
end
|
||||
--minetest.log("action", "Dump: " .. dump(luaentity.entities))
|
||||
for _, entity in pairs(luaentity.entities) do
|
||||
--minetest.log("action", "entity " .. type(entity.owner))
|
||||
if entity.owner ~= nil then
|
||||
local object = minetest.env:get_player_by_name(entity.owner)
|
||||
if object then
|
||||
--minetest.chat_send_all("online: " .. dump(entity.owner))
|
||||
--minetest.log("action", "pipeworks: активная передача по трубам игрок в сети: " .. entity.owner)
|
||||
local master = entity._attached_entities_master
|
||||
local master_def = master and entity._attached_entities[master]
|
||||
local master_entity = master_def and master_def.entity
|
||||
@ -390,6 +397,8 @@ local move_entities_globalstep_part2 = function(dtime)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- dtime after which there is an update (or skip).
|
||||
local dtime_threshold = pipeworks.entity_update_interval
|
||||
|
Loading…
Reference in New Issue
Block a user