public virtual float CalculateRelevance(IPeerWorldRepresentation peer, bool is_owner) { if (this.m_Hallucination && !peer.IsLocalPeer()) { return(0f); } return(-1f); }
public static void UnregisterForPeer(this IPeerWorldRepresentation representation, P2PPeer peer) { if (peer.m_Representation == representation) { peer.m_Representation = null; } if (peer == ReplTools.GetLocalPeer()) { if (representation.IsReplicated()) { IPeerWorldRepresentationHelper.s_LocalNetPlayer = null; return; } IPeerWorldRepresentationHelper.s_LocalOfflinePlayer = null; } }
public static bool IsLocalPeer(this IPeerWorldRepresentation representation) { return(IPeerWorldRepresentationHelper.s_LocalNetPlayer == representation || IPeerWorldRepresentationHelper.s_LocalOfflinePlayer == representation); }