File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -824,11 +824,26 @@ public MatchConfigurationT LoadMatchConfig(string path)
824824 Fields . MatchStartWithoutCountdown ,
825825 false
826826 ) ;
827- matchConfig . EnableRendering = GetEnum (
828- matchTable ,
829- Fields . MatchRendering ,
830- DebugRendering . OffByDefault
831- ) ;
827+
828+ matchConfig . EnableRendering = DebugRendering . OffByDefault ;
829+ if (
830+ matchTable . TryGetValue ( Fields . MatchRendering , out var raw )
831+ && raw is bool enableRendering
832+ )
833+ {
834+ matchConfig . EnableRendering = enableRendering
835+ ? DebugRendering . OnByDefault
836+ : DebugRendering . AlwaysOff ;
837+ }
838+ else
839+ {
840+ matchConfig . EnableRendering = GetEnum (
841+ matchTable ,
842+ Fields . MatchRendering ,
843+ DebugRendering . OffByDefault
844+ ) ;
845+ }
846+
832847 matchConfig . EnableStateSetting = GetValue (
833848 matchTable ,
834849 Fields . MatchStateSetting ,
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ public void EdgeCases()
9393 ConfigParser parser = new ( ) ;
9494 MatchConfigurationT edgeMC = parser . LoadMatchConfig ( "TestTomls/edge.toml" ) ;
9595
96+ Assert . AreEqual ( DebugRendering . AlwaysOff , edgeMC . EnableRendering ) ;
9697 Assert . AreEqual ( Launcher . Custom , edgeMC . Launcher ) ;
9798 // Ok for parsing, but wil not go through ConfigValidator
9899 Assert . AreEqual ( "something invalid" , edgeMC . LauncherArg ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ launcher_arg = "something invalid"
77[match ]
88game_mode = " Soccar"
99game_map_upk = " Stadium_P"
10+ enable_rendering = false
1011
1112[mutators ]
1213match_length = " TenMinutes"
You can’t perform that action at this time.
0 commit comments