mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-13 07:57:58 +00:00
- use in-class initialization for FLightDefaults to avoid uninitialized variables in the future.
This commit is contained in:
parent
cced9e014b
commit
522ce59be2
1 changed files with 9 additions and 16 deletions
|
@ -140,12 +140,16 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FName m_Name;
|
FName m_Name;
|
||||||
int m_Args[5];
|
int m_Args[5] = { 0,0,0,0,0 };
|
||||||
double m_Param;
|
double m_Param = 0;
|
||||||
DVector3 m_Pos;
|
DVector3 m_Pos = { 0,0,0 };
|
||||||
ELightType m_type;
|
ELightType m_type;
|
||||||
int8_t m_attenuate;
|
int8_t m_attenuate = -1;
|
||||||
bool m_subtractive, m_additive, m_halo, m_dontlightself, m_dontlightactors;
|
bool m_subtractive = false;
|
||||||
|
bool m_additive = false;
|
||||||
|
bool m_halo = false;
|
||||||
|
bool m_dontlightself = false;
|
||||||
|
bool m_dontlightactors = false;
|
||||||
bool m_swapped = false;
|
bool m_swapped = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -161,17 +165,6 @@ FLightDefaults::FLightDefaults(FName name, ELightType type)
|
||||||
{
|
{
|
||||||
m_Name = name;
|
m_Name = name;
|
||||||
m_type = type;
|
m_type = type;
|
||||||
|
|
||||||
m_Pos.Zero();
|
|
||||||
memset(m_Args, 0, sizeof(m_Args));
|
|
||||||
m_Param = 0;
|
|
||||||
|
|
||||||
m_subtractive = false;
|
|
||||||
m_additive = false;
|
|
||||||
m_halo = false;
|
|
||||||
m_dontlightself = false;
|
|
||||||
m_dontlightactors = false;
|
|
||||||
m_attenuate = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FLightDefaults::ApplyProperties(ADynamicLight * light) const
|
void FLightDefaults::ApplyProperties(ADynamicLight * light) const
|
||||||
|
|
Loading…
Reference in a new issue