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 #158: incorrect flooding for initial portion of world player sees first #620

Merged
merged 2 commits into from
Jul 2, 2023

Conversation

Aidoneus
Copy link
Contributor

@Aidoneus Aidoneus commented Mar 28, 2023

Somehow a portion of zMod code was missing from vrtMap::accept, even though similar logic was in vrtMap::linkC, as it should've been, including a comment hinting at the fact that something similar should've been somewhere above.

This resulted in incorrect water levels on a portion of world that is drawn when player appears in the world (from escave or Passage), and player only needed to move far away enough from that portion and go back – and voila, it would've rendered correctly.

Still the issue was affecting gameplay – it was not purely visual, the water really appeared and disappeared as player moved around, I've described one such gameplay change example below for anyone interested.

I.e. when entering Weexow in multiplayer (which is stuck in permanent flood due to issue, which is fixed by #619 ) player sees the normal area, but water around them was in fact much higher than the land, even though this isn't immediately obvious. This leads to local exploding "fish" being able to jump onto player from above (as they always float on top of water) easily destroying weaker mechoses; also confusing is the scenario when player goes to the artifact island here and returns to see the Passage island being flooded (whereas it was just redrawn properly). After this fix player will properly see the flooded island right from the start and fish wouldn't be able to harm them, because they're floating far above the player (unless the player tries to jump above).

@caiiiycuk
Copy link
Contributor

А если код дублируется, может его в функцию выенсти?

@Aidoneus
Copy link
Contributor Author

А если код дублируется, может его в функцию выенсти?

Да, ты прав. Попробую вынести

@stalkerg
Copy link
Contributor

stalkerg commented Jul 2, 2023

Okey looks good, but yeah, please move duplicate code into a function. It's too big for a duplicate.

@stalkerg stalkerg self-requested a review July 2, 2023 09:40
Copy link
Contributor

@stalkerg stalkerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stalkerg stalkerg merged commit 7d1801e into KranX:master Jul 2, 2023
@Aidoneus Aidoneus deleted the fix_158 branch July 2, 2023 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants