public void DoubleJumpVisuals()
{
if (this.dJumpEffectCloud && this.doubleJumpCloud && !this.jumpAgainCloud && (this.jumpAgainSandstorm || !this.doubleJumpSandstorm) && ((double)this.gravDir == 1.0 && (double)this.velocity.Y < 0.0 || (double)this.gravDir == -1.0 && (double)this.velocity.Y > 0.0))
{
int num = this.height;
if ((double)this.gravDir == -1.0)
num = -6;
int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float)num), this.width + 8, 4, 16, (float)(-(double)this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, new Color(), 1.5f);
Main.dust[index].velocity.X = (float)((double)Main.dust[index].velocity.X * 0.5 - (double)this.velocity.X * 0.100000001490116);
Main.dust[index].velocity.Y = (float)((double)Main.dust[index].velocity.Y * 0.5 - (double)this.velocity.Y * 0.300000011920929);
}
if (this.dJumpEffectSandstorm && this.doubleJumpSandstorm && !this.jumpAgainSandstorm && ((double)this.gravDir == 1.0 && (double)this.velocity.Y < 0.0 || (double)this.gravDir == -1.0 && (double)this.velocity.Y > 0.0))
{
int num = this.height;
if ((double)this.gravDir == -1.0)
num = -6;
float Scale = (float)(((double)this.jump / 75.0 + 1.0) / 2.0);
for (int index1 = 0; index1 < 3; ++index1)
{
int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float)(num / 2)), this.width, 32, 124, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 150, new Color(), 1f * Scale);
Main.dust[index2].velocity *= 0.5f * Scale;
Main.dust[index2].fadeIn = 1.5f * Scale;
}
this.sandStorm = true;
if (this.miscCounter % 3 == 0)
{
int index = Gore.NewGore(new Vector2((float)((double)this.position.X + (double)(this.width / 2) - 18.0), this.position.Y + (float)(num / 2)), new Vector2(-this.velocity.X, -this.velocity.Y), Main.rand.Next(220, 223), Scale);
Main.gore[index].velocity = this.velocity * 0.3f * Scale;
Main.gore[index].alpha = 100;
}
}
if (this.dJumpEffectFart && this.doubleJumpFart && !this.jumpAgainFart && ((double)this.gravDir == 1.0 && (double)this.velocity.Y < 0.0 || (double)this.gravDir == -1.0 && (double)this.velocity.Y > 0.0))
{
int num = this.height;
if ((double)this.gravDir == -1.0)
num = -6;
int index = Dust.NewDust(new Vector2(this.position.X - 4f, this.position.Y + (float)num), this.width + 8, 4, 188, (float)(-(double)this.velocity.X * 0.5), this.velocity.Y * 0.5f, 100, new Color(), 1.5f);
Main.dust[index].velocity.X = (float)((double)Main.dust[index].velocity.X * 0.5 - (double)this.velocity.X * 0.100000001490116);
Main.dust[index].velocity.Y = (float)((double)Main.dust[index].velocity.Y * 0.5 - (double)this.velocity.Y * 0.300000011920929);
Main.dust[index].velocity *= 0.5f;
}
if (this.dJumpEffectUnicorn && this.doubleJumpUnicorn && !this.jumpAgainUnicorn && ((double)this.gravDir == 1.0 && (double)this.velocity.Y < 0.0 || (double)this.gravDir == -1.0 && (double)this.velocity.Y > 0.0))
{
Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, Utils.SelectRandom<int>(Main.rand, 176, 177, 179), 0.0f, 0.0f, 0, new Color(), 1f)];
dust.velocity = Vector2.Zero;
dust.noGravity = true;
dust.scale = (float)(0.5 + (double)Utils.NextFloat(Main.rand) * 0.800000011920929);
dust.fadeIn = (float)(1.0 + (double)Utils.NextFloat(Main.rand) * 2.0);
dust.shader = GameShaders.Armor.GetSecondaryShader(this.cMount, this);
}
if (this.dJumpEffectSail && this.doubleJumpSail && !this.jumpAgainSail && ((double)this.gravDir == 1.0 && (double)this.velocity.Y < 1.0 || (double)this.gravDir == -1.0 && (double)this.velocity.Y > 1.0))
{
int num1 = 1;
if (this.jump > 0)
num1 = 2;
int num2 = this.height - 6;
if ((double)this.gravDir == -1.0)
num2 = 6;
for (int index1 = 0; index1 < num1; ++index1)
{
int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float)num2), this.width, 12, 253, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 100, new Color(), 1.5f);
Main.dust[index2].scale += (float)Main.rand.Next(-5, 3) * 0.1f;
if (this.jump <= 0)
Main.dust[index2].scale *= 0.8f;
else
Main.dust[index2].velocity -= this.velocity / 5f;
Main.dust[index2].noGravity = true;
Vector2 vector2 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
vector2.Normalize();
vector2 *= (float)Main.rand.Next(81) * 0.1f;
}
}
if (!this.dJumpEffectBlizzard || !this.doubleJumpBlizzard || this.jumpAgainBlizzard || ((double)this.gravDir != 1.0 || (double)this.velocity.Y >= 0.0) && ((double)this.gravDir != -1.0 || (double)this.velocity.Y <= 0.0))
return;
int num3 = this.height - 6;
if ((double)this.gravDir == -1.0)
num3 = 6;
for (int index1 = 0; index1 < 2; ++index1)
{
int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float)num3), this.width, 12, 76, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 0, new Color(), 1f);
Main.dust[index2].velocity *= 0.1f;
if (index1 == 0)
Main.dust[index2].velocity += this.velocity * 0.03f;
else
Main.dust[index2].velocity -= this.velocity * 0.03f;
Main.dust[index2].noLight = true;
}
for (int index1 = 0; index1 < 3; ++index1)
{
int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float)num3), this.width, 12, 76, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 0, new Color(), 1f);
Main.dust[index2].fadeIn = 1.5f;
Main.dust[index2].velocity *= 0.6f;
Main.dust[index2].velocity += this.velocity * 0.8f;
Main.dust[index2].noGravity = true;
Main.dust[index2].noLight = true;
}
for (int index1 = 0; index1 < 3; ++index1)
{
int index2 = Dust.NewDust(new Vector2(this.position.X, this.position.Y + (float)num3), this.width, 12, 76, this.velocity.X * 0.3f, this.velocity.Y * 0.3f, 0, new Color(), 1f);
Main.dust[index2].fadeIn = 1.5f;
Main.dust[index2].velocity *= 0.6f;
Main.dust[index2].velocity -= this.velocity * 0.8f;
Main.dust[index2].noGravity = true;
Main.dust[index2].noLight = true;
}
}