Unstable v0.19.3.0

This commit is contained in:
Juan Pablo Arce
2022-09-02 15:10:56 -03:00
parent 28789616bd
commit 3f2c843247
336 changed files with 7152 additions and 7739 deletions
@@ -759,7 +759,7 @@ namespace Barotrauma
for (int i = start; i < end; i++)
{
msg.WriteRangedSingle(BackgroundSections[i].ColorStrength, 0.0f, 1.0f, 8);
msg.Write(BackgroundSections[i].Color.PackedValue);
msg.WriteUInt32(BackgroundSections[i].Color.PackedValue);
}
}
#endregion
@@ -994,7 +994,11 @@ namespace Barotrauma
foreach (var gap in ConnectedGaps.Where(gap => gap.Open > 0))
{
var distance = MathHelper.Max(Vector2.DistanceSquared(item.Position, gap.Position) / 1000, 1f);
item.body.ApplyForce((gap.LerpedFlowForce / distance) * deltaTime);
Vector2 force = (gap.LerpedFlowForce / distance) * deltaTime;
if (force.LengthSquared() > 0.01f)
{
item.body.ApplyForce(force);
}
}
}
@@ -1545,7 +1549,7 @@ namespace Barotrauma
var hull = new Hull(rect, submarine, idRemap.GetOffsetId(element))
{
WaterVolume = element.GetAttributeFloat("pressure", 0.0f)
WaterVolume = element.GetAttributeFloat("water", 0.0f)
};
hull.linkedToID = new List<ushort>();