diff --git a/Assets/Scripts/Item/Pistol/PistolComponent.cs b/Assets/Scripts/Item/Pistol/PistolComponent.cs index 77657c1..33d5421 100644 --- a/Assets/Scripts/Item/Pistol/PistolComponent.cs +++ b/Assets/Scripts/Item/Pistol/PistolComponent.cs @@ -130,19 +130,21 @@ namespace Item Fire(!hasCloseTarget); } [ServerRpc] - private GameObject SpawnBullet() + private void SpawnBullet(GameObject projectile) { - var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); + InstanceFinder.ServerManager.Spawn(projectile); - return projectile; + } public void Fire(bool offsetWithTargetBall) { shootLightDuration = 0; shootLight.gameObject.SetActive(true); - var projectile = SpawnBullet(); + + var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); + SpawnBullet(projectile); //var projectile = Instantiate(projectilePrefab, bulletSpawnPoint); //InstanceFinder.ServerManager.Spawn(projectile);