mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Set sky API: Add bool for clouds in front of custom skybox
Default true. Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API. Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of 'm_visible' (whether normal sky is visible).
This commit is contained in:
parent
f9fdb48dc8
commit
ad9fcf859e
12 changed files with 53 additions and 20 deletions
|
@ -65,10 +65,12 @@ public:
|
|||
return m_visible ? m_skycolor : m_fallback_bg_color;
|
||||
}
|
||||
|
||||
bool getCloudsVisible() { return m_clouds_visible && m_visible; }
|
||||
bool getCloudsVisible() { return m_clouds_visible && m_clouds_enabled; }
|
||||
const video::SColorf &getCloudColor() { return m_cloudcolor_f; }
|
||||
|
||||
void setVisible(bool visible) { m_visible = visible; }
|
||||
// Set only from set_sky API
|
||||
void setCloudsEnabled(bool clouds_enabled) { m_clouds_enabled = clouds_enabled; }
|
||||
void setFallbackBgColor(const video::SColor &fallback_bg_color)
|
||||
{
|
||||
m_fallback_bg_color = fallback_bg_color;
|
||||
|
@ -123,7 +125,8 @@ private:
|
|||
bool m_sunlight_seen;
|
||||
float m_brightness;
|
||||
float m_cloud_brightness;
|
||||
bool m_clouds_visible;
|
||||
bool m_clouds_visible; // Whether clouds are disabled due to player underground
|
||||
bool m_clouds_enabled; // Initialised to true, reset only by set_sky API
|
||||
bool m_directional_colored_fog;
|
||||
video::SColorf m_bgcolor_bright_f;
|
||||
video::SColorf m_skycolor_bright_f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue