fix(terrain helper): Fix for nullptr lookup and running without plugin#1176
Conversation
WalkthroughA boolean Changes
Sequence Diagram(s)sequenceDiagram
participant Game as Game Engine
participant TerrainHelper as TerrainHelper
Game->>TerrainHelper: DataLoaded()
TerrainHelper->>TerrainHelper: Check for "LandscapeDefault" texture set
alt Texture set found
TerrainHelper->>TerrainHelper: enabled = true
else Texture set not found
TerrainHelper->>TerrainHelper: enabled = false
TerrainHelper->>Game: Log warning
end
Game->>TerrainHelper: TESObjectLAND_SetupMaterial()
alt enabled == false
TerrainHelper-->>Game: Return early (no processing)
else enabled == true
TerrainHelper->>TerrainHelper: Proceed with material setup
end
Game->>TerrainHelper: BSLightingShader_SetupMaterial()
alt enabled == false
TerrainHelper-->>Game: Return early (no processing)
else enabled == true
TerrainHelper->>TerrainHelper: Proceed with material setup
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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
Documentation and Community
|
|
✅ A pre-release build is available for this PR: |
community-shaders#1176) * fix(terrain helper): Remove potential nullptr lookup that is not needed * fix(terrain helper): Terrain helper will disable itself if its plugin is not found * fix(terrain helper): included missing log message for terrain helper missing
community-shaders#1176) * fix(terrain helper): Remove potential nullptr lookup that is not needed * fix(terrain helper): Terrain helper will disable itself if its plugin is not found * fix(terrain helper): included missing log message for terrain helper missing
This PR fixes 2 things:
In the future I would like to unify the default texture set system with PBR but need to do this in a non-breaking way to existing PBR terrain mods so I will think about that some more.
Summary by CodeRabbit
New Features
Bug Fixes