diff --git a/Assets/Scripts/Item/Pistol/PistolComponent.cs b/Assets/Scripts/Item/Pistol/PistolComponent.cs index 7743c95..af81a5f 100644 --- a/Assets/Scripts/Item/Pistol/PistolComponent.cs +++ b/Assets/Scripts/Item/Pistol/PistolComponent.cs @@ -129,22 +129,17 @@ namespace Item { Fire(!hasCloseTarget); } + + [ServerRpc] - private void SpawnBullet(GameObject projectile) - { - - InstanceFinder.ServerManager.Spawn(projectile); - - } - public void Fire(bool offsetWithTargetBall) { shootLightDuration = 0; shootLight.gameObject.SetActive(true); - var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); - SpawnBullet(projectile); - //var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); + // var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); +var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); + InstanceFinder.ServerManager.Spawn(projectile); //var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); //InstanceFinder.ServerManager.Spawn(projectile);