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:
@@ -315,11 +315,11 @@ namespace Barotrauma
|
||||
{
|
||||
if (hull.Submarine != submarine) continue;
|
||||
|
||||
waterVolume += hull.Volume;
|
||||
volume += hull.FullVolume;
|
||||
waterVolume += hull.WaterVolume;
|
||||
volume += hull.Volume;
|
||||
}
|
||||
|
||||
float waterPercentage = volume==0.0f ? 0.0f : waterVolume / volume;
|
||||
float waterPercentage = volume <= 0.0f ? 0.0f : waterVolume / volume;
|
||||
|
||||
float neutralPercentage = 0.07f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user