From 57abce298d9f18aa280de8c333b988d24cd2c7fe Mon Sep 17 00:00:00 2001 From: Regalis Date: Fri, 3 Jun 2016 14:58:01 +0300 Subject: [PATCH] Fixed projectile velocity being reset in Item.Drop() after launch --- Subsurface/Source/Items/Components/Projectile.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Subsurface/Source/Items/Components/Projectile.cs b/Subsurface/Source/Items/Components/Projectile.cs index 688ab20da..b9a173a0a 100644 --- a/Subsurface/Source/Items/Components/Projectile.cs +++ b/Subsurface/Source/Items/Components/Projectile.cs @@ -77,6 +77,8 @@ namespace Barotrauma.Items.Components private void Launch(Vector2 impulse) { + item.Drop(); + item.body.Enabled = true; item.body.ApplyLinearImpulse(impulse); @@ -86,8 +88,6 @@ namespace Barotrauma.Items.Components item.body.CollisionCategories = Physics.CollisionProjectile; item.body.CollidesWith = Physics.CollisionCharacter | Physics.CollisionWall | Physics.CollisionLevel; - item.Drop(); - if (stickJoint == null || !doesStick) return; if (stickTarget != null)