From b244f206d5c9c22cdae6bdbef273faaa858af5d2 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Fri, 7 Jun 2013 20:19:36 +0000 Subject: ProtectionAreas: The areas are now read from the DB (once) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1563 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua') diff --git a/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua b/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua index 744ea7e9c..a8219edf7 100644 --- a/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua +++ b/MCServer/Plugins/ProtectionAreas/ProtectionAreas.lua @@ -9,6 +9,9 @@ --- Prefix for all messages logged to the server console PluginPrefix = "ProtectionAreas: "; +--- Bounds for the area loading. Areas less this far in any direction from the player will be loaded into cPlayerAreas +g_AreaBounds = 48; + @@ -27,10 +30,11 @@ function Initialize(a_Plugin) InitializeCommandHandlers(); -- We might be reloading, so there may be players already present in the server; reload all of them - local function ReloadPlayers(a_World) - ReloadAllPlayersInWorld(a_World:GetName()); - end - cRoot:Get():ForEachWorld(ReloadPlayers); + cRoot:Get():ForEachWorld( + function(a_World) + ReloadAllPlayersInWorld(a_World:GetName()); + end + ); return true; end -- cgit v1.2.3