aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorBob Blackmon <bob.blackmon@ymail.com>2017-04-03 11:21:56 -0400
committerBob Blackmon <bob.blackmon@ymail.com>2017-04-03 11:21:56 -0400
commitadd2452b141b4e1346ecabfe7ef87bbb610580ea (patch)
tree6ba85353faf9c1c1df2db0fcb07b1a68d0c4a753 /lua
parent1f39bcb47ff1385521677213bf7cae3dd2786aae (diff)
downloadzones-add2452b141b4e1346ecabfe7ef87bbb610580ea.tar.gz
zones-add2452b141b4e1346ecabfe7ef87bbb610580ea.tar.bz2
zones-add2452b141b4e1346ecabfe7ef87bbb610580ea.zip
Fixed multiple popups
Diffstat (limited to 'lua')
-rw-r--r--lua/weapons/weapon_zone_designator.lua1
-rw-r--r--lua/zones.lua1
2 files changed, 2 insertions, 0 deletions
diff --git a/lua/weapons/weapon_zone_designator.lua b/lua/weapons/weapon_zone_designator.lua
index fd2c0c5..9965e4c 100644
--- a/lua/weapons/weapon_zone_designator.lua
+++ b/lua/weapons/weapon_zone_designator.lua
@@ -166,6 +166,7 @@ function SWEP:PrimaryAttack()
elseif CLIENT then
local tr = self.Owner:GetEyeTrace()
if !tr.HitWorld and IsValid(tr.Entity) and tr.Entity:GetClass() == "ent_zone_point" then
+ if IsValid(zones.optionsFrame) then return end
zones.ShowOptions(tr.Entity:GetZoneID())
end
diff --git a/lua/zones.lua b/lua/zones.lua
index 27c35f8..19fe643 100644
--- a/lua/zones.lua
+++ b/lua/zones.lua
@@ -376,6 +376,7 @@ else
local class = zone.class
local frame = vgui.Create("DFrame")
+ zones.optionsFrame = frame
frame:MakePopup()
frame:SetTitle("Zone Settings")