1
0

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
This commit is contained in:
madmaxoft@gmail.com
2013-06-07 20:19:36 +00:00
parent 018adc3153
commit b244f206d5
3 changed files with 58 additions and 14 deletions

View File

@@ -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