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 at-night lighting by player #27814

Merged
merged 2 commits into from
Jan 24, 2019

Conversation

jbytheway
Copy link
Contributor

@jbytheway jbytheway commented Jan 23, 2019

Summary

SUMMARY: Bugfixes "Fix lighting of exterior walls by player-held light sources at night"

Purpose of change

Player- (and NPC-) held items were performing their lighting updates before natural light falling upon walls. Furthermore, the natural light on exterior wall tiles was setting the natural light value without regard to the previous value.

Consequently, at night player-held items appeared unable to illuminate exterior walls.

Describe the solution

Fix this by correcting the natural light code.

Add a regression test.

Before:
cata-night-light-before
After:
cata-night-light-after

Player- (and npc-) held items were performing their lighting updates
before natural light falling upon walls.  Furthermore, the natural light
on exterior wall tiles was setting the natural light value without
regard to the previous value.

Consequently, at night player-held items appeared unable to illuminate
exterior walls.

Fix this by correcting the natural light code.
Regression test for just-fixed lighting bug.
@jbytheway jbytheway force-pushed the night_light_sources branch from 0a5a6ea to be8f6ce Compare January 23, 2019 23:26
@kevingranade kevingranade merged commit 9572152 into CleverRaven:master Jan 24, 2019
@jbytheway jbytheway deleted the night_light_sources branch January 24, 2019 08:15
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