Button&door sounds, sound looping bugfixes, positional sound bugfixes + low pass filter on distant sounds, submarine collision improvements, controller trigger bugfix, humans walk/run more slowly in water

This commit is contained in:
Regalis
2015-10-04 14:49:05 +03:00
parent 46e862216b
commit 0be4ad4f84
66 changed files with 317 additions and 222 deletions
@@ -19,10 +19,16 @@ namespace Subsurface.Items.Components
return (running && item.Condition>0.0f);
}
public float CurrFlow
{
get;
private set;
}
public OxygenGenerator(Item item, XElement element)
: base(item, element)
{
isActive = true;
IsActive = true;
ventList = new List<Vent>();
@@ -34,6 +40,7 @@ namespace Subsurface.Items.Components
{
base.Update(deltaTime, cam);
CurrFlow = 0.0f;
currPowerConsumption = powerConsumption;
if (item.CurrentHull == null) return;
@@ -54,11 +61,11 @@ namespace Subsurface.Items.Components
}
running = true;
float deltaOxygen = Math.Min(voltage, 1.0f) * 50000.0f;
item.CurrentHull.Oxygen += deltaOxygen * deltaTime;
UpdateVents(deltaOxygen);
CurrFlow = Math.Min(voltage, 1.0f) * 50000.0f;
item.CurrentHull.Oxygen += CurrFlow * deltaTime;
UpdateVents(CurrFlow);
voltage = 0.0f;