minor stuff

This commit is contained in:
2023-12-31 12:15:30 +02:00
parent 63d14ce2a9
commit dd5a86a8b7
5 changed files with 236 additions and 5 deletions

View File

@@ -229,7 +229,7 @@ namespace Game
logStream = new StreamWriter(Path.Combine(Directory.GetCurrentDirectory(), logFilename), false);
#endif
}
catch (Exception e)
catch (Exception)
{
logFilename = $"console-{++i}.log";
continue;

View File

@@ -25,7 +25,7 @@ namespace Game
Console.Init();
onExit = new InputEvent("Exit");
onExit.Triggered += () =>
onExit.Pressed += () =>
{
if (Console.IsSafeToQuit)
Engine.RequestExit();
@@ -137,7 +137,7 @@ namespace Game
//FlaxEditor.Editor.Instance.PlayModeBegin -= Instance_PlayModeBegin;
LoadConfig();
//GameMode.Connect();
GameModeManager.Init();
WorldStateManager.Init();
//NetworkManager.StartServer();
//GameMode.StartServer(true);

View File

@@ -35,7 +35,7 @@ namespace Game
public override void OnStart()
{
consoleInputEvent = new InputEvent("Console");
consoleInputEvent.Triggered += OnConsoleInputEvent;
consoleInputEvent.Pressed += OnConsoleInputEvent;
FontReference fontReference = new FontReference(ConsoleFont, ConsoleFontSize);
Font fontRaw = fontReference.GetFont();

View File

@@ -123,7 +123,7 @@ namespace Game
Span<byte> bytes = stackalloc byte[Unsafe.SizeOf<PlayerInputState>()];
foreach (ref PlayerInputState state in CollectionsMarshal.AsSpan(buffer))
{
MemoryMarshal.Write(bytes, ref state);
MemoryMarshal.Write(bytes, state);
demoStream.Write(bytes);
}