OnCommandMessage syntax improved

This commit is contained in:
vis2k 2018-12-18 14:59:46 +01:00
parent 2147d86013
commit 0121d2ad8f

View File

@ -847,8 +847,7 @@ static void OnCommandMessage(NetworkMessage netMsg)
CommandMessage message = netMsg.ReadMessage<CommandMessage>();
NetworkIdentity identity;
NetworkIdentity.spawned.TryGetValue(message.netId, out identity);
if (identity == null)
if (!NetworkIdentity.spawned.TryGetValue(message.netId, out identity))
{
Debug.LogWarning("Spawned object not found when handling Command message [netId=" + message.netId + "]");
return;