mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
tweak(resource/zoneCreator): specify vec2
This commit is contained in:
@@ -182,13 +182,13 @@ local function startCreator(arg)
|
|||||||
local rad = math.rad(-heading)
|
local rad = math.rad(-heading)
|
||||||
local sinH = math.sin(rad)
|
local sinH = math.sin(rad)
|
||||||
local cosH = math.cos(rad)
|
local cosH = math.cos(rad)
|
||||||
local center = vec(xCoord, yCoord)
|
local center = vec2(xCoord, yCoord)
|
||||||
---@type vector2[]
|
---@type vector2[]
|
||||||
points = {
|
points = {
|
||||||
center + vec((width * cosH + length * sinH), (length * cosH - width * sinH)) / 2,
|
center + vec2((width * cosH + length * sinH), (length * cosH - width * sinH)) / 2,
|
||||||
center + vec(-(width * cosH - length * sinH), (length * cosH + width * sinH)) / 2,
|
center + vec2(-(width * cosH - length * sinH), (length * cosH + width * sinH)) / 2,
|
||||||
center + vec(-(width * cosH + length * sinH), -(length * cosH - width * sinH)) / 2,
|
center + vec2(-(width * cosH + length * sinH), -(length * cosH - width * sinH)) / 2,
|
||||||
center + vec((width * cosH - length * sinH), -(length * cosH + width * sinH)) / 2,
|
center + vec2((width * cosH - length * sinH), -(length * cosH + width * sinH)) / 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
drawLines()
|
drawLines()
|
||||||
|
|||||||
Reference in New Issue
Block a user