zadum4ivii
Official Terrarian
Oh, thanks for the code!Do you think you could fix the way spread weapons work in the mod? Like the Quadratron and Spectre taro cards for example, their spread becomes nullified when you shoot up-left or down-right. The code for spread shots is this:Code:public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { float spread = 15f * 0.0174f; //15 degrees spread converted to radians because math reasons float baseSpeed = (float)Math.Sqrt(speedX * speedX + speedY * speedY); double startAngle = Math.Atan2(speedX, speedY)- spread/2; double deltaAngle = spread/3f; //spread divided by number of shots double offsetAngle; int i; for (i = 0; i < 3;i++ ) //i < number of shots { offsetAngle = startAngle + deltaAngle * i; Terraria.Projectile.NewProjectile(position.X, position.Y, baseSpeed*(float)Math.Sin(offsetAngle), baseSpeed*(float)Math.Cos(offsetAngle), item.shoot, damage, knockBack, item.owner); } return false; }
By the way, we will have some crossover content with mod from @Grox The Great