Fixed climate-swap changes in DaggerfallLocation not respecting the billboard's "AlignToBase"#2548
Merged
KABoissonneault merged 1 commit intoInterkarma:masterfrom Feb 11, 2024
Conversation
…illboard's "AlignToBase". Billboards always float in the air so the bottom touches the ground, but climate swap can change a billboard's size
Interkarma
approved these changes
Feb 6, 2024
Interkarma
reviewed
Feb 6, 2024
| // Billboard is already aligned to base | ||
| // But we're potentially changing the archive | ||
| // Because the summary size can change, we have to cancel | ||
| // the "base" alignment and reapply it after |
Owner
There was a problem hiding this comment.
That makes perfect sense, good fix Kab
numidium
approved these changes
Feb 11, 2024
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Billboards always float in the air, so the bottom touches the ground. In
DaggerfallLocation.ApplyClimateSettings, we have a procedure to apply climate swap on child billboards, but it fails to account for the change in billboard height.This issue only affects nature used in RMB "misc block flats". In normal Daggerfall data, nature is in the ground scenery, which applies the climate swap directly in
RMBLayout.AddNatureFlats, before the billboard's been aligned to base. However, ground scenery is bound to a 16x16 grid and has fixed elevation, so mods prefer to use "misc flats" for better control (like putting a tree on a hill).This issue was reported by carademono here: #2545 (comment)
Without climate swap:

With climate swap:

My suggested fix is to cancel out the "AlignToBase" in DaggerfallLocation using the original size, then realign to base using the new size.
Now, trees keep the correct elevation.

Other potential solutions:
We could apply the climate swap in
RMBLayout.AddMiscBlockFlatssimilarly to what we already have for the ground scenery. However, DaggerfallLocation is intended to have control of whether climate swap is applied, and I figured this might have side effects of forcing climate swaps in contexts where it's not intended.