Mirroring levels. Mirroring the wall geometry works, but ruins and background sprites are not placed at the correct positions yet.

This commit is contained in:
Joonas Rikkonen
2018-07-27 10:36:52 +03:00
parent ce18309a78
commit aa5b2a973e
4 changed files with 144 additions and 30 deletions
@@ -231,6 +231,8 @@ namespace Barotrauma
Rand.Range(0.0f, level.Size.X, Rand.RandSync.Server),
Rand.Range(0.0f, level.Size.Y, Rand.RandSync.Server));
if (level.Mirrored) randomPos.X = level.Size.X - randomPos.X;
if (prefab.SpawnPos == BackgroundSpritePrefab.SpawnPosType.None) return randomPos;
List<GraphEdge> edges = new List<GraphEdge>();