1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

Many Bugfixs

- Crash server avec flower_plus et areas
- Beginners_chest ne fera plus des debug.txt de 100Mo par jours à cause
de ces « print » si la zone n’est pas chargé
- U_skins commentaire changé en 2min, correspondant au nouveau temps
d’actualisation des skins
This commit is contained in:
Ombridride
2014-11-02 20:26:31 +01:00
parent 5b1be3e6ee
commit 6a795320a7
3 changed files with 7 additions and 6 deletions

5
mods/areas/api.lua Executable file → Normal file
View File

@ -1,8 +1,8 @@
--
-- Returns a list of areas that include the provided position
function areas:getAreasAtPos(pos)
local a = {}
local px, py, pz = pos.x, pos.y, pos.z
local px, py, pz = pos.x, pos.y, pos.z
for id, area in pairs(self.areas) do
local ap1, ap2 = area.pos1, area.pos2
if px >= ap1.x and px <= ap2.x and
@ -20,6 +20,7 @@ function areas:canInteract(pos, name)
return true
end
local owned = false
if pos == nil then return not owned end -- pour éviter crash avec nénuphar
for _, area in pairs(self:getAreasAtPos(pos)) do
if area.owner == name or area.open then
return true