- RepairTools work for structures that are outside the submarine
- Ruins are visible in sonar - Fixed ruin generation algorithm occasionally creating too narrow rooms and placing corridors so that they're blocked by corners of a room - Fix for wall textures being misaligned for map cells with no physics body
This commit is contained in:
@@ -28,6 +28,11 @@ namespace Barotrauma.RuinGeneration
|
||||
protected set;
|
||||
}
|
||||
|
||||
public Vector2 Center
|
||||
{
|
||||
get { return rect.Center.ToVector2(); }
|
||||
}
|
||||
|
||||
public List<Line> Walls;
|
||||
|
||||
public virtual void CreateWalls() { }
|
||||
@@ -170,6 +175,11 @@ namespace Barotrauma.RuinGeneration
|
||||
get { return allShapes; }
|
||||
}
|
||||
|
||||
public List<Line> Walls
|
||||
{
|
||||
get { return walls; }
|
||||
}
|
||||
|
||||
public Rectangle Area
|
||||
{
|
||||
get;
|
||||
@@ -207,7 +217,7 @@ namespace Barotrauma.RuinGeneration
|
||||
|
||||
for (int i = 0; i < iterations; i++)
|
||||
{
|
||||
rooms.ForEach(l => l.Split(0.3f, verticalProbability));
|
||||
rooms.ForEach(l => l.Split(0.3f, verticalProbability, 300));
|
||||
|
||||
rooms = baseRoom.GetLeaves();
|
||||
}
|
||||
@@ -340,6 +350,11 @@ namespace Barotrauma.RuinGeneration
|
||||
(int)((wall.B.X - wall.A.X) + radius*2.0f),
|
||||
(int)((wall.B.Y - wall.A.Y) + radius*2.0f));
|
||||
|
||||
if (wall.A.Y == wall.B.Y)
|
||||
{
|
||||
rect.Inflate(-32, 0);
|
||||
}
|
||||
|
||||
var structure = new Structure(rect, structurePrefab.Prefab as StructurePrefab, null);
|
||||
structure.MoveWithLevel = true;
|
||||
structure.SetCollisionCategory(Physics.CollisionLevel);
|
||||
|
||||
Reference in New Issue
Block a user