Fixed respawn shuttles with no nav terminal throwing an exception, removing focus from server log searchbar when the log window is closed, clients wait for ongoing file transfers to finish before starting a new one (instead of cancelling)

This commit is contained in:
Regalis
2016-08-10 19:18:50 +03:00
parent 69933188d6
commit 7716b5e9d4
5 changed files with 46 additions and 33 deletions
+7 -22
View File
@@ -2,6 +2,8 @@
using Lidgren.Network;
using Microsoft.Xna.Framework;
using Barotrauma.Networking;
using System.Linq;
using System;
namespace Barotrauma
{
@@ -128,30 +130,13 @@ namespace Barotrauma
public static void DumpIds(int count)
{
List<Entity> e = new List<Entity>();
List<Entity> entities = dictionary.Values.OrderByDescending(e => e.id).ToList();
foreach (Entity ent in dictionary.Values)
count = Math.Min(entities.Count, count);
for (int i = 0; i < count; i++)
{
int index = 0;
for (int i = 0; i < e.Count; i++)
{
if (e[i].id < ent.id)
{
index = i;
break;
}
}
e.Insert(index, ent);
}
int c = 0;
foreach (Entity ent in e)
{
if (c>count) break;
DebugConsole.ThrowError(ent.id+": "+ent.ToString());
c++;
DebugConsole.ThrowError(entities[i].id + ": " + entities[i].ToString());
}
}
}