CParticleGlobals: Eliminate implicit type conversions

Makes them all explicit for the reader.
This commit is contained in:
Lioncash 2020-04-13 18:44:47 -04:00
parent 2c7d10c4b4
commit 59a788a987
1 changed files with 5 additions and 5 deletions

View File

@ -21,24 +21,24 @@ public:
float m_EmitterTimeReal = 0.f;
void SetEmitterTime(int frame) {
m_EmitterTime = frame;
m_EmitterTimeReal = frame;
m_EmitterTimeReal = float(frame);
}
int m_ParticleLifetime = 0;
float m_ParticleLifetimeReal = 0.f;
void SetParticleLifetime(int frame) {
m_ParticleLifetime = frame;
m_ParticleLifetimeReal = frame;
m_ParticleLifetimeReal = float(frame);
}
int m_ParticleLifetimePercentage = 0;
float m_ParticleLifetimePercentageReal = 0.f;
float m_ParticleLifetimePercentageRemainder = 0.f;
void UpdateParticleLifetimeTweenValues(int frame) {
float lt = m_ParticleLifetime != 0.0f ? m_ParticleLifetime : 1.0f;
m_ParticleLifetimePercentageReal = 100.0f * frame / lt;
const float lt = m_ParticleLifetime != 0 ? float(m_ParticleLifetime) : 1.0f;
m_ParticleLifetimePercentageReal = 100.0f * float(frame) / lt;
m_ParticleLifetimePercentage = int(m_ParticleLifetimePercentageReal);
m_ParticleLifetimePercentageRemainder = m_ParticleLifetimePercentageReal - m_ParticleLifetimePercentage;
m_ParticleLifetimePercentageRemainder = m_ParticleLifetimePercentageReal - float(m_ParticleLifetimePercentage);
m_ParticleLifetimePercentage = zeus::clamp(0, m_ParticleLifetimePercentage, 100);
}