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

Bright as day during the night #1381

Closed
Izicata opened this issue Jun 4, 2013 · 5 comments

Comments

Projects
None yet
4 participants
@Izicata
Copy link
Contributor

commented Jun 4, 2013

Once the day to night dimming effect has finished, the light level will snap back to full-daylight, as if it were still day. When the sun rises, the light level snaps to full darkness , then the night-to-day undimming effect occurs.

@ethankaminski

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2013

Seems to be reproducible, but not necessarily reliably. I've also only seen it with non-default start times.

@Stevensonz

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2013

yeah when I play with time not as default it will do it 100% of the time and mess-up with sleeping unless your underground.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Jun 5, 2013

Did some debugging on this, probably related so some changes I made to
game::light_level(), which seems to be returning 255, but I'm not at all
sure how that's happening, probably just missing something dumb in there.
On Jun 4, 2013 6:47 PM, "Izicata" notifications@github.com wrote:

Once the day to night dimming effect has finished, the light level will
snap back to full-daylight, as if it were still day. When the sun rises,
the light level snaps to full darkness , then the night-to-day undimming
effect occurs.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1381
.

@Stevensonz

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2013

Made the start time default again but bug still happens no matter what starting time. It's a bit hard to sleep right now unless you sleep in a basement because of the light that wakes you up.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Jun 5, 2013

Oh.. that's it...
When sunlight reaches 0, and weather.light_modifier is 2+ (cloudy, hence
why it didn't always happen), the value is -1, which is cast to unsigned
char when it's returned, which evals to 255.
The blame is mine, commit 28b1bb5 accidentally removed a if(ret < 1) ret
= 1; check along with some other manipulations.
In my defense that was pretty fragile :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.