tModLoader Mods sounds not playing in multiplayer correctly

RADICALAdrift

Official Terrarian
Hi,
Currently got an issue with my mods custom sound not playing from a projectile death in multiplayer properly
Projectile Code:
C:
using Terraria;
using Terraria.ID;
using Terraria.Audio;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;

namespace OPDefense.Content.Projectiles.Ranged
{
    public class GODKnifeP : ModProjectile
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("GOD Knife");
        }
        public override void SetDefaults()
        {
            Projectile.width = 20;
            Projectile.height = 20;
            Projectile.friendly = true;
            Projectile.aiStyle = 2;
            Projectile.DamageType = DamageClass.Ranged;
            Projectile.penetrate = 2;
            Projectile.extraUpdates = 1;
            AIType = ProjectileID.ThrowingKnife;
        }
        public override void AI()
        {           
                Projectile.ai[0] += 0.999f;
            if (Projectile.ai[0] >= 500f)
            {
                Projectile.velocity.Y = Projectile.velocity.Y + 0.15f;
                Projectile.velocity.X = Projectile.velocity.X * 0.99f;
            }
        }
        public override bool OnTileCollide(Vector2 oldVelocity)
        {
            {
                Projectile.Kill();
                SoundEngine.PlaySound(2, (int)Projectile.position.X, (int)Projectile.position.Y, 10);
                SoundEngine.PlaySound(SoundLoader.GetLegacySoundSlot("OPDefense/Assets/Sounds/Custom/Wooo"));
            }
            return false;
        }
    }
}
Almost put the sound.cs file but then realised that is un-used in TML 1.4, i assume i would have to change something or make it sync in mp to fix it as currently when the item which this projectile belongs to is used the sound doesn't play on projectile death for any other players in multiplayer only the player who threw the item hears the sound
Thanks in advance,
Radical
 
Back
Top Bottom