diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index fe4b4738c9..f394662a54 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2110,6 +2110,8 @@ namespace CalamityMod.Projectiles if (projectile.spriteDirection == -1) spriteEffects = SpriteEffects.FlipHorizontally; + bool failedToDrawAfterimages = false; + if (CalamityConfig.Instance.Afterimages) { Vector2 centerOffset = drawCentered ? projectile.Size / 2f : Vector2.Zero; @@ -2163,12 +2165,13 @@ namespace CalamityMod.Projectiles break; default: + failedToDrawAfterimages = true; break; } } // Draw the projectile itself. Only do this if no afterimages are drawn because afterimage 0 is the projectile itself. - if (!CalamityConfig.Instance.Afterimages || ProjectileID.Sets.TrailCacheLength[projectile.type] <= 0) + if (!CalamityConfig.Instance.Afterimages || ProjectileID.Sets.TrailCacheLength[projectile.type] <= 0 || failedToDrawAfterimages) { Vector2 startPos = drawCentered ? projectile.Center : projectile.position; Main.spriteBatch.Draw(texture, startPos - Main.screenPosition + new Vector2(0f, projectile.gfxOffY), rectangle, projectile.GetAlpha(lightColor), rotation, origin, scale, spriteEffects, 0f); diff --git a/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs b/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs index 0a7921598a..4ecab38d9c 100644 --- a/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs +++ b/Projectiles/DraedonsArsenal/SystemBaneProjectile.cs @@ -103,7 +103,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal return; int totalCirclePoints = 55; float generalOpacity = Utils.InverseLerp(0f, 30f, projectile.timeLeft, true) * Utils.InverseLerp(480f, 450f, projectile.timeLeft, true); - Texture2D lightningTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/SystemBaneLightning"); + Texture2D lightningTexture = ModContent.GetTexture("CalamityMod/Projectiles/LightningProj"); for (int i = 0; i < totalCirclePoints; i++) { float angle = MathHelper.TwoPi * i / totalCirclePoints; diff --git a/Projectiles/Rogue/TheSyringeProj.cs b/Projectiles/Rogue/TheSyringeProj.cs index deb70dab70..0f2af5bc06 100644 --- a/Projectiles/Rogue/TheSyringeProj.cs +++ b/Projectiles/Rogue/TheSyringeProj.cs @@ -14,6 +14,8 @@ namespace CalamityMod.Projectiles.Rogue public override void SetStaticDefaults() { DisplayName.SetDefault("Syringe"); + ProjectileID.Sets.TrailCacheLength[projectile.type] = 10; + ProjectileID.Sets.TrailingMode[projectile.type] = 1; } public override void SetDefaults() @@ -58,10 +60,7 @@ namespace CalamityMod.Projectiles.Rogue public override void Kill(int timeLeft) { - projectile.position = projectile.Center; - projectile.width = projectile.height = 100; - projectile.position.X = projectile.position.X - (float)(projectile.width / 2); - projectile.position.Y = projectile.position.Y - (float)(projectile.height / 2); + CalamityGlobalProjectile.ExpandHitboxBy(projectile, 100); projectile.maxPenetrate = -1; projectile.penetrate = -1; projectile.usesLocalNPCImmunity = true; @@ -78,12 +77,12 @@ namespace CalamityMod.Projectiles.Rogue for (int f = 0; f < fireAmt; f++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), 0f, Main.myPlayer); } for (int s = 0; s < 2; ++s) { - float SpeedX = -projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - float SpeedY = -projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; + float SpeedX = -projectile.velocity.X * Main.rand.NextFloat(0.4f, 0.7f) + Main.rand.NextFloat(-8f, 8f); + float SpeedY = -projectile.velocity.Y * Main.rand.NextFloat(0.4f, 0.7f) + Main.rand.NextFloat(-8f, 8f); Projectile.NewProjectile(projectile.Center.X + SpeedX, projectile.Center.Y + SpeedY, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.25), 0f, Main.myPlayer, Main.rand.Next(3), 0f); } } @@ -91,9 +90,9 @@ namespace CalamityMod.Projectiles.Rogue { for (int b = 0; b < 5; b++) { - float speedX = (float)Main.rand.Next(-35, 36) * 0.02f; - float speedY = (float)Main.rand.Next(-35, 36) * 0.02f; - int bee = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, speedX, speedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), 0f, Main.myPlayer, 0f, 0f); + float speedX = Main.rand.NextFloat(-0.7f, 0.7f); + float speedY = Main.rand.NextFloat(-0.7f, 0.7f); + int bee = Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, speedX, speedY, ModContent.ProjectileType(), (int)(projectile.damage * 0.5), 0f, Main.myPlayer); Main.projectile[bee].penetrate = 1; } }