Water flow logic tweaking:

- Less fluctuation, water doesn't constantly flow back and forth through gaps.
- Flowing water pushes characters around much more heavily, and the force is applied to the collider in addition to the limbs.
- Vertical gaps don't push characters up/down unless the character is roughly above/below the gap.

+ Renamed some fields in the hull and gap classes (Volume -> WaterVolume, FullVolume -> Volume, public fields start with a capital letter)
This commit is contained in:
Joonas Rikkonen
2017-10-10 00:34:54 +03:00
parent c444186426
commit f46dc5da28
26 changed files with 190 additions and 203 deletions
@@ -370,7 +370,7 @@ namespace Barotrauma.Tutorials
(commandDoor1.IsOpen || (commandDoor2.IsOpen || commandDoor3.IsOpen)))
{
//prevent the hull from filling up completely and crushing the player
steering.Item.CurrentHull.Volume = Math.Min(steering.Item.CurrentHull.Volume, steering.Item.CurrentHull.FullVolume * 0.9f);
steering.Item.CurrentHull.WaterVolume = Math.Min(steering.Item.CurrentHull.WaterVolume, steering.Item.CurrentHull.Volume * 0.9f);
yield return CoroutineStatus.Running;
}
@@ -589,7 +589,7 @@ namespace Barotrauma.Tutorials
infoBox = CreateInfoFrame("The pump is up and running. Wait for the water to be drained out.");
while (pump.Item.CurrentHull.Volume > 1000.0f)
while (pump.Item.CurrentHull.WaterVolume > 1000.0f)
{
yield return CoroutineStatus.Running;
}