tried to fix Ultima again

This commit is contained in:
termigator1359 committed 2020-08-11 20:14:23 -04:00
1 parent 8589d3f0fa
commit ee193cc451
1 file changed
+10 -4
+10 -4
View File
@@ -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<UltimaSpark>(), damage / 3, knockBack, projectile.owner);
if (projectile.owner != Main.myPlayer)
{
Projectile.NewProjectile(shotPosition, sparkVelocity, ModContent.ProjectileType<UltimaSpark>(), 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;
}
}
}