pepsodent, on 10 August 2026 - 08:36 AM, said:
isnt this the normal behavior? Sectors cant touch each other only by corners, the points will simply overlap and break the rendering
No. This has nothing to do with the engine's behavior.
The point is that clockdir() returns the wrong direction because there's no way to determine it geometrically correctly.
However, loops within a sector should always be created counterclockwise, while the "main" walls of the sector that form it should be created CW.
In the original behavior, this bug can be fixed by manually untangling the loop. We simply added an automatic script for Xmapedit.
When a sector is created inside, the columns themselves, the walls of that sector, and possibly the other side of that sector will need to be rotated. And they need to be aligned (i.e., the sector is CW, the other side is CCW).