Skip to content

Commit

Permalink
Fix for dumb logic error
Browse files Browse the repository at this point in the history
  • Loading branch information
chaigler committed Jan 25, 2018
1 parent 5145ef3 commit d3f8120
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions Templates/BaseGame/game/core/lighting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,24 @@ function initLightingSystems(%manager)

// Try to initialize the selected light manager directly
// If this fails, try to initialize the light managers in order from most to least preferable
if (!setLightManager(%manager))
if (setLightManager(%manager))
{
return true;
}
else
{
for(%i = 0; %i < getFieldCount($lightManager::defaults); %i++)
{
%success = setLightManager(getField($lightManager::defaults, %i));

if (%success)
return;
}
return true;
}

// If we completely failed to initialize a light
// manager then the 3d scene cannot be rendered.
quitWithErrorMessage( "Failed to set a light manager!" );
}

// If we completely failed to initialize a light
// manager then the 3d scene cannot be rendered.
quitWithErrorMessage( "Failed to set a light manager!" );
}

//---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit d3f8120

Please sign in to comment.