This commit is contained in:
Mister_Nebula 2020-09-04 20:21:22 +01:00
parent 22316145ea
commit a5cb2ebac0

View File

@ -5,7 +5,6 @@ using QSB.Utility;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
namespace QSB namespace QSB
@ -72,7 +71,8 @@ namespace QSB
public static bool IsBelongingToLocalPlayer(uint id) 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) public static uint GetPlayerOfObject(this PlayerSyncObject syncObject)