Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
470 stars 75 forks source link

Don't allow roads in no-mans land or in border #1657

Closed Xellzul closed 1 day ago

Xellzul commented 3 months ago

Roads are no longer allowed to be in no-mans land or in border

Fixes #968

The code is ugly so if you have any suggestions, feel free to fix it.

This should fix all problems, where roads were in places, where they shouldn't be.

If you need, I can provide few examples (savegames)

Xellzul commented 3 months ago

@Flamefire Everything except the test should be addressed.

Flamefire commented 3 months ago

@Flamefire Everything except the test should be addressed.

I see perfect thanks! Are you going to fix the test too or do you need help with that?

Xellzul commented 3 months ago

@Flamefire Everything except the test should be addressed.

I see perfect thanks! Are you going to fix the test too or do you need help with that?

i will try to add the test on my own later today or tomorow

Xellzul commented 2 months ago

@Flamefire So I did some more testing and found out one new bug. Border is considered as player territory.. Should be fixed in last commit

Screenshot 2024-04-10 151844

Flamefire commented 1 day ago

I rebased your branch (fixing the conflict and squashing commits) and applied the remaining suggestion (see the last 3 commits)

Enabling automerge as CI should pass, if not I'll fix it ;-) Thanks a lot for hunting this down and fixing it!