File tree 1 file changed +11
-7
lines changed
Templates/BaseGame/game/core
1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -43,20 +43,24 @@ function initLightingSystems(%manager)
43
43
44
44
// Try to initialize the selected light manager directly
45
45
// If this fails, try to initialize the light managers in order from most to least preferable
46
- if ( ! setLightManager ( % manager ) )
46
+ if ( setLightManager ( % manager ) )
47
+ {
48
+ return true ;
49
+ }
50
+ else
47
51
{
48
52
for ( % i = 0 ; % i < getFieldCount ( $lightManager ::defaults ) ; % i ++ )
49
53
{
50
54
% success = setLightManager ( getField ( $lightManager ::defaults , % i ) ) ;
51
55
52
56
if ( % success )
53
- return;
54
- }
57
+ return true;
58
+ }
59
+
60
+ // If we completely failed to initialize a light
61
+ // manager then the 3d scene cannot be rendered.
62
+ quitWithErrorMessage ( "Failed to set a light manager!" ) ;
55
63
}
56
-
57
- // If we completely failed to initialize a light
58
- // manager then the 3d scene cannot be rendered.
59
- quitWithErrorMessage ( "Failed to set a light manager!" ) ;
60
64
}
61
65
62
66
//---------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments