Eldrazi
Eater of Worlds
Ah, it's what I thought it'd be. You're manually drawing your projectile without taking into account the scale of the projectile:Before I forget, here's the Projectile Code:
I used the "projectile.scale" line in a different Projectile, and that seemed to work for that Projectile. I'm guessing there's a code preventing "projectile.scale" from changing the sprite, because this Projectile is a spinning weapon (Like the Sky Dragon's Fury).Code:using System; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.DataStructures; namespace JoshuasMod.Projectiles.MourningArc { public class MourningArc : ModProjectile { public override void SetStaticDefaults() { DisplayName.SetDefault("Mourning Arc"); //The weapon's name when shown in-game. } public override void SetDefaults() { projectile.width = 120; projectile.height = 120; projectile.timeLeft = 15; projectile.penetrate = -1; projectile.scale = 0.6f; projectile.ignoreWater = true; projectile.melee = true; projectile.friendly = true; projectile.tileCollide = false; } public override void AI() { //The sound code for the projectile. projectile.soundDelay--; if (projectile.soundDelay <= 0) { Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 15); projectile.soundDelay = 45; } //How the projectile works. Player player = Main.player[projectile.owner]; if (Main.myPlayer == projectile.owner) { if (!player.channel || player.noItems || player.CCed) { projectile.Kill(); } } Lighting.AddLight(projectile.Center, 0f, 1f, 0f); //This is the Projectile's light color (RGB) projectile.Center = player.MountedCenter; projectile.position.X += player.width / 2 * player.direction; projectile.spriteDirection = player.direction; projectile.rotation += 0.36f * player.direction; //This is the Projectile's Spinning/Rotation Speed if (projectile.rotation > MathHelper.TwoPi) { projectile.rotation -= MathHelper.TwoPi; } } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D texture = Main.projectileTexture[projectile.type]; spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, new Vector2(texture.Width / 2, texture.Height / 2), 1f, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f); return false; } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.CursedInferno, 5 * 60); //Add CursedInferno Buff to the NPC for 5 seconds. target.immune[projectile.owner] = 2; } } }
Code:
spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, null, Color.White, projectile.rotation, new Vector2(texture.Width / 2, texture.Height / 2), projectile.scale, projectile.spriteDirection == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0f);