v0.14.6.0

This commit is contained in:
Joonas Rikkonen
2021-06-17 17:54:52 +03:00
parent 3f324b14e8
commit c27e2ea5ab
348 changed files with 13156 additions and 4266 deletions
@@ -26,6 +26,7 @@ namespace Barotrauma
public static bool ShowFPS = false;
public static bool ShowPerf = false;
public static bool DebugDraw;
public static bool IsSingleplayer => NetworkMember == null;
public static bool IsMultiplayer => NetworkMember != null;
public static PerformanceCounter PerformanceCounter;
@@ -245,6 +246,23 @@ namespace Barotrauma
FarseerPhysics.Settings.PositionIterations = 1;
MainThread = Thread.CurrentThread;
Window.FileDropped += OnFileDropped;
}
public static void OnFileDropped(object sender, FileDropEventArgs args)
{
if (!(Screen.Selected is { } screen)) { return; }
string filePath = args.FilePath;
if (string.IsNullOrWhiteSpace(filePath)) { return; }
string extension = Path.GetExtension(filePath).ToLower();
System.IO.FileInfo info = new System.IO.FileInfo(args.FilePath);
if (!info.Exists) { return; }
screen.OnFileDropped(filePath, extension);
}
public void ApplyGraphicsSettings()
@@ -933,10 +951,7 @@ namespace Barotrauma
Screen.Selected.AddToGUIUpdateList();
if (Client != null)
{
Client.AddToGUIUpdateList();
}
Client?.AddToGUIUpdateList();
SubmarinePreview.AddToGUIUpdateList();
@@ -966,10 +981,7 @@ namespace Barotrauma
}
}
if (NetworkMember != null)
{
NetworkMember.Update((float)Timing.Step);
}
NetworkMember?.Update((float)Timing.Step);
GUI.Update((float)Timing.Step);
}