From fedd332e0e0af5eb56d0107a9d9e1da38ebc418e Mon Sep 17 00:00:00 2001 From: compujuckel Date: Sat, 14 Sep 2024 14:59:58 +0200 Subject: [PATCH] get rid of some warnings --- .../Network/Packets/Outgoing/CarListResponse.cs | 2 +- AssettoServer/AssettoServer.csproj | 9 ++++++++- AssettoServer/Network/Tcp/ACTcpClient.cs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/AssettoServer.Shared/Network/Packets/Outgoing/CarListResponse.cs b/AssettoServer.Shared/Network/Packets/Outgoing/CarListResponse.cs index 9f038cd6..5fe8bc0f 100644 --- a/AssettoServer.Shared/Network/Packets/Outgoing/CarListResponse.cs +++ b/AssettoServer.Shared/Network/Packets/Outgoing/CarListResponse.cs @@ -7,7 +7,7 @@ public class CarListResponse : IOutgoingNetworkPacket public int PageIndex; public int EntryCarsCount; public required IEnumerable> EntryCars; - public Dictionary CarResults; + public required Dictionary CarResults; public void ToWriter(ref PacketWriter writer) { diff --git a/AssettoServer/AssettoServer.csproj b/AssettoServer/AssettoServer.csproj index 47b962c3..e72482f8 100644 --- a/AssettoServer/AssettoServer.csproj +++ b/AssettoServer/AssettoServer.csproj @@ -10,7 +10,7 @@ embedded enable ..\out-$(RuntimeIdentifier)\ - ERP022,EPC12 + ERP022,EPC12,EPC20 AnyCPU win-x64 linux-x64 @@ -78,6 +78,13 @@ + + diff --git a/AssettoServer/Network/Tcp/ACTcpClient.cs b/AssettoServer/Network/Tcp/ACTcpClient.cs index 2bc34786..2332aa04 100644 --- a/AssettoServer/Network/Tcp/ACTcpClient.cs +++ b/AssettoServer/Network/Tcp/ACTcpClient.cs @@ -778,7 +778,7 @@ private void OnCarListRequest(PacketReader reader) PageIndex = carListRequest.PageIndex, EntryCarsCount = carsInPage.Count, EntryCars = carsInPage, - CarResults = _sessionManager.CurrentSession.Results, + CarResults = _sessionManager.CurrentSession.Results ?? new Dictionary(), }; CarListResponseSending?.Invoke(this, new CarListResponseSendingEventArgs(carListResponse));