Dust particles are drawn in the same batch as the background sprites (-> far-away particles are rendered behind the sprites), limiting character name length in the crew info menu, the "submarine not found in your folder" -tooltip is updated after downloading a sub file

This commit is contained in:
Regalis
2016-10-29 15:38:29 +03:00
parent 72178d4b1f
commit 5cc605bc01
4 changed files with 10 additions and 16 deletions

View File

@@ -998,21 +998,21 @@ namespace Barotrauma.Networking
switch (receiver.FileType)
{
case FileTransferMessageType.Submarine:
Submarine.SavedSubmarines.RemoveAll(s => s.Name + ".sub" == receiver.FileName);
Submarine.SavedSubmarines.RemoveAll(s => s.Name + ".sub" == receiver.FileName);
for (int i = 0; i<2; i++)
{
var textBlock = (i == 0) ?
var textBlock = ((i == 0) ?
GameMain.NetLobbyScreen.ShuttleList.ListBox.children.Find(c => (c.UserData as Submarine).Name+".sub" == receiver.FileName) :
GameMain.NetLobbyScreen.SubList.children.Find(c => (c.UserData as Submarine).Name+".sub" == receiver.FileName);
GameMain.NetLobbyScreen.SubList.children.Find(c => (c.UserData as Submarine).Name+".sub" == receiver.FileName)) as GUITextBlock;
if (textBlock == null) continue;
(textBlock as GUITextBlock).TextColor = Color.White;
textBlock.TextColor = Color.White;
var newSub = new Submarine(receiver.FilePath);
Submarine.SavedSubmarines.Add(newSub);
textBlock.UserData = newSub;
textBlock.ToolTip = newSub.Description;
}
break;