From e221216c250a5d7dde9409f7c726bdff7382a1c6 Mon Sep 17 00:00:00 2001 From: Bob Blackmon Date: Mon, 3 Apr 2017 13:21:01 -0400 Subject: Zone edit defaults to current zone --- lua/weapons/weapon_zone_designator.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lua/weapons/weapon_zone_designator.lua') 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 -- cgit v1.2.3-70-g09d2