Desert Scourge vomit spam fix?
This commit is contained in:
1 parent
2eb0a4e4e3
commit
a0e13da37b
1 file changed
+4
-43
@@ -258,47 +258,6 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
turnSpeed *= 1.2f;
|
||||
}
|
||||
|
||||
// Projectile spit (unused, for now)
|
||||
/*if ((phase2 || death) && revenge && NPC.Distance(Main.player[NPC.target].Center) > 400f && (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation())
|
||||
{
|
||||
if (NPC.Calamity().newAI[0] % (death ? SpitGateValue_Death : SpitGateValue) == 0f)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath11, NPC.Center);
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * (masterMode ? 10f : 8f);
|
||||
int numProj = death ? 9 : 6;
|
||||
int spread = masterMode ? 49 : 35;
|
||||
if (masterMode)
|
||||
{
|
||||
numProj += 3;
|
||||
spread += 14;
|
||||
}
|
||||
|
||||
float rotation = MathHelper.ToRadians(spread);
|
||||
int type = ModContent.ProjectileType<DesertScourgeSpit>();
|
||||
int damage = NPC.GetProjectileDamage(type);
|
||||
for (int i = 0; i < numProj; i++)
|
||||
{
|
||||
Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1)));
|
||||
|
||||
for (int k = 0; k < 10; k++)
|
||||
{
|
||||
int dust = Dust.NewDust(NPC.Center + Vector2.Normalize(perturbedSpeed) * 5f, 10, 10, (int)CalamityDusts.SulphurousSeaAcid);
|
||||
Main.dust[dust].velocity = perturbedSpeed;
|
||||
}
|
||||
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer);
|
||||
Main.projectile[proj].aiStyle = -1;
|
||||
Main.projectile[proj].netUpdate = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
// Sand splash
|
||||
if (!quickFall)
|
||||
{
|
||||
@@ -591,7 +550,7 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
float targetDistance = (float)Math.Sqrt((double)(playerX * playerX + targettingPosition * targettingPosition));
|
||||
|
||||
// Lunge up towards target
|
||||
if (burrow && NPC.Center.Y >= burrowTarget - 16f)
|
||||
if (burrow && NPC.Center.Y >= burrowTarget - 16f && !lungeUpward && !quickFall)
|
||||
{
|
||||
NPC.Calamity().newAI[1] = 1f;
|
||||
NPC.localAI[3] = 0f;
|
||||
@@ -603,7 +562,7 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
}
|
||||
|
||||
// Quickly fall back down once above target
|
||||
if (lungeUpward && NPC.Center.Y <= NPC.Calamity().newAI[3] + LungeUpwardDistanceOffset - LungeUpwardCutoffDistance && Math.Abs(NPC.Center.X - player.Center.X) < 480f)
|
||||
if (lungeUpward && NPC.Center.Y <= NPC.Calamity().newAI[3] + LungeUpwardDistanceOffset - LungeUpwardCutoffDistance && Math.Abs(NPC.Center.X - player.Center.X) < 480f && !quickFall)
|
||||
{
|
||||
// Spit a huge spread of sand upwards that falls down
|
||||
SoundEngine.PlaySound(SoundID.NPCDeath13, NPC.Center);
|
||||
@@ -656,7 +615,9 @@ namespace CalamityMod.NPCs.DesertScourge
|
||||
{
|
||||
NPC.Calamity().newAI[0] = 0f;
|
||||
NPC.Calamity().newAI[1] = 0f;
|
||||
NPC.Calamity().newAI[3] = 0f;
|
||||
NPC.localAI[3] = 0f;
|
||||
playRoarSound = false;
|
||||
}
|
||||
|
||||
if (hide && !player.dead)
|
||||
|
||||
Reference in new issue
Block a user