v0.4.1.3:

- fixed debug message height not being set correctly
- fixed submarine list not being updated if host has enabled "play yourself"
- fixed "queue empty" error when attempting to download a sub from the server
- maximum number of iterations when carving a path for a cave
This commit is contained in:
Regalis
2016-05-27 14:41:34 +03:00
parent 68870b67f5
commit c71a935de6
8 changed files with 64 additions and 12 deletions
@@ -281,6 +281,8 @@ namespace Barotrauma
int currentTargetIndex = 1;
int iterationsLeft = cells.Count;
do
{
int edgeIndex = 0;
@@ -325,13 +327,15 @@ namespace Barotrauma
currentCell.CellType = CellType.Path;
pathCells.Add(currentCell);
iterationsLeft--;
if (currentCell == targetCells[currentTargetIndex])
{
currentTargetIndex += 1;
if (currentTargetIndex >= targetCells.Count) break;
}
} while (currentCell != targetCells[targetCells.Count - 1]);
} while (currentCell != targetCells[targetCells.Count - 1] && iterationsLeft > 0);
Debug.WriteLine("gettooclose: " + sw2.ElapsedMilliseconds + " ms");