From ee193cc45115c8aee0801b067ca8cae37039721d Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Tue, 11 Aug 2020 20:14:23 -0400 Subject: [PATCH] tried to fix Ultima again --- Projectiles/Ranged/UltimaBowProjectile.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Projectiles/Ranged/UltimaBowProjectile.cs b/Projectiles/Ranged/UltimaBowProjectile.cs index 36fa8df5a2..2264d79c18 100644 --- a/Projectiles/Ranged/UltimaBowProjectile.cs +++ b/Projectiles/Ranged/UltimaBowProjectile.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Ranged projectile.Kill(); return; } - if (projectile.owner != Main.myPlayer && Time % player.ActiveItem().useTime == 0) + if (Time % player.ActiveItem().useTime == 0) { int type = ProjectileID.WoodenArrowFriendly; // This doesn't really matter. It's overwritten anyway. But it is passed into the PickAmmo method. float shotSpeed = player.ActiveItem().shootSpeed; @@ -83,12 +83,18 @@ namespace CalamityMod.Projectiles.Ranged float offsetAngle = Main.rand.NextFloat(0.2f, 0.5f) * Main.rand.NextBool(2).ToDirectionInt(); Vector2 sparkVelocity = projectile.DirectionTo(Main.MouseWorld).RotatedByRandom(0.5f) * 13f; sparkVelocity = sparkVelocity.RotatedBy(offsetAngle); - Projectile.NewProjectile(shotPosition, sparkVelocity, ModContent.ProjectileType(), damage / 3, knockBack, projectile.owner); + if (projectile.owner != Main.myPlayer) + { + Projectile.NewProjectile(shotPosition, sparkVelocity, ModContent.ProjectileType(), damage / 3, knockBack, projectile.owner); + } } knockBack = player.GetWeaponKnockback(player.ActiveItem(), knockBack); - Projectile.NewProjectile(shotPosition, shotVelocity, type, damage, knockBack, projectile.owner); - projectile.netUpdate = true; + if (projectile.owner != Main.myPlayer) + { + Projectile.NewProjectile(shotPosition, shotVelocity, type, damage, knockBack, projectile.owner); + projectile.netUpdate = true; + } } }