improved harpoon gun, misc ui stuff & bugfixes
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Subsurface
|
||||
//a value between 0.0f-1.0f (0.0 = closed, 1.0f = open)
|
||||
float open;
|
||||
|
||||
//the forces of the water flow which are exerted on physics bodies
|
||||
//the force of the water flow which is exerted on physics bodies
|
||||
Vector2 flowForce;
|
||||
|
||||
Hull flowTargetHull;
|
||||
@@ -384,7 +384,10 @@ namespace Subsurface
|
||||
//lower room is full of water
|
||||
if (hull2.Pressure > hull1.Pressure)
|
||||
{
|
||||
float delta = Math.Min(hull2.Volume - hull2.FullVolume + Hull.MaxCompress / 2.0f, deltaTime * 5000f * sizeModifier);
|
||||
float delta = Math.Min(hull2.Volume - hull2.FullVolume + Hull.MaxCompress / 2.0f, deltaTime * 8000.0f * sizeModifier);
|
||||
|
||||
flowForce = new Vector2(0.0f, Math.Min(hull2.Pressure-hull1.Pressure,500.0f));
|
||||
|
||||
delta = Math.Max(delta, 0.0f);
|
||||
hull1.Volume += delta;
|
||||
hull2.Volume -= delta;
|
||||
@@ -398,12 +401,13 @@ namespace Subsurface
|
||||
// //water1.WaveY[posX] = delta;
|
||||
// water1.WaveVel[posX] = delta * 0.01f;
|
||||
//}
|
||||
|
||||
if (hull1.Volume > hull1.FullVolume)
|
||||
{
|
||||
hull1.Pressure = Math.Max(hull1.Pressure, (hull1.Pressure + hull2.Pressure) / 2);
|
||||
}
|
||||
|
||||
flowForce = new Vector2(0.0f, delta);
|
||||
|
||||
|
||||
}
|
||||
//there's water in the upper room, drop to lower
|
||||
|
||||
Reference in New Issue
Block a user