-
Notifications
You must be signed in to change notification settings - Fork 793
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 dimming lights in Leorics chamber #3292
Conversation
This does indeed fix #1410. |
The same thing should happen when Saving and Loading, because there also our torches are loaded with _oVar1 set to 1. But something seems to go another way here because the light sources get added. I'll investigate that further. |
Converting to a draft as it has draft in the title and i keep getting notifications for it when it's being updated. |
... Simply adding Draft: in the title does not work? ...pretty sure in gitlab that does work. So I think the last thing to do would be to check if we are a simple save, in which cases we set all light objects to unseen, or if we are a big save in which case the light objects can be saved as already seen because the lights will also get saved along. Does that sound feasible? |
Yes, but not in github |
I'm unable to think about this atm, catch me in a week or so. |
@AJenbo Take your time. I think this solution now should work, it won't change anything when saving "real savegames" but it will mark all light objects unseen when saving level change data. |
@AJenbo Care to take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just change make torches unseen
to make dynamic light sources unseen
as technically they aren't all torches :D
As usual, you are right @qndel :-) |
Please don't include issue # in commit - it causes quite a spam on github |
…l change data (instead of real save data) does not save light source and if the light objects will be marked as seen there lights won't be created and they stay dark
This definitely feels like a proper fix, but requires some tweaks. Do valor torches behave the same way? Atm this fixes leoric chamber light issues but might cause new ones - in regular dungeons I believe all stuff like torches etc. is saved into dPreLight, with this PR they all get activated even if you aren't close to them. To test: keymapper.AddAction({
"DebugToggle",
'X',
[] {
SDL_Log("ACTIVE LIGHT COUNT: %d", ActiveLightCount);
DebugToggle = !DebugToggle;
},
[&]() { return true; },
}); After leaving leoric's tomb without your change, I had 2 active lights, after your change I instantly had 8+ active lights. So the question is if it should affect regular levels at all - if valor torches work fine, I'd only limit it to quest levels. |
Tested valor, it doesn't need this fix so can safely be limited only to quest levels. |
nice work |
Many thanks @ThomasChr this one PR is really great. |
Fixes #1410