From 969fb019621816733427efe01f45ffac1048aeba Mon Sep 17 00:00:00 2001 From: Shucks Date: Tue, 14 Jan 2020 20:54:31 -0600 Subject: [PATCH] Made francisca and tomahawk rotation dependant on velocity --- Projectiles/Rogue/IronFranciscaProj.cs | 5 ++++- Projectiles/Rogue/LeadTomahawkProj.cs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Projectiles/Rogue/IronFranciscaProj.cs b/Projectiles/Rogue/IronFranciscaProj.cs index 30796da0f2..081c498159 100644 --- a/Projectiles/Rogue/IronFranciscaProj.cs +++ b/Projectiles/Rogue/IronFranciscaProj.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -33,7 +34,9 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; } - projectile.rotation += 0.4f * projectile.direction; + float rotateratio = 0.019f; + float rotation = (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * rotateratio; + projectile.rotation += rotation * projectile.direction; projectile.velocity.Y = projectile.velocity.Y + 0.2f; if (projectile.velocity.Y > 16f) diff --git a/Projectiles/Rogue/LeadTomahawkProj.cs b/Projectiles/Rogue/LeadTomahawkProj.cs index 0a166c0685..6773e34cf1 100644 --- a/Projectiles/Rogue/LeadTomahawkProj.cs +++ b/Projectiles/Rogue/LeadTomahawkProj.cs @@ -1,6 +1,7 @@ using CalamityMod.Items.Weapons.Rogue; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -33,7 +34,9 @@ namespace CalamityMod.Projectiles.Rogue projectile.penetrate = -1; } - projectile.rotation += 0.4f * projectile.direction; + float rotateratio = 0.019f; + float rotation = (Math.Abs(projectile.velocity.X) + Math.Abs(projectile.velocity.Y)) * rotateratio; + projectile.rotation += rotation * projectile.direction; projectile.velocity.Y = projectile.velocity.Y + 0.2f; if (projectile.velocity.Y > 16f)