From f798ebb42aa9376d2c281e83ecfa52b5da9faba6 Mon Sep 17 00:00:00 2001 From: Aleksander Waage Date: Mon, 17 Aug 2020 22:02:36 +0200 Subject: [PATCH 1/2] stuff --- QSB/Events/PlayerState.cs | 2 +- QSB/PlayerInfo.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/QSB/Events/PlayerState.cs b/QSB/Events/PlayerState.cs index fb13752f..f4fdaa63 100644 --- a/QSB/Events/PlayerState.cs +++ b/QSB/Events/PlayerState.cs @@ -20,7 +20,7 @@ namespace QSB.Events private void OnClientReceiveMessage(PlayerStateMessage message) { - if (message.FromId == PlayerRegistry.LocalPlayerId) + if (message.AboutId == PlayerRegistry.LocalPlayerId) { return; } diff --git a/QSB/PlayerInfo.cs b/QSB/PlayerInfo.cs index a89b0db1..b7dee796 100644 --- a/QSB/PlayerInfo.cs +++ b/QSB/PlayerInfo.cs @@ -12,7 +12,7 @@ namespace QSB public GameObject Camera { get; set; } public GameObject ProbeBody { get; set; } public QSBProbe Probe { get; set; } - public QSBFlashlight FlashLight => Camera.GetComponentInChildren(); + public QSBFlashlight FlashLight => Camera?.GetComponentInChildren(); public QSBTool Signalscope => GetToolByType(ToolType.Signalscope); public QSBTool Translator => GetToolByType(ToolType.Translator); public QSBTool ProbeLauncher => GetToolByType(ToolType.ProbeLauncher); From a2d466c07de2e248b70b2f743ba425cf342bbaa3 Mon Sep 17 00:00:00 2001 From: Aleksander Waage Date: Mon, 17 Aug 2020 22:22:12 +0200 Subject: [PATCH 2/2] wut --- QSB/Events/QSBEvent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/QSB/Events/QSBEvent.cs b/QSB/Events/QSBEvent.cs index afd155df..11bae5cb 100644 --- a/QSB/Events/QSBEvent.cs +++ b/QSB/Events/QSBEvent.cs @@ -71,7 +71,8 @@ namespace QSB.Events private void OnClientReceive(T message) { - if (PlayerRegistry.IsBelongingToLocalPlayer(message.FromId)) + if (message.FromId == PlayerRegistry.LocalPlayerId || + PlayerRegistry.IsBelongingToLocalPlayer(message.AboutId)) { OnReceiveLocal(message); return;