water ambience sounds change according to speed, oxygengenerator fills oxygen tanks even if their condition is 0, submarine refactoring & bugfixes, wire node editing bugfixes

This commit is contained in:
Regalis
2015-09-24 15:21:10 +03:00
parent f6966f06c3
commit bf7619bcc4
33 changed files with 635 additions and 490 deletions
+17
View File
@@ -40,6 +40,13 @@ namespace Subsurface
get { return flowForce*soundVolume; }
}
public Vector2 LerpedFlowForce
{
get { return lerpedFlowForce; }
}
private Vector2 lerpedFlowForce;
public Hull FlowTargetHull
{
get { return flowTargetHull; }
@@ -178,6 +185,14 @@ namespace Subsurface
public override void Draw(SpriteBatch sb, bool editing)
{
if (GameMain.DebugDraw)
{
Vector2 center = new Vector2(rect.X + rect.Width / 2.0f, -(rect.Y - rect.Width / 2.0f));
GUI.DrawLine(sb, center, center + flowForce/10.0f, Color.Red);
GUI.DrawLine(sb, center + Vector2.One * 5.0f, center + lerpedFlowForce / 10.0f + Vector2.One * 5.0f, Color.Orange);
}
if (!editing) return;
Color clr = (open == 0.0f) ? Color.Red : Color.Cyan;
@@ -251,6 +266,8 @@ namespace Subsurface
UpdateRoomToRoom(deltaTime);
}
lerpedFlowForce = Vector2.Lerp(lerpedFlowForce, flowForce, 0.1f);
if (FlowForce.Length() > 150.0f && flowTargetHull != null && flowTargetHull.Volume < flowTargetHull.FullVolume)
{
//UpdateFlowForce();