File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Templates/BaseGame/game/core Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -43,20 +43,24 @@ function initLightingSystems(%manager)
4343
4444 // Try to initialize the selected light manager directly
4545 // 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
4751 {
4852 for ( % i = 0 ; % i < getFieldCount ( $lightManager ::defaults ) ; % i ++ )
4953 {
5054 % success = setLightManager ( getField ( $lightManager ::defaults , % i ) ) ;
5155
5256 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!" ) ;
5563 }
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!" ) ;
6064}
6165
6266//---------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments