From 8b21b2dca2cfeceafecd4a1553c522abd135fcd7 Mon Sep 17 00:00:00 2001 From: crabman77 Date: Thu, 7 Apr 2016 16:56:11 +0200 Subject: [PATCH] fix useless multi reading file(lag?), only read on loading mod --- minetestforfun_game/mods/beds/functions.lua | 3 ++- minetestforfun_game/mods/beds/spawns.lua | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/minetestforfun_game/mods/beds/functions.lua b/minetestforfun_game/mods/beds/functions.lua index ea9cf93b..e5c60da8 100755 --- a/minetestforfun_game/mods/beds/functions.lua +++ b/minetestforfun_game/mods/beds/functions.lua @@ -176,10 +176,11 @@ end -- callbacks - +--[[ --MFF (Crabman) It's useless to read each join player, read only once at load. function moved/called in spawn.lua minetest.register_on_joinplayer(function(player) beds.read_spawns() end) +--]] local dead_players = {} diff --git a/minetestforfun_game/mods/beds/spawns.lua b/minetestforfun_game/mods/beds/spawns.lua index 6e087f82..7b99631a 100755 --- a/minetestforfun_game/mods/beds/spawns.lua +++ b/minetestforfun_game/mods/beds/spawns.lua @@ -56,3 +56,5 @@ function beds.set_spawns() end beds.save_spawns() end + +beds.read_spawns()