summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ProtectionAreas/Storage.lua
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer/Plugins/ProtectionAreas/Storage.lua')
-rw-r--r--MCServer/Plugins/ProtectionAreas/Storage.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/MCServer/Plugins/ProtectionAreas/Storage.lua b/MCServer/Plugins/ProtectionAreas/Storage.lua
index 10cc469e5..e21b128d5 100644
--- a/MCServer/Plugins/ProtectionAreas/Storage.lua
+++ b/MCServer/Plugins/ProtectionAreas/Storage.lua
@@ -192,7 +192,17 @@ function cStorage:LoadPlayerAreas(a_PlayerName, a_PlayerX, a_PlayerZ, a_WorldNam
local BoundsMinZ = a_PlayerZ - g_AreaBounds;
local BoundsMaxZ = a_PlayerZ + g_AreaBounds;
- local res = cPlayerAreas:new();
+ local res = cPlayerAreas:new(
+ BoundsMinX + g_AreaSafeEdge, BoundsMinZ + g_AreaSafeEdge,
+ BoundsMaxX - g_AreaSafeEdge, BoundsMaxZ - g_AreaSafeEdge
+ );
+
+ --[[
+ LOG("Loading protection areas for player " .. a_PlayerName .. " centered around {" .. a_PlayerX .. ", " .. a_PlayerZ ..
+ "}, bounds are {" .. BoundsMinX .. ", " .. BoundsMinZ .. "} - {" ..
+ BoundsMaxX .. ", " .. BoundsMaxZ .. "}"
+ );
+ --]]
-- Load the areas from the DB, based on the player's location
local sql =