diff options
| author | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-01 17:51:17 -0400 |
|---|---|---|
| committer | Bob Blackmon <bob.blackmon@ymail.com> | 2017-04-01 17:51:17 -0400 |
| commit | 7680d8655f2f473b1af98c852c47e41432c06c05 (patch) | |
| tree | 9e4fd3a73a14ed5fbf7e2cbebfc2751c89781d6a | |
| parent | e950e06d60365610e878a0a3bb350b85fea34d78 (diff) | |
| download | zones-7680d8655f2f473b1af98c852c47e41432c06c05.tar.gz zones-7680d8655f2f473b1af98c852c47e41432c06c05.tar.bz2 zones-7680d8655f2f473b1af98c852c47e41432c06c05.zip | |
Changed to boolean
| -rw-r--r-- | zones/lua/zones.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zones/lua/zones.lua b/zones/lua/zones.lua index 7220688..c005c07 100644 --- a/zones/lua/zones.lua +++ b/zones/lua/zones.lua @@ -349,7 +349,7 @@ else frame.content:Dock(FILL) local w,h = hook.Run("ShowZoneOptions",zone,class,frame.content,id,frame) - frame:SizeTo((w or 292)+8,(h or 422)+78, .2) + frame:SizeTo((w or 100)+8,(h or 2)+78, .2) frame:MoveTo(ScrW()/2-((w or 292)+8)/2,ScrH()/2-((h or 422)+78)/2, .2) end @@ -357,7 +357,7 @@ else frame.content:Dock(FILL) local w,h = hook.Run("ShowZoneOptions",zone,class,frame.content,id,frame) - frame:SetSize((w or 292)+8,(h or 422)+78) + frame:SetSize((w or 100)+8,(h or 2)+78) frame:Center() end @@ -434,18 +434,18 @@ function zones.PointInPoly(point,poly) //True if point is within a polygon. x1 = point.x, y1 = point.y, x2 = point.x + 10000, - y2 = point.y + 10000, - intersects = 0 + y2 = point.y + 10000 } + local inside = false //Do ray check. for k,v in pairs(lines)do if Intersect(ray,v) then - ray.intersects = ray.intersects + 1 + inside = !inside end end - return (ray.intersects % 2) == 1 + return inside end |
