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:
@@ -868,7 +868,7 @@ namespace Barotrauma
|
||||
if (CurrentHull != null)
|
||||
{
|
||||
float floor = CurrentHull.Rect.Y - CurrentHull.Rect.Height;
|
||||
float waterLevel = (floor + CurrentHull.Volume / CurrentHull.Rect.Width);
|
||||
float waterLevel = floor + CurrentHull.WaterVolume / CurrentHull.Rect.Width;
|
||||
|
||||
//forceFactor is 1.0f if the item is completely submerged,
|
||||
//and goes to 0.0f as the item goes through the surface
|
||||
|
||||
Reference in New Issue
Block a user