mapeditor/tiled

Brushes get messed up on Staggered maps #3431

eishiya posted onGitHub

When copy+pasting tiles on a staggered maps, if the origin (top left corner) of the brush was on a staggered row, every other row of the brush is pushed in the opposite direction of what's required to account for the staggering. Here, the hexagon of tiles starts on row 1, a staggered row, and copy+pasting it results in a mess: image If the origin of the brush was on a non-staggered row, then stagger compensation works perfectly fine. Here, I redrew my hexagon of tiles starting on row 0, a non-staggered row, and copy+pasted it, it behaves correctly no matter where I try to paint it: image

I don't use staggered maps often so I don't know when this started. I noticed this in 1.9.0, Win64.

My guess is the stagger-compensating code always shifts certain rows in a particular direction based on their coordinates in the brush itself, disregarding where they came from in the source map, which would affect which rows are staggered and which are not.


Problem appears related to there being an odd number of empty rows at the top of the captured area, like this:

image

posted by bjorn about 2 years ago

Problem appears related to there being an odd number of empty rows at the top of the captured area

On maps with stagger axis X, it may be related to empty columns instead, that's something to check too.

posted by eishiya about 2 years ago

After being stumped on this for way too long, I eventually located the issue. Should be fixed by #3628.

posted by bjorn about 2 years ago

Fund this Issue

$0.00
Funded

Pull requests