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:
@@ -229,9 +229,9 @@ namespace Barotrauma.Particles
|
||||
bool gapFound = false;
|
||||
foreach (Gap gap in hullGaps)
|
||||
{
|
||||
if (gap.isHorizontal != (collisionNormal.X != 0.0f)) continue;
|
||||
if (gap.IsHorizontal != (collisionNormal.X != 0.0f)) continue;
|
||||
|
||||
if (gap.isHorizontal)
|
||||
if (gap.IsHorizontal)
|
||||
{
|
||||
if (gap.WorldRect.Y < position.Y || gap.WorldRect.Y - gap.WorldRect.Height > position.Y) continue;
|
||||
int gapDir = Math.Sign(gap.WorldRect.Center.X - currentHull.WorldRect.Center.X);
|
||||
|
||||
Reference in New Issue
Block a user