diff --git a/ClassicalSharp/Game/Game.cs b/ClassicalSharp/Game/Game.cs index f21762c50..0dc25fc6a 100644 --- a/ClassicalSharp/Game/Game.cs +++ b/ClassicalSharp/Game/Game.cs @@ -48,10 +48,10 @@ namespace ClassicalSharp { #else Graphics = new Direct3D9Api( this ); #endif - Graphics.MakeGraphicsInfo(); - Players = new EntityList( this ); + Graphics.MakeGraphicsInfo(); Options.Load(); + Players = new EntityList( this ); AcceptedUrls.Load(); DeniedUrls.Load(); ViewDistance = Options.GetInt( OptionsKey.ViewDist, 16, 4096, 512 ); UserViewDistance = ViewDistance; diff --git a/ClassicalSharp/Utils/Options.cs b/ClassicalSharp/Utils/Options.cs index a83638cca..567c0878a 100644 --- a/ClassicalSharp/Utils/Options.cs +++ b/ClassicalSharp/Utils/Options.cs @@ -107,7 +107,7 @@ namespace ClassicalSharp { } public static T GetEnum( string key, T defValue ) { - string value = Options.Get( key.ToLower() ); + string value = Get( key.ToLower() ); if( value == null ) { Set( key, defValue ); return defValue; @@ -115,7 +115,7 @@ namespace ClassicalSharp { T mapping; if( !Utils.TryParseEnum( value, defValue, out mapping ) ) - Options.Set( key, defValue ); + Set( key, defValue ); return mapping; } diff --git a/ClassicalSharp/Utils/Utils.cs b/ClassicalSharp/Utils/Utils.cs index ad89e8a38..6e0615423 100644 --- a/ClassicalSharp/Utils/Utils.cs +++ b/ClassicalSharp/Utils/Utils.cs @@ -134,7 +134,7 @@ namespace ClassicalSharp { public static bool TryParseEnum( string value, T defValue, out T result ) { T mapping; try { - mapping = (T)Enum.Parse( typeof( T ), value, true ); + mapping = (T)Enum.Parse( typeof(T), value, true ); } catch( ArgumentException ) { result = defValue; return false;