From ca63f925b07f6da67c1422bbf9ebce6b41bdcc90 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Sun, 13 Dec 2020 22:04:08 -0600 Subject: [PATCH] Fixed Gael lightning problems in MP --- Items/Weapons/Melee/GaelsGreatsword.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Melee/GaelsGreatsword.cs b/Items/Weapons/Melee/GaelsGreatsword.cs index 245e107d74..8140ea10c5 100644 --- a/Items/Weapons/Melee/GaelsGreatsword.cs +++ b/Items/Weapons/Melee/GaelsGreatsword.cs @@ -80,16 +80,16 @@ namespace CalamityMod.Items.Weapons.Melee public override void MeleeEffects(Player player, Rectangle hitbox) { if (CalamityUtils.CountProjectiles(ModContent.ProjectileType()) < 3 && - player.statLife <= player.statLifeMax2 * 0.5f) + player.statLife <= player.statLifeMax2 * 0.5f && + Main.myPlayer == player.whoAmI) { Point origin = (player.Center + Main.rand.Next(-300, 301) * Vector2.UnitX).ToTileCoordinates(); - Point p; if (WorldUtils.Find(origin, Searches.Chain(new Searches.Down(400), new GenCondition[] { new Conditions.IsSolid() - }), out p)) + }), out Point spawnPosition)) { - Projectile.NewProjectile(p.ToWorldCoordinates(8f, 0f), Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI); + Projectile.NewProjectile(spawnPosition.ToWorldCoordinates(8f, 0f), Vector2.Zero, ModContent.ProjectileType(), 0, 0f, player.whoAmI); } } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5))