From 9cd393073147c252ee81295450f6856e0090df9f Mon Sep 17 00:00:00 2001 From: AnloGames <7383an@gmail.com> Date: Fri, 23 Aug 2024 21:37:21 +0300 Subject: [PATCH] PlayerId0Fix --- ZoFo/GameCore/Client.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ZoFo/GameCore/Client.cs b/ZoFo/GameCore/Client.cs index f243727..1d8561b 100644 --- a/ZoFo/GameCore/Client.cs +++ b/ZoFo/GameCore/Client.cs @@ -60,11 +60,17 @@ namespace ZoFo.GameCore }; AppManager.Instance.InputManager.OnInteract += () => { - networkManager.AddData(new UpdateInputInteraction() {PlayerId = AppManager.Instance.client.networkManager.PlayerId }); + if (AppManager.Instance.client.networkManager.PlayerId > 0) + { + networkManager.AddData(new UpdateInputInteraction() { PlayerId = AppManager.Instance.client.networkManager.PlayerId }); + } }; AppManager.Instance.InputManager.ShootEvent += () => { - networkManager.AddData(new UpdateInputShoot() { PlayerId = AppManager.Instance.client.networkManager.PlayerId }); + if (AppManager.Instance.client.networkManager.PlayerId > 0) + { + networkManager.AddData(new UpdateInputShoot() { PlayerId = AppManager.Instance.client.networkManager.PlayerId }); + } }; }