From 7112d34b24936c00aee5c6b590669d6aaa4c0841 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 27 Dec 2020 13:24:14 -0600 Subject: [PATCH] Fixed Gamma Laser aiming problems in MP --- Projectiles/Summon/GammaDeathray.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Projectiles/Summon/GammaDeathray.cs b/Projectiles/Summon/GammaDeathray.cs index 95dae2cea3..e75f62deea 100644 --- a/Projectiles/Summon/GammaDeathray.cs +++ b/Projectiles/Summon/GammaDeathray.cs @@ -59,8 +59,15 @@ namespace CalamityMod.Projectiles.Summon if (!owner.active || owner.type != ModContent.ProjectileType()) projectile.Kill(); - projectile.velocity = projectile.AngleTo(Main.MouseWorld).ToRotationVector2(); - projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; + if (Main.myPlayer == projectile.owner) + { + projectile.velocity = projectile.AngleTo(Main.MouseWorld).ToRotationVector2(); + projectile.rotation = projectile.velocity.ToRotation() - MathHelper.PiOver2; + + // Since the logic for this can only be run by one client, it must constantly be synced. + projectile.netUpdate = true; + projectile.netSpam = 0; + } if (owner.active) {