Fix sonarqube null warning

Once upon a time, connections could be null here.  This is no longer
the case, connections always have something,

Even if they were null,  this method would not work at all because
the conn.Send call at the bottom would throw NRE.

Therefore the null checks here are unnecesary
This commit is contained in:
Paul Pacheco 2020-03-20 07:58:46 -05:00
parent 57eff86e3f
commit 59687675c9

View File

@ -940,8 +940,8 @@ internal static void SendSpawnMessage(NetworkIdentity identity, NetworkConnectio
SpawnMessage msg = new SpawnMessage SpawnMessage msg = new SpawnMessage
{ {
netId = identity.netId, netId = identity.netId,
isLocalPlayer = conn?.identity == identity, isLocalPlayer = conn.identity == identity,
isOwner = identity.connectionToClient == conn && conn != null, isOwner = identity.connectionToClient == conn,
sceneId = identity.sceneId, sceneId = identity.sceneId,
assetId = identity.assetId, assetId = identity.assetId,
// use local values for VR support // use local values for VR support