Made hitsounds not stack like fuck

This commit is contained in:
Shucks committed 2019-11-07 21:00:25 -06:00
1 parent 1513cba333
commit d82fc431be
9 files changed
+37 -9

No files matched your search

+5 -1
View File
@@ -62,7 +62,6 @@ namespace CalamityMod.NPCs.CeaselessVoid
npc.noGravity = true;
npc.noTileCollide = true;
npc.boss = true;
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit");
npc.DeathSound = SoundID.NPCDeath14;
}
@@ -380,6 +379,11 @@ namespace CalamityMod.NPCs.CeaselessVoid
public override void HitEffect(int hitDirection, double damage)
{
if (npc.soundDelay == 0)
{
npc.soundDelay = 20;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit"), npc.Center);
}
for (int k = 0; k < 5; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 173, hitDirection, -1f, 0, default, 1f);
+5 -1
View File
@@ -52,7 +52,6 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.behindTiles = true;
npc.noGravity = true;
npc.noTileCollide = true;
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit");
npc.DeathSound = SoundID.NPCDeath14;
npc.netAlways = true;
for (int k = 0; k < npc.buffImmune.Length; k++)
@@ -731,6 +730,11 @@ namespace CalamityMod.NPCs.DevourerofGods
public override void HitEffect(int hitDirection, double damage)
{
if (npc.soundDelay == 0)
{
npc.soundDelay = 20;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit"), npc.Center);
}
if (npc.life <= 0)
{
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGHead"), 1f);
+5 -1
View File
@@ -66,7 +66,6 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.behindTiles = true;
npc.noGravity = true;
npc.noTileCollide = true;
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit");
npc.DeathSound = SoundID.NPCDeath14;
npc.netAlways = true;
for (int k = 0; k < npc.buffImmune.Length; k++)
@@ -996,6 +995,11 @@ namespace CalamityMod.NPCs.DevourerofGods
public override void HitEffect(int hitDirection, double damage)
{
if (npc.soundDelay == 0)
{
npc.soundDelay = 20;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit"), npc.Center);
}
if (npc.life <= 0)
{
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS"), 1f);
+5 -1
View File
@@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.noGravity = true;
npc.noTileCollide = true;
npc.canGhostHeal = false;
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit");
npc.DeathSound = SoundID.NPCDeath14;
npc.netAlways = true;
npc.boss = true;
@@ -161,6 +160,11 @@ namespace CalamityMod.NPCs.DevourerofGods
public override void HitEffect(int hitDirection, double damage)
{
if (npc.soundDelay == 0)
{
npc.soundDelay = 20;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit"), npc.Center);
}
if (npc.life <= 0)
{
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGTail"), 1f);
+5 -1
View File
@@ -39,7 +39,6 @@ namespace CalamityMod.NPCs.DevourerofGods
npc.noGravity = true;
npc.noTileCollide = true;
npc.canGhostHeal = false;
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit");
npc.DeathSound = SoundID.NPCDeath14;
npc.netAlways = true;
npc.boss = true;
@@ -227,6 +226,11 @@ namespace CalamityMod.NPCs.DevourerofGods
public override void HitEffect(int hitDirection, double damage)
{
if (npc.soundDelay == 0)
{
npc.soundDelay = 20;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/OtherworldlyHit"), npc.Center);
}
if (npc.life <= 0)
{
Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/DoGS5"), 1f);
+5 -1
View File
@@ -34,7 +34,6 @@ namespace CalamityMod.NPCs.NormalNPCs
npc.buffImmune[BuffID.CursedInferno] = false;
npc.lavaImmune = true;
npc.value = Item.buyPrice(0, 0, 50, 0);
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/ScornHurt");
npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/ScornDeath");
banner = npc.type;
bannerItem = ModContent.ItemType<ScornEaterBanner>();
@@ -159,6 +158,11 @@ namespace CalamityMod.NPCs.NormalNPCs
public override void HitEffect(int hitDirection, double damage)
{
if (npc.soundDelay == 0)
{
npc.soundDelay = 15;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/ScornHurt"), npc.Center);
}
for (int k = 0; k < 5; k++)
{
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
+5 -1
View File
@@ -92,7 +92,6 @@ namespace CalamityMod.NPCs.Providence
music = calamityModMusic.GetSoundSlot(SoundType.Music, "Sounds/Music/ProvidenceTheme");
else
music = MusicID.LunarBoss;
npc.HitSound = mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/ProvidenceHurt");
npc.DeathSound = mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/ProvidenceDeath");
bossBag = ModContent.ItemType<ProvidenceBag>();
}
@@ -1260,6 +1259,11 @@ namespace CalamityMod.NPCs.Providence
public override void HitEffect(int hitDirection, double damage)
{
if(npc.soundDelay == 0)
{
npc.soundDelay = 20;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCHit, "Sounds/NPCHit/ProvidenceHurt"), npc.Center);
}
for (int k = 0; k < 15; k++)
Dust.NewDust(npc.position, npc.width, npc.height, 244, hitDirection, -1f, 0, default, 1f);
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Sounds.Custom
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
{
soundInstance = sound.CreateInstance();
soundInstance.Volume = volume * 1f;
soundInstance.Volume = volume * 1.25f;
soundInstance.Pan = pan;
Main.PlaySoundInstance(soundInstance);
return soundInstance;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace CalamityMod.Sounds.Custom
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
{
soundInstance = sound.CreateInstance();
soundInstance.Volume = volume * 1f;
soundInstance.Volume = volume * 1.2f;
soundInstance.Pan = pan;
Main.PlaySoundInstance(soundInstance);
return soundInstance;