Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: for original terrain generator, keep a single gap of water at the borders #7883

Merged

Conversation

@SamuXarick
Copy link
Contributor

@SamuXarick SamuXarick commented Dec 29, 2019

  • When freeform_edges was on, NE and NW borders could have terrain adjacent to the void tiles
  • SE and SW borders minimum gap was 2-tile wide instead of 1
@SamuXarick SamuXarick force-pushed the original-generator-vs-freeform-edges branch from dbb41b2 to ca93dbd Dec 30, 2019
@SamuXarick SamuXarick force-pushed the original-generator-vs-freeform-edges branch from ca93dbd to 9135a4d Feb 9, 2020
LordAro
LordAro previously approved these changes Apr 13, 2020
Copy link
Member

@LordAro LordAro left a comment

Probably fine.

@SamuXarick SamuXarick force-pushed the original-generator-vs-freeform-edges branch from 9135a4d to 9e6e669 Jul 12, 2020
LordAro
LordAro previously approved these changes Sep 24, 2020
Copy link
Member

@LordAro LordAro left a comment

Sure.

Copy link
Member

@TrueBrain TrueBrain left a comment

I fixed the issues locally; will push it in a sec. Wanted to leave the feedback behind for posterity.

src/landscape.cpp Outdated Show resolved Hide resolved
src/landscape.cpp Show resolved Hide resolved
@TrueBrain TrueBrain force-pushed the original-generator-vs-freeform-edges branch from 9e6e669 to 0c4918f Dec 15, 2020
@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 15, 2020

Ah, figured it. freeform_edges only sets x=0 and y=0 to VOID. That explains.

Reworked the patch a bit to have less lines. Will merge later :)

TrueBrain
TrueBrain previously approved these changes Dec 15, 2020
@frosch123
Copy link
Member

@frosch123 frosch123 commented Dec 15, 2020

I think this is wrong.
With fixed edges there is supposed to be a border with flat water tiles.
While with freeform edges also the border can be sloped.

@TrueBrain
Copy link
Member

@TrueBrain TrueBrain commented Dec 15, 2020

Nothing changed there, it can still be sloped.

What this changes, is what the generator outputs. It used to be that with 2 borders it should be sloped, but the other two always had 2 tiles of water, during generation. That just looks odd.

The only real choice here is, I guess, if it should generate sloped borders; if so, it should do that in all 4 borders ;) But that really does look ugly :)

@TrueBrain TrueBrain changed the title Fix: Ensure a minimum gap of water upon generating terrain with original generator Fix: for original terrain generator, always keep a gap of water at the borders Dec 15, 2020
…e borders

This means that for NE/NW, it should have one more in case of
freeform-edges, and in case of SE/SW it should have one less.

Reminder: freeform-edges only adds VOID tiles on X=0 and Y=0.
@TrueBrain TrueBrain changed the title Fix: for original terrain generator, always keep a gap of water at the borders Fix: for original terrain generator, keep a single gap of water at the borders Dec 15, 2020
@TrueBrain TrueBrain force-pushed the original-generator-vs-freeform-edges branch from 0c4918f to 90db639 Dec 15, 2020
@TrueBrain TrueBrain merged commit 1d85d71 into OpenTTD:master Dec 15, 2020
8 checks passed
@SamuXarick SamuXarick deleted the original-generator-vs-freeform-edges branch Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants