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

Finish the implementation of translucency #77534

Open
PatrikLundell opened this issue Nov 2, 2024 · 0 comments
Open

Finish the implementation of translucency #77534

PatrikLundell opened this issue Nov 2, 2024 · 0 comments
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@PatrikLundell
Copy link
Contributor

PatrikLundell commented Nov 2, 2024

Describe the bug

#77532 deals with one case of missing implementation of handling of the introduction of the translucency flag.
A remaining result is that opening a translucent door and then closing it again causes the revealed area on the other side of the door to remain visible for one tick.

Note that the reproduction steps below cannot be repeated until #77532 has been merged, as fixing issues with opening the door is required to see there are issues with closing it.

However, that is likely to be the tip of the iceberg, as there is little special handling of translucency, so translucent terrain is generally treated as if it was transparent.

  • There is code using map::is_translucent and variants of it. These operations treats translucency identically to transparency. Some of these usages probably should distinguish between the two, for instance operations that check if creatures can see each other.
  • There are also a lot of checks directly against the transparency cache, and this again, means translucent is treated identically to transparent, which is probably not correct in a number of usages.

Attach save file

Use the one from #77521.

Steps to reproduce

  1. Load the save.
  2. Open the door in front of the PC.
  3. Close the door again.
  4. See that the area outside the door is still revealed.
  5. Wait a tick (or do anything else).
  6. See the revealed area is hidden (as it should have been as soon as the door was closed).
  7. Go through the door and to the right and repeat the steps above with a steel door.
  8. Verify that the area on the other side is revealed and hidden in sync with the door opening and closing, without any delay.
  9. Restart the save.
  10. debug spawn a crawling zombie (very slow) at the other side of the corridor outside the closed door.
  11. Open the door.
  12. See the zombie.
  13. Close the door.
  14. See the area outside, but not the zombie. Note that a zombie presence is still marked on the mini map.
  15. Try to move south.
  16. Get blocked by a warning about seeing a zombie.

Note: The above seems somewhat inconsistent. Moving before opening and closing the door seems to cause it to somehow act correctly, both with visibility and zombie detection.

Expected behavior

The immediate correction would be that closing a translucent (e.g. frosted) door should hide the area beyond it immediately, without a delay of one tick.

The broader correction would be to ensure the missing special handling of translucency is added to all the places where it should be present

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19045.5011 (22H2)
  • Game Version: 0.G-13309-g55335a2efb-dirty [64-bit] (the code of dirty caches on translucency change #77532)
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

Additional context

No response

@PatrikLundell PatrikLundell added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

No branches or pull requests

1 participant