File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public class ClientConfiguration
21
21
private const string CLIENT_SETTINGS = "DTACnCNetClient.ini" ;
22
22
private const string GAME_OPTIONS = "GameOptions.ini" ;
23
23
private const string CLIENT_DEFS = "ClientDefinitions.ini" ;
24
+ private const string NETWORK_DEFS_LOCAL = "NetworkDefinitions.local.ini" ;
24
25
private const string NETWORK_DEFS = "NetworkDefinitions.ini" ;
25
26
26
27
private static ClientConfiguration _instance ;
@@ -48,7 +49,17 @@ protected ClientConfiguration()
48
49
49
50
gameOptions_ini = new IniFile ( SafePath . CombineFilePath ( baseResourceDirectory . FullName , GAME_OPTIONS ) ) ;
50
51
51
- networkDefinitionsIni = new IniFile ( SafePath . CombineFilePath ( ProgramConstants . GetResourcePath ( ) , NETWORK_DEFS ) ) ;
52
+ string networkDefsPathLocal = SafePath . CombineFilePath ( ProgramConstants . GetResourcePath ( ) , NETWORK_DEFS_LOCAL ) ;
53
+ if ( File . Exists ( networkDefsPathLocal ) )
54
+ {
55
+ networkDefinitionsIni = new IniFile ( networkDefsPathLocal ) ;
56
+ Logger . Log ( "Loaded network definitions from NetworkDefinitions.local.ini (user override)" ) ;
57
+ }
58
+ else
59
+ {
60
+ string networkDefsPath = SafePath . CombineFilePath ( ProgramConstants . GetResourcePath ( ) , NETWORK_DEFS ) ;
61
+ networkDefinitionsIni = new IniFile ( networkDefsPath ) ;
62
+ }
52
63
}
53
64
54
65
/// <summary>
Original file line number Diff line number Diff line change @@ -88,8 +88,6 @@ public static void Initialize(StartupParams parameters)
88
88
if ( ! clientUserFilesDirectory . Exists )
89
89
clientUserFilesDirectory . Create ( ) ;
90
90
91
- MainClientConstants . Initialize ( ) ;
92
-
93
91
Logger . Log ( "***Logfile for " + MainClientConstants . GAME_NAME_LONG + " client***" ) ;
94
92
95
93
string clientVersion = GitVersionInformation . AssemblySemVer ;
@@ -103,6 +101,7 @@ public static void Initialize(StartupParams parameters)
103
101
#if DEVELOPMENT_BUILD
104
102
Logger . Log ( "This is a development build of the client. Stability and reliability may not be fully guaranteed." ) ;
105
103
#endif
104
+ MainClientConstants . Initialize ( ) ;
106
105
107
106
// Log information about given startup params
108
107
if ( parameters . NoAudio )
You can’t perform that action at this time.
0 commit comments