Clean up CWorldLight

This commit is contained in:
Phillip Stephens 2017-01-21 15:05:42 -08:00
parent 9c96bf8c54
commit cc9a0f2bbc
1 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,6 @@ std::tuple<float, float, float> CalculateLightFalloff(EFalloffType falloff, floa
CLight CWorldLight::GetAsCGraphicsLight() const CLight CWorldLight::GetAsCGraphicsLight() const
{ {
zeus::CVector3f float_color = x4_color; zeus::CVector3f float_color = x4_color;
zeus::CColor tmpColor;
float q = x28_q; float q = x28_q;
if (q < FLT_EPSILON) if (q < FLT_EPSILON)
q = 0.000001f; q = 0.000001f;
@ -57,11 +56,12 @@ CLight CWorldLight::GetAsCGraphicsLight() const
} }
else if (x0_type == EWorldLightType::Directional) else if (x0_type == EWorldLightType::Directional)
{ {
return CLight::BuildDirectional(x1c_direction, tmpColor); return CLight::BuildDirectional(x1c_direction, zeus::CColor{x4_color.x, x4_color.y, x4_color.z, 1.f});
} }
else if (x0_type == EWorldLightType::Spot) else if (x0_type == EWorldLightType::Spot)
{ {
CLight light = CLight::BuildSpot(x10_position, x1c_direction.normalized(), tmpColor, x2c_cutoffAngle * .5f); CLight light = CLight::BuildSpot(x10_position, x1c_direction.normalized(),
zeus::CColor{x4_color.x, x4_color.y, x4_color.z, 1.f}, x2c_cutoffAngle * .5f);
float c, l, q; float c, l, q;
std::tie(c, l, q) = CalculateLightFalloff(x3c_falloff, x28_q); std::tie(c, l, q) = CalculateLightFalloff(x3c_falloff, x28_q);