fix(client/zoneCreator): rotation output

This commit is contained in:
DokaDoka
2022-10-01 15:24:51 +10:00
parent 60c4e4e91b
commit a84f2586cb

View File

@@ -171,7 +171,7 @@ local function startCreator(arg)
if zoneType == 'poly' then if zoneType == 'poly' then
drawLines() drawLines()
elseif zoneType == 'box' then elseif zoneType == 'box' then
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 = vec(xCoord, yCoord)
@@ -248,17 +248,17 @@ local function startCreator(arg)
change = true change = true
zCoord -= steps[1][step] zCoord -= steps[1][step]
elseif IsDisabledControlJustReleased(0, 38) then -- e elseif IsDisabledControlJustReleased(0, 38) then -- e
change = true
heading += steps[2][step]
if heading >= 360 then
heading -= 360
end
elseif IsDisabledControlJustReleased(0, 44) then -- q
change = true change = true
heading -= steps[2][step] heading -= steps[2][step]
if heading < 0 then if heading < 0 then
heading += 360 heading += 360
end end
elseif IsDisabledControlJustReleased(0, 44) then -- q
change = true
heading += steps[2][step]
if heading >= 360 then
heading -= 360
end
elseif IsDisabledControlJustReleased(0, 47) then -- g elseif IsDisabledControlJustReleased(0, 47) then -- g
change = true change = true
if displayMode == #displayModes then if displayMode == #displayModes then