diff options
| author | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-03 18:17:35 -0400 |
|---|---|---|
| committer | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-03 18:17:35 -0400 |
| commit | 0167d8e4e62372c5eb5981a64b938d878f4ce211 (patch) | |
| tree | 3756ce0e9c100d62dd81c9984fbfee807ddc027c /lua | |
| parent | bab64d993b693ccb3c8766371a3ce18b92010b11 (diff) | |
| download | zones-0167d8e4e62372c5eb5981a64b938d878f4ce211.tar.gz zones-0167d8e4e62372c5eb5981a64b938d878f4ce211.tar.bz2 zones-0167d8e4e62372c5eb5981a64b938d878f4ce211.zip | |
Resize the zone you're standing in
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/weapons/weapon_zone_designator.lua | 20 |
1 files changed, 20 insertions, 0 deletions
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 |
