2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 23:47:43 +00:00

const_cast refactor

This commit is contained in:
Jack Andersen
2016-08-28 18:22:54 -10:00
parent e2f342d107
commit 0aaeed2aeb
15 changed files with 26 additions and 30 deletions

View File

@@ -29,11 +29,11 @@ float CLight::GetIntensity() const
{
if (x4c_24_intensityDirty)
{
((CLight*)this)->x4c_24_intensityDirty = false;
const_cast<CLight*>(this)->x4c_24_intensityDirty = false;
float coef = 1.f;
if (x1c_type == ELightType::Custom)
coef = x30_angleC;
((CLight*)this)->x48_cachedIntensity =
const_cast<CLight*>(this)->x48_cachedIntensity =
coef * std::max(x18_color.r, std::max(x18_color.g, x18_color.b));
}
return x48_cachedIntensity;