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:
@@ -154,7 +154,7 @@ namespace Barotrauma
|
||||
DamageCharacters(deltaTime);
|
||||
DamageItems(deltaTime);
|
||||
|
||||
if (hull.Volume > 0.0f) HullWaterExtinquish(deltaTime);
|
||||
if (hull.WaterVolume > 0.0f) HullWaterExtinquish(deltaTime);
|
||||
|
||||
hull.Oxygen -= size.X * deltaTime * OxygenConsumption;
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace Barotrauma
|
||||
size.X -= extinquishAmount;
|
||||
|
||||
//evaporate some of the water
|
||||
hull.Volume -= extinquishAmount;
|
||||
hull.WaterVolume -= extinquishAmount;
|
||||
|
||||
if (GameMain.Client != null) return;
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace Barotrauma
|
||||
position.X += extinquishAmount / 2.0f;
|
||||
size.X -= extinquishAmount;
|
||||
|
||||
hull.Volume -= extinquishAmount;
|
||||
hull.WaterVolume -= extinquishAmount;
|
||||
|
||||
if (GameMain.Client != null) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user