mirror of https://github.com/axmolengine/axmol.git
avoid the case that "hasAmbient" use before assign
This commit is contained in:
parent
16ce7ac50f
commit
da8dc13601
|
@ -460,7 +460,7 @@ void MeshCommand::setLightUniforms()
|
|||
else // normal does not exist
|
||||
{
|
||||
Vec3 ambient(0.0f, 0.0f, 0.0f);
|
||||
bool hasAmbient;
|
||||
bool hasAmbient = false;
|
||||
for (const auto& light : lights)
|
||||
{
|
||||
if (light->getLightType() == LightType::AMBIENT)
|
||||
|
|
Loading…
Reference in New Issue