fix: using unused cell flag to toggle ISS#1082
Conversation
WalkthroughThe changes update the logic for determining whether an interior cell has sunlight shadows by introducing a new flag check and centralizing this logic in the Changes
Sequence Diagram(s)sequenceDiagram
participant VolumetricLighting
participant InteriorSunShadows
participant TESObjectCELL
VolumetricLighting->>TESObjectCELL: Get interiorCell
VolumetricLighting->>InteriorSunShadows: IsInteriorWithSun(interiorCell)
InteriorSunShadows->>TESObjectCELL: Check cellFlags for required flags
InteriorSunShadows-->>VolumetricLighting: Return true/false
VolumetricLighting->>VolumetricLighting: Set inInteriorWithSunShadows accordingly
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🧰 Additional context used🧬 Code Graph Analysis (1)src/Features/VolumetricLighting.cpp (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (5)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
✅ A pre-release build is available for this PR: |
Docstrings generation was requested by @alandtse. * #1082 (comment) The following files were modified: * `src/Features/InteriorSunShadows.cpp` * `src/Features/InteriorSunShadows.h` * `src/Features/VolumetricLighting.cpp`
|
Note Generated docstrings for this pull request at #1083 |
alandtse
left a comment
There was a problem hiding this comment.
Should we add to commonlib for others? It's possible to gate by a DLL being present. I'd also double check no one is using it for mods. Maybe step modifications? Are there any common tools that should be modified for this? Niftools? I think hakaspl had to get that modified.
Not sure to be honest, it would at least signify the bit is used in case anybody else using CommonLib needs to hijack one but also means it's building in support for this feature that doesn't exist in the original code. I can't imagine anyone is using this bit for other mods but I wouldn't know where to start checking that either. Activation is gated by four different bits here at least and it does solve the issue with mods that are enabling kShowSky and kUseSkyLighting to use interior weathers for lighting and activating ISS as an unwanted side effect. The only tool that I think would benefit from including this would be xEdit. Both Interior Sun Shadows and Inverse Square Lighting are hijacking spare bits and currently these are just listed as Unknown X in the UI. |
|
Maybe PR to xedit to label the bits? |
alandtse
left a comment
There was a problem hiding this comment.
Can you see the AI generated docstrings PR and see if you should merge in your PR branch? I mean it could be totally wrong.
The required flags including bit 15 can be set in on the cell in xEdit as below:
Summary by CodeRabbit
New Features
Refactor