fix: network manager not subscribing to communicator properly

This commit is contained in:
Syntriax 2025-06-01 10:20:06 +03:00
parent f3b7ccaf70
commit 4824496f1a

View File

@ -38,8 +38,8 @@ public class NetworkManager : UniverseObject, INetworkManager
var previousCommunicator = _networkCommunicator;
_networkCommunicator = value;
if (previousCommunicator is not null) SubscribeCommunicatorMethods(previousCommunicator);
if (_networkCommunicator is not null) UnsubscribeCommunicatorMethods(_networkCommunicator);
if (previousCommunicator is not null) UnsubscribeCommunicatorMethods(previousCommunicator);
if (_networkCommunicator is not null) SubscribeCommunicatorMethods(_networkCommunicator);
}
}