mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
fix PolyZone support for minZ maxZ
This commit is contained in:
@@ -50,13 +50,23 @@ function createPoly(data)
|
|||||||
end
|
end
|
||||||
data.thickness = 1000 -- Set a default thickness value
|
data.thickness = 1000 -- Set a default thickness value
|
||||||
Location = lib.zones.poly(data)
|
Location = lib.zones.poly(data)
|
||||||
|
|
||||||
elseif isStarted("PolyZone") then
|
elseif isStarted("PolyZone") then
|
||||||
debugPrint("^6Bridge^7: ^2Creating new poly with ^7'^4PolyZone^7': "..data.name)
|
debugPrint("^6Bridge^7: ^2Creating new poly with ^7'^4PolyZone^7': "..data.name)
|
||||||
Location = PolyZone:Create(data.points, { name = data.name, debugPoly = data.debug })
|
Location = PolyZone:Create(data.points, {
|
||||||
|
name = data.name,
|
||||||
|
minZ = data.minZ or nil,
|
||||||
|
maxZ = data.maxZ or nil,
|
||||||
|
debugPoly = data.debug
|
||||||
|
})
|
||||||
Location:onPlayerInOut(function(isPointInside)
|
Location:onPlayerInOut(function(isPointInside)
|
||||||
if isPointInside then data.onEnter() else data.onExit() end
|
if isPointInside then
|
||||||
|
data.onEnter()
|
||||||
|
else
|
||||||
|
data.onExit()
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
else
|
else
|
||||||
print("^4ERROR^7: ^2No PolyZone creation script detected ^7- ^2Check ^3exports^1.^2lua^7")
|
print("^4ERROR^7: ^2No PolyZone creation script detected ^7- ^2Check ^3exports^1.^2lua^7")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user