diff --git a/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs b/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs index fdd20abf1..95925880b 100644 --- a/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs +++ b/Barotrauma/BarotraumaClient/Source/Items/Components/Turret.cs @@ -57,6 +57,11 @@ namespace Barotrauma.Items.Components powerIndicator = new GUIProgressBar(new Rectangle(GameMain.GraphicsWidth / 2 - barWidth / 2, 20, barWidth, 30), Color.White, 0.0f); } + partial void LaunchProjSpecific() + { + PlaySound(ActionType.OnUse, item.WorldPosition); + } + public void Draw(SpriteBatch spriteBatch, bool editing = false) { Vector2 drawPos = new Vector2(item.Rect.X, item.Rect.Y); @@ -159,7 +164,6 @@ namespace Barotrauma.Items.Components } Launch(projectile); - PlaySound(ActionType.OnUse, item.WorldPosition); } } } diff --git a/Barotrauma/BarotraumaShared/Source/Items/Components/Turret.cs b/Barotrauma/BarotraumaShared/Source/Items/Components/Turret.cs index cdea88b22..60249be8f 100644 --- a/Barotrauma/BarotraumaShared/Source/Items/Components/Turret.cs +++ b/Barotrauma/BarotraumaShared/Source/Items/Components/Turret.cs @@ -219,6 +219,10 @@ namespace Barotrauma.Items.Components projectile.FindHull(); projectile.Submarine = projectile.body.Submarine; + LaunchProjSpecific(); + + ApplyStatusEffects(ActionType.OnUse, 1.0f, user); + Projectile projectileComponent = projectile.GetComponent(); if (projectileComponent != null) { @@ -234,6 +238,8 @@ namespace Barotrauma.Items.Components } } + partial void LaunchProjSpecific(); + public override bool AIOperate(float deltaTime, Character character, AIObjectiveOperateItem objective) { var projectiles = GetLoadedProjectiles();