Unstable v0.19.3.0
This commit is contained in:
@@ -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>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user