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)
824
824
Fields . MatchStartWithoutCountdown ,
825
825
false
826
826
) ;
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
+
832
847
matchConfig . EnableStateSetting = GetValue (
833
848
matchTable ,
834
849
Fields . MatchStateSetting ,
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ public void EdgeCases()
93
93
ConfigParser parser = new ( ) ;
94
94
MatchConfigurationT edgeMC = parser . LoadMatchConfig ( "TestTomls/edge.toml" ) ;
95
95
96
+ Assert . AreEqual ( DebugRendering . AlwaysOff , edgeMC . EnableRendering ) ;
96
97
Assert . AreEqual ( Launcher . Custom , edgeMC . Launcher ) ;
97
98
// Ok for parsing, but wil not go through ConfigValidator
98
99
Assert . AreEqual ( "something invalid" , edgeMC . LauncherArg ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ launcher_arg = "something invalid"
7
7
[match ]
8
8
game_mode = " Soccar"
9
9
game_map_upk = " Stadium_P"
10
+ enable_rendering = false
10
11
11
12
[mutators ]
12
13
match_length = " TenMinutes"
You can’t perform that action at this time.
0 commit comments