low pass filter to sounds playing at distance, "armored" limbs, moved playing damagesounds from attack to IDamageable

This commit is contained in:
Regalis
2015-06-01 22:20:17 +03:00
parent 95c0d41023
commit 1f42e4a4db
32 changed files with 331 additions and 175 deletions

View File

@@ -200,8 +200,12 @@ namespace Subsurface
public static object GetAttributeObject(XAttribute attribute)
{
if (attribute == null) return null;
string value = attribute.Value.ToString();
return ParseToObject(attribute.Value.ToString());
}
public static object ParseToObject(string value)
{
float floatVal;
int intVal;
if (value.ToString().Contains(".") && float.TryParse(value, NumberStyles.Float, CultureInfo.InvariantCulture, out floatVal))