From 24bf3c07b9374857525ada12c2f6beb3d6a06ce3 Mon Sep 17 00:00:00 2001 From: Bob Blackmon Date: Mon, 3 Apr 2017 10:02:05 -0400 Subject: Class changes call OnZoneCreated --- lua/zones.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/zones.lua b/lua/zones.lua index ac0c9dd..bf380ca 100644 --- a/lua/zones.lua +++ b/lua/zones.lua @@ -1,5 +1,5 @@ -local version = 1.11 -- Older versions will not run if a newer version is used in another script. +local version = 1.12 -- Older versions will not run if a newer version is used in another script. --[[ ZONES - by Bobbleheadbob WARNING: If you edit any of these files, make them use a different namespace. Multiple scripts may depend on this library so modifying it can break other scripts. @@ -327,7 +327,16 @@ if SERVER then v:SetZoneClass(class) end end - zones.List[id].class = class + + local zone,new = zones.List[id],{} + new.points = zone.points + new.height = zone.height + new.bounds = zone.bounds + new.class = class + + zones.List[id] = new + + hook.Run("OnZoneCreated",new,class,id) zones.Sync() end) -- cgit v1.2.3-70-g09d2