diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index afeed0d561..844626fde0 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -55,7 +55,7 @@ namespace OpenRA.GameRules return y.NodesDict.ContainsKey( "Versus" ) ? y.NodesDict[ "Versus" ].NodesDict.ToDictionary( a => a.Key, - a => (float)FieldLoader.GetValue( "(value)", typeof( float ), a.Value.Value ) ) + a => FieldLoader.GetValue( "(value)", a.Value.Value ) ) : new Dictionary(); } } diff --git a/OpenRA.Game/Widgets/ChromeMetrics.cs b/OpenRA.Game/Widgets/ChromeMetrics.cs index d39ea07457..5cd98ef9a7 100644 --- a/OpenRA.Game/Widgets/ChromeMetrics.cs +++ b/OpenRA.Game/Widgets/ChromeMetrics.cs @@ -32,7 +32,7 @@ namespace OpenRA.Widgets public static T Get(string key) { - return (T)FieldLoader.GetValue( key, typeof(T), data[key] ); + return FieldLoader.GetValue( key, data[key] ); } } }