Cargo missions, a menu that shows the mission description mid-round

This commit is contained in:
Regalis
2016-04-16 15:36:01 +03:00
parent 6876bdc481
commit 31a04c7bc1
13 changed files with 327 additions and 42 deletions

View File

@@ -373,7 +373,12 @@ namespace Barotrauma
foreach (VoronoiCell cell in cells)
{
cellGrid[(int)Math.Floor(cell.Center.X / GridCellSize), (int)Math.Floor(cell.Center.Y / GridCellSize)].Add(cell);
int x = (int)Math.Floor(cell.Center.X / GridCellSize);
int y = (int)Math.Floor(cell.Center.Y / GridCellSize);
if (x < 0 || y < 0 || x >= cellGrid.GetLength(0) || y >= cellGrid.GetLength(1)) continue;
cellGrid[x,y].Add(cell);
}