Taking structure offset from origin into account when spawning the sub, repairtool automatically targets last section if welding the second-to-last
This commit is contained in:
@@ -119,7 +119,10 @@ namespace Barotrauma
|
||||
if (level != null)
|
||||
{
|
||||
level.Generate();
|
||||
submarine.SetPosition(level.StartPosition - new Vector2(0.0f, 2000.0f));
|
||||
|
||||
Vector2 subOffsetFromCenter = new Vector2(Submarine.Borders.Center.X, Submarine.Borders.Y - Submarine.Borders.Height / 2);
|
||||
|
||||
submarine.SetPosition(level.StartPosition - subOffsetFromCenter - new Vector2(0.0f, 2000.0f));
|
||||
|
||||
GameMain.GameScreen.BackgroundCreatureManager.SpawnSprites(80);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user