From 67d741e67105ecc84b88fa870180deb3addea3af Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sun, 16 May 2010 15:05:01 +1200 Subject: [PATCH] unfail recoil directions (wtf) --- OpenRA.Game/Traits/Util.cs | 4 +--- OpenRA.Mods.RA/ThrowsParticles.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/OpenRA.Game/Traits/Util.cs b/OpenRA.Game/Traits/Util.cs index c4ad5d2798..9e04a1c4e5 100755 --- a/OpenRA.Game/Traits/Util.cs +++ b/OpenRA.Game/Traits/Util.cs @@ -101,9 +101,7 @@ namespace OpenRA.Traits if (rut == null) return float2.Zero; var facing = self.traits.Get().turretFacing; - var quantizedFacing = QuantizeFacing(facing, rut.anim.CurrentSequence.Facings) * (256 / rut.anim.CurrentSequence.Length); - - return RotateVectorByFacing(new float2(0, recoil * self.Info.Traits.Get().Recoil), quantizedFacing, .7f); + return RotateVectorByFacing(new float2(0, recoil * self.Info.Traits.Get().Recoil), facing, .7f); } public static float2 CenterOfCell(int2 loc) diff --git a/OpenRA.Mods.RA/ThrowsParticles.cs b/OpenRA.Mods.RA/ThrowsParticles.cs index 5ec4fbc584..bb6a610eb5 100644 --- a/OpenRA.Mods.RA/ThrowsParticles.cs +++ b/OpenRA.Mods.RA/ThrowsParticles.cs @@ -66,11 +66,15 @@ namespace OpenRA.Mods.RA info = null; } - pos += v; - v = .9f * v; va -= gravity; alt += va; + if (alt < 0) alt = 0; + else + { + pos += v; + v = .9f * v; + } } } }