Unstable 0.15.11.0 + the last 2 unstables I missed

This commit is contained in:
Markus Isberg
2021-10-27 03:22:53 +09:00
parent fc2f7b76da
commit 6b84ff65e3
71 changed files with 479 additions and 479 deletions
@@ -1323,7 +1323,7 @@ namespace Barotrauma
}
Submarine = parentInventory.Owner.Submarine;
if (body != null) body.Submarine = Submarine;
if (body != null) { body.Submarine = Submarine; }
return CurrentHull;
}
@@ -1733,10 +1733,18 @@ namespace Barotrauma
public void UpdateTransform()
{
if (body == null) { return; }
Submarine prevSub = Submarine;
FindHull();
var projectile = GetComponent<Projectile>();
if (projectile?.StickTarget?.UserData is Limb limb)
{
Submarine = body.Submarine = limb.character?.Submarine;
currentHull = limb.character?.CurrentHull;
}
else
{
FindHull();
}
if (Submarine == null && prevSub != null)
{
@@ -1814,6 +1822,12 @@ namespace Barotrauma
{
if (transformDirty) { return false; }
var projectile = GetComponent<Projectile>();
if (projectile?.IgnoredBodies != null)
{
if (projectile.IgnoredBodies.Contains(f2.Body)) { return false; }
}
contact.GetWorldManifold(out Vector2 normal, out _);
if (contact.FixtureA.Body == f1.Body) { normal = -normal; }
float impact = Vector2.Dot(f1.Body.LinearVelocity, -normal);