mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 12:05:14 -04:00
Fix NamesMode not being loaded.
This commit is contained in:
parent
ab2e95d201
commit
20205a42fb
@ -49,9 +49,9 @@ namespace ClassicalSharp {
|
|||||||
Graphics = new Direct3D9Api( this );
|
Graphics = new Direct3D9Api( this );
|
||||||
#endif
|
#endif
|
||||||
Graphics.MakeGraphicsInfo();
|
Graphics.MakeGraphicsInfo();
|
||||||
Players = new EntityList( this );
|
|
||||||
|
|
||||||
Options.Load();
|
Options.Load();
|
||||||
|
Players = new EntityList( this );
|
||||||
AcceptedUrls.Load(); DeniedUrls.Load();
|
AcceptedUrls.Load(); DeniedUrls.Load();
|
||||||
ViewDistance = Options.GetInt( OptionsKey.ViewDist, 16, 4096, 512 );
|
ViewDistance = Options.GetInt( OptionsKey.ViewDist, 16, 4096, 512 );
|
||||||
UserViewDistance = ViewDistance;
|
UserViewDistance = ViewDistance;
|
||||||
|
@ -107,7 +107,7 @@ namespace ClassicalSharp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static T GetEnum<T>( string key, T defValue ) {
|
public static T GetEnum<T>( string key, T defValue ) {
|
||||||
string value = Options.Get( key.ToLower() );
|
string value = Get( key.ToLower() );
|
||||||
if( value == null ) {
|
if( value == null ) {
|
||||||
Set( key, defValue );
|
Set( key, defValue );
|
||||||
return defValue;
|
return defValue;
|
||||||
@ -115,7 +115,7 @@ namespace ClassicalSharp {
|
|||||||
|
|
||||||
T mapping;
|
T mapping;
|
||||||
if( !Utils.TryParseEnum( value, defValue, out mapping ) )
|
if( !Utils.TryParseEnum( value, defValue, out mapping ) )
|
||||||
Options.Set( key, defValue );
|
Set( key, defValue );
|
||||||
return mapping;
|
return mapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ namespace ClassicalSharp {
|
|||||||
public static bool TryParseEnum<T>( string value, T defValue, out T result ) {
|
public static bool TryParseEnum<T>( string value, T defValue, out T result ) {
|
||||||
T mapping;
|
T mapping;
|
||||||
try {
|
try {
|
||||||
mapping = (T)Enum.Parse( typeof( T ), value, true );
|
mapping = (T)Enum.Parse( typeof(T), value, true );
|
||||||
} catch( ArgumentException ) {
|
} catch( ArgumentException ) {
|
||||||
result = defValue;
|
result = defValue;
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user