Merge branch 'master' of https://github.com/UncleDanny/CalamityMod
This commit is contained in:
commit
765225001f
2 files changed
+4
-8
No files matched your search
@@ -40,11 +40,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int numProj = 2;
|
||||
float rotation = MathHelper.ToRadians(4);
|
||||
for (int j = 0; j < numProj + 1; j++)
|
||||
for (int j = -8; j <= 8; j += 8)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.Lerp(-rotation, rotation, j / (numProj - 1)));
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(j));
|
||||
int demon = Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
|
||||
Main.projectile[demon].penetrate = 1;
|
||||
}
|
||||
|
||||
@@ -36,11 +36,9 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int numProj = 2;
|
||||
float rotation = MathHelper.ToRadians(4);
|
||||
for (int i = 0; i < numProj + 1; i++)
|
||||
for (int i = -8; i <= 8; i += 8)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1)));
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i));
|
||||
Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage / 2, knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user