- fixed submarine selection resetting when switching to netlobbyscreen

- fixed EntityGrid IndexOutOfRangeException
- fixed AssignJobs() ignoring the highest job preference
This commit is contained in:
Regalis
2016-06-07 16:57:58 +03:00
parent 9689ef070d
commit 8f8f1ed7dc
3 changed files with 11 additions and 6 deletions

View File

@@ -40,9 +40,9 @@ namespace Barotrauma
return;
}
for (int x = Math.Max(indices.X, 0); x <= Math.Min(indices.Width, entities.GetLength(0)); x++)
for (int x = Math.Max(indices.X, 0); x <= Math.Min(indices.Width, entities.GetLength(0)-1); x++)
{
for (int y = Math.Max(indices.Y,0); y <= Math.Min(indices.Height, entities.GetLength(1)); y++)
for (int y = Math.Max(indices.Y,0); y <= Math.Min(indices.Height, entities.GetLength(1)-1); y++)
{
entities[x, y].Add(entity);
}