Unstable 0.1300.1.11

This commit is contained in:
Markus Isberg
2021-04-26 21:07:23 +03:00
parent 841d755394
commit 2c750282ec
76 changed files with 671 additions and 396 deletions
@@ -252,6 +252,10 @@ namespace Barotrauma
Vector2 worldPos = saveElement.GetAttributeVector2("worldpos", Vector2.Zero);
if (worldPos != Vector2.Zero)
{
if (GameMain.GameSession != null && GameMain.GameSession.MirrorLevel)
{
worldPos.X = GameMain.GameSession.LevelData.Size.X - worldPos.X;
}
sub.SetPosition(worldPos);
}
else
@@ -417,7 +421,12 @@ namespace Barotrauma
if (leaveBehind)
{
saveElement.SetAttributeValue("location", Level.Loaded.Seed);
saveElement.SetAttributeValue("worldpos", XMLExtensions.Vector2ToString(sub.SubBody.Position));
Vector2 position = sub.SubBody.Position;
if (Level.Loaded.Mirrored)
{
position.X = Level.Loaded.Size.X - position.X;
}
saveElement.SetAttributeValue("worldpos", XMLExtensions.Vector2ToString(position));
}
else
{