From 0167d8e4e62372c5eb5981a64b938d878f4ce211 Mon Sep 17 00:00:00 2001 From: Bob Blackmon Date: Mon, 3 Apr 2017 18:17:35 -0400 Subject: Resize the zone you're standing in --- lua/weapons/weapon_zone_designator.lua | 20 ++++++++++++++++++++ 1 file changed, 20 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 0e9ce9a..b2a05e0 100644 --- a/lua/weapons/weapon_zone_designator.lua +++ b/lua/weapons/weapon_zone_designator.lua @@ -332,6 +332,26 @@ function SWEP:SecondaryAttack() until ( next == tr.Entity ) self:SetCurrentPoint(tr.Entity) + elseif tr.HitWorld then + local z, id = self.Owner:GetCurrentZone(GetConVarNumber("zone_filter") == 1 and self:GetZoneClass()) + if id != -1 then + + local curr + for k,v in pairs(ents.FindByClass("ent_zone_point"))do + if v:GetZoneID() == id then curr = v break end + end + local next = curr + repeat + next.Resizing = self.Owner + + next = next:GetNext() + + + until ( next == curr ) + + self:SetCurrentPoint(curr) + + end end end -- cgit v1.2.3-70-g09d2