aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorBob Blackmon <bob.blackmon@ymail.com>2017-04-03 13:21:01 -0400
committerBob Blackmon <bob.blackmon@ymail.com>2017-04-03 13:21:01 -0400
commite221216c250a5d7dde9409f7c726bdff7382a1c6 (patch)
tree2d13e98b371dc2d5f2adab1962ea2fae0f7125e4 /lua
parent52010302691a55158df963712a4320dd6ba5b5fa (diff)
downloadzones-e221216c250a5d7dde9409f7c726bdff7382a1c6.tar.gz
zones-e221216c250a5d7dde9409f7c726bdff7382a1c6.tar.bz2
zones-e221216c250a5d7dde9409f7c726bdff7382a1c6.zip
Zone edit defaults to current zone
Diffstat (limited to 'lua')
-rw-r--r--lua/weapons/weapon_zone_designator.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/lua/weapons/weapon_zone_designator.lua b/lua/weapons/weapon_zone_designator.lua
index 69e3277..19ae40b 100644
--- a/lua/weapons/weapon_zone_designator.lua
+++ b/lua/weapons/weapon_zone_designator.lua
@@ -168,6 +168,14 @@ function SWEP:PrimaryAttack()
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())
+ else
+
+ local _,id = self.Owner:GetCurrentZone(GetConVarNumber("zone_filter") == 1 and self:GetZoneClass())
+ if IsValid(zones.optionsFrame) then return end
+ if id != -1 then
+ zones.ShowOptions(id)
+ end
+
end
end