Unstable 0.1300.0.5
This commit is contained in:
@@ -1887,7 +1887,9 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
shortestDistSqr = Math.Min(shortestDistSqr, MathUtils.DistanceSquared((double)point.X, (double)point.Y, (double)startPosition.X, (double)startPosition.Y));
|
||||
shortestDistSqr = Math.Min(shortestDistSqr, MathUtils.DistanceSquared((double)point.X, (double)point.Y, (double)startExitPosition.X, (double)borders.Bottom));
|
||||
shortestDistSqr = Math.Min(shortestDistSqr, MathUtils.DistanceSquared((double)point.X, (double)point.Y, (double)endPosition.X, (double)endPosition.Y));
|
||||
shortestDistSqr = Math.Min(shortestDistSqr, MathUtils.DistanceSquared((double)point.X, (double)point.Y, (double)endExitPosition.X, (double)borders.Bottom));
|
||||
distanceField.Add((point, Math.Sqrt(shortestDistSqr)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,7 @@ namespace Barotrauma
|
||||
sl.filePath = filePath;
|
||||
sl.saveElement = doc.Root;
|
||||
sl.saveElement.Name = "LinkedSubmarine";
|
||||
sl.saveElement.SetAttributeValue("filepath", filePath);
|
||||
|
||||
return sl;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,14 @@ namespace Barotrauma
|
||||
if (!Enabled) { return; }
|
||||
if (steps <= 0) { return; }
|
||||
|
||||
IncreaseRadiation(Params.RadiationStep * steps);
|
||||
float increaseAmount = Params.RadiationStep * steps;
|
||||
|
||||
if (Params.MaxRadiation > 0 && Params.MaxRadiation < Amount + increaseAmount)
|
||||
{
|
||||
increaseAmount = Params.MaxRadiation - Amount;
|
||||
}
|
||||
|
||||
IncreaseRadiation(increaseAmount);
|
||||
|
||||
int amountOfOutposts = Map.Locations.Count(location => location.Type.HasOutpost && !location.IsCriticallyRadiated());
|
||||
|
||||
|
||||
@@ -30,6 +30,9 @@ namespace Barotrauma
|
||||
[Serialize(defaultValue: 1f, isSaveable: false, "How much is the radiation affliction increased by while in a radiated zone.")]
|
||||
public float RadiationDamageAmount { get; set; }
|
||||
|
||||
[Serialize(defaultValue: -1.0f, isSaveable: false, "Maximum amount of radiation.")]
|
||||
public float MaxRadiation { get; set; }
|
||||
|
||||
[Serialize(defaultValue: "139,0,0,85", isSaveable: false, "The color of the radiated area.")]
|
||||
public Color RadiationAreaColor { get; set; }
|
||||
|
||||
|
||||
@@ -870,10 +870,10 @@ namespace Barotrauma
|
||||
|
||||
foreach (Item item in Item.ItemList)
|
||||
{
|
||||
if (item.Submarine != submarine || item.CurrentHull == null ||
|
||||
item.body == null || !item.body.Enabled) continue;
|
||||
if (item.Submarine != submarine || item.CurrentHull == null || item.body == null || !item.body.Enabled) { continue; }
|
||||
|
||||
item.body.ApplyLinearImpulse(item.body.Mass * impulse, 10.0f);
|
||||
item.PositionUpdateInterval = 0.0f;
|
||||
}
|
||||
|
||||
float dmg = applyDamage ? impact * ImpactDamageMultiplier : 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user