(49c530dbd) Fixed turrets not working if they're placed inside the submarine - a request from a sub builder who couldn't get indoors torpedo tubes to work :)

This commit is contained in:
Joonas Rikkonen
2019-03-30 15:34:14 +02:00
parent 267cdacbb4
commit 7a32e07298

View File

@@ -356,7 +356,7 @@ namespace Barotrauma.Items.Components
projectile.body.ResetDynamics();
projectile.body.Enabled = true;
projectile.SetTransform(ConvertUnits.ToSimUnits(new Vector2(item.WorldRect.X + transformedBarrelPos.X, item.WorldRect.Y - transformedBarrelPos.Y)), -rotation);
projectile.FindHull();
projectile.UpdateTransform();
projectile.Submarine = projectile.body.Submarine;
Projectile projectileComponent = projectile.GetComponent<Projectile>();