From 6cb9194396b8cadb3fd1ef712bbaa12d74940823 Mon Sep 17 00:00:00 2001 From: thisguyStan <53304086+thisguyStan@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:47:57 +0100 Subject: [PATCH] Preparation to send position updates from plugins --- AssettoServer/Network/Tcp/ACTcpClient.cs | 5 +++-- AssettoServer/Server/EntryCarManager.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/AssettoServer/Network/Tcp/ACTcpClient.cs b/AssettoServer/Network/Tcp/ACTcpClient.cs index 15a0db28..6a057347 100644 --- a/AssettoServer/Network/Tcp/ACTcpClient.cs +++ b/AssettoServer/Network/Tcp/ACTcpClient.cs @@ -63,7 +63,8 @@ public class ACTcpClient : IClient public InputMethod InputMethod { get; set; } internal SocketAddress? UdpEndpoint { get; private set; } - internal bool SupportsCSPCustomUpdate { get; private set; } + public bool HasUdpEndpoint => UdpEndpoint != null; + public bool SupportsCSPCustomUpdate { get; private set; } public int? CSPVersion { get; private set; } internal string ApiKey { get; } @@ -259,7 +260,7 @@ public void SendPacket(TPacket packet) where TPacket : IOutgoingNetwork } } - internal void SendPacketUdp(in TPacket packet) where TPacket : IOutgoingNetworkPacket + public void SendPacketUdp(in TPacket packet) where TPacket : IOutgoingNetworkPacket { if (UdpEndpoint == null) return; diff --git a/AssettoServer/Server/EntryCarManager.cs b/AssettoServer/Server/EntryCarManager.cs index 15ae0ed0..3c512808 100644 --- a/AssettoServer/Server/EntryCarManager.cs +++ b/AssettoServer/Server/EntryCarManager.cs @@ -19,7 +19,7 @@ namespace AssettoServer.Server; public class EntryCarManager { public EntryCar[] EntryCars { get; private set; } = []; - internal ConcurrentDictionary ConnectedCars { get; } = new(); + public ConcurrentDictionary ConnectedCars { get; } = new(); private readonly ACServerConfiguration _configuration; private readonly IBlacklistService _blacklist;