PlayerId0Fix

This commit is contained in:
AnloGames 2024-08-23 21:37:21 +03:00
parent 178a05079a
commit 9cd3930731

View file

@ -59,12 +59,18 @@ namespace ZoFo.GameCore
}; };
AppManager.Instance.InputManager.OnInteract += () => AppManager.Instance.InputManager.OnInteract += () =>
{
if (AppManager.Instance.client.networkManager.PlayerId > 0)
{ {
networkManager.AddData(new UpdateInputInteraction() { PlayerId = AppManager.Instance.client.networkManager.PlayerId }); networkManager.AddData(new UpdateInputInteraction() { PlayerId = AppManager.Instance.client.networkManager.PlayerId });
}
}; };
AppManager.Instance.InputManager.ShootEvent += () => AppManager.Instance.InputManager.ShootEvent += () =>
{
if (AppManager.Instance.client.networkManager.PlayerId > 0)
{ {
networkManager.AddData(new UpdateInputShoot() { PlayerId = AppManager.Instance.client.networkManager.PlayerId }); networkManager.AddData(new UpdateInputShoot() { PlayerId = AppManager.Instance.client.networkManager.PlayerId });
}
}; };
} }