Progress + prettier ice walls

This commit is contained in:
Regalis
2015-12-12 13:44:05 +02:00
parent 78bccca4af
commit 17e8a2171f
49 changed files with 479 additions and 273 deletions
@@ -98,6 +98,10 @@ namespace Barotrauma.Items.Components
public override void Update(float deltaTime, Camera cam)
{
base.Update(deltaTime, cam);
if (item.CurrentHull != null)
{
//light.Submarine = item.CurrentHull.Submarine;
}
if (item.container != null)
{
@@ -107,7 +111,7 @@ namespace Barotrauma.Items.Components
if (item.body != null)
{
light.Position = ConvertUnits.ToDisplayUnits(item.body.SimPosition);
light.Position = item.WorldPosition;
}
if (powerConsumption == 0.0f)
@@ -121,7 +125,7 @@ namespace Barotrauma.Items.Components
if (Rand.Range(0.0f, 1.0f) < 0.05f && voltage < Rand.Range(0.0f, minVoltage))
{
if (voltage > 0.1f) sparkSounds[Rand.Int(sparkSounds.Length)].Play(1.0f, 400.0f, item.Position);
if (voltage > 0.1f) sparkSounds[Rand.Int(sparkSounds.Length)].Play(1.0f, 400.0f, item.WorldPosition);
lightBrightness = 0.0f;
}
else