From a5cb2ebac0aba408d6b6ab88607e4c453f3a743c Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Fri, 4 Sep 2020 20:21:22 +0100 Subject: [PATCH] cleanup --- QSB/PlayerRegistry.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/QSB/PlayerRegistry.cs b/QSB/PlayerRegistry.cs index a4fe4e01..0f431b4a 100644 --- a/QSB/PlayerRegistry.cs +++ b/QSB/PlayerRegistry.cs @@ -5,7 +5,6 @@ using QSB.Utility; using System; using System.Collections.Generic; using System.Linq; -using UnityEngine; using UnityEngine.Networking; namespace QSB @@ -72,7 +71,8 @@ namespace QSB public static bool IsBelongingToLocalPlayer(uint id) { - return PlayerSyncObjects.Any(x => x != null && x.AttachedNetId == id && x.isLocalPlayer); + return id == LocalPlayerId || + PlayerSyncObjects.Any(x => x != null && x.AttachedNetId == id && x.isLocalPlayer); } public static uint GetPlayerOfObject(this PlayerSyncObject syncObject)