mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
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:
parent
57eff86e3f
commit
59687675c9
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user