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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user