From f39236c8fd8954f71b9a4921d4b398f6436db5c9 Mon Sep 17 00:00:00 2001 From: smiki Date: Wed, 1 Oct 2025 14:59:59 +0200 Subject: [PATCH] [FIXED] ZONE_POLYGON from RECT ME drawing rotation not taken into account. --- Moose Development/Moose/Core/Database.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index 20d6c94ce..e74461eca 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -579,13 +579,10 @@ do -- Zones and Pathlines local h=objectData.height local rotation = UTILS.ToRadian(objectData.angle or 0) - local dx = vec2.x + math.abs(w) - local dy = vec2.y + math.abs(h) - local sinRot = math.sin(-rotation) local cosRot = math.cos(-rotation) - dx = (dx / 2) - dy = (dy / 2) + local dx = w / 2 + local dy = h / 2 local points = { { x = -dx * cosRot - (-dy * sinRot) + vec2.x, y = -dx * sinRot + (-dy * cosRot) + vec2.y },