mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-16 22:30:42 +02:00
Additional protection for mode.
This commit is contained in:
parent
d01ecb71df
commit
0f519da76e
1 changed files with 8 additions and 3 deletions
|
@ -13,6 +13,7 @@
|
|||
#include <glm/gtx/transform.hpp>
|
||||
#include <math.h>
|
||||
#include <qcompilerdetection.h>
|
||||
#include <ComponentMode.h>
|
||||
|
||||
using namespace model;
|
||||
|
||||
|
@ -256,8 +257,12 @@ void SunSkyStage::setSkybox(const SkyboxPointer& skybox) {
|
|||
invalidate();
|
||||
}
|
||||
|
||||
// Haze
|
||||
void SunSkyStage::setHazeMode(uint32_t mode) {
|
||||
_hazeMode = mode;
|
||||
void SunSkyStage::setHazeMode(uint32_t hazeMode) {
|
||||
if (hazeMode < COMPONENT_MODE_ITEM_COUNT) {
|
||||
_hazeMode = hazeMode;
|
||||
} else {
|
||||
_hazeMode = 0;
|
||||
}
|
||||
|
||||
invalidate();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue