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

Doom/Heretic: A11y Flickering - Correct Lightlevel in case of competing Strobe Thinkers #1253

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

Noseey
Copy link

@Noseey Noseey commented Jan 2, 2025

Related Issue:
None - I can open one if required.

Bug description

Observed behavior:
In Heretic E1M6 (Hall with Dragonclaw) I still noticed flickering, even though it was disabled in the accessibility menu. After having a look at the map in Doom-Builder, there are trigger based actions to spawn strobelights for 4 linedefs refering the same sectors (97, 116). When a strobelight is spawned, the current sector lightlevel is stored in the maxlight. Since those spawns are not done simultaneously (the player triggers them by walking around), the second to forth spawn will take an already modified lightlevel and the maxlight will thus be "incorrect". Afterwards, they overwrite the sector lightlevel with their maxlights and thus reintroduce a strobing effect.

Expected behavior:
rlightlevel should be the highest maxlight amongst those competitors, both after loading a savegame and during runtime.

Changes Summary

  • I introduced a check when reading back the strobelight in saveg to ensure the highest light value is taken for the sector. Since glow, fire and flash thinkers are only spawned on level setup, they take the correct (unmodified) lightlevel at spawn. The code to restore maxlight during runtime in p_lights has been reverted (if it shall be kept, the above mentioned check needs to be added here aswell - but I think it is not needed anymore).
  • Aligning Heretic with Doom.

grafik

…ed code.

- Fixing flickering glitch when multiple strobe thinkers compete with the same sector-light. (see Heretic E1M6).
- Removal of unrequired code in p_lights (reconstruction of maxlight in p_saveg).
.. other flashers are only spawned on setup-level and thus refer to the same sector-lightlevel.
Copy link
Owner

@fabiangreffrath fabiangreffrath left a comment

Choose a reason for hiding this comment

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

Thank you!

@fabiangreffrath fabiangreffrath merged commit 793aaab into fabiangreffrath:master Jan 3, 2025
6 checks passed
@Noseey Noseey deleted the a11y_Flickering_Fix branch January 4, 2025 19:31
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.

2 participants