v0.14.6.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user