TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ SpawnFastRunParticles()

void Terraria.Player.SpawnFastRunParticles ( )
inlineprivate

Definition at line 18580 of file Player.cs.

18581 {
18582 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
18583 //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
18584 //IL_00d7: Unknown result type (might be due to invalid IL or missing references)
18585 //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
18586 //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
18587 //IL_00fa: Unknown result type (might be due to invalid IL or missing references)
18588 //IL_0143: Unknown result type (might be due to invalid IL or missing references)
18589 //IL_0182: Unknown result type (might be due to invalid IL or missing references)
18590 //IL_0188: Unknown result type (might be due to invalid IL or missing references)
18591 //IL_019c: Unknown result type (might be due to invalid IL or missing references)
18592 //IL_01a6: Unknown result type (might be due to invalid IL or missing references)
18593 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)
18594 //IL_003e: Unknown result type (might be due to invalid IL or missing references)
18595 //IL_0381: Unknown result type (might be due to invalid IL or missing references)
18596 //IL_03bc: Unknown result type (might be due to invalid IL or missing references)
18597 //IL_03c2: Unknown result type (might be due to invalid IL or missing references)
18598 //IL_03cf: Unknown result type (might be due to invalid IL or missing references)
18599 //IL_03d9: Unknown result type (might be due to invalid IL or missing references)
18600 //IL_03de: Unknown result type (might be due to invalid IL or missing references)
18601 //IL_01fc: Unknown result type (might be due to invalid IL or missing references)
18602 //IL_0240: Unknown result type (might be due to invalid IL or missing references)
18603 //IL_0246: Unknown result type (might be due to invalid IL or missing references)
18604 //IL_0327: Unknown result type (might be due to invalid IL or missing references)
18605 //IL_033c: Unknown result type (might be due to invalid IL or missing references)
18606 //IL_0341: Unknown result type (might be due to invalid IL or missing references)
18607 //IL_0811: Unknown result type (might be due to invalid IL or missing references)
18608 //IL_084d: Unknown result type (might be due to invalid IL or missing references)
18609 //IL_0853: Unknown result type (might be due to invalid IL or missing references)
18610 //IL_070b: Unknown result type (might be due to invalid IL or missing references)
18611 //IL_0746: Unknown result type (might be due to invalid IL or missing references)
18612 //IL_074c: Unknown result type (might be due to invalid IL or missing references)
18613 //IL_04b0: Unknown result type (might be due to invalid IL or missing references)
18614 //IL_04cd: Unknown result type (might be due to invalid IL or missing references)
18615 //IL_04d3: Unknown result type (might be due to invalid IL or missing references)
18616 //IL_0451: Unknown result type (might be due to invalid IL or missing references)
18617 //IL_046e: Unknown result type (might be due to invalid IL or missing references)
18618 //IL_0474: Unknown result type (might be due to invalid IL or missing references)
18619 //IL_05fd: Unknown result type (might be due to invalid IL or missing references)
18620 //IL_0639: Unknown result type (might be due to invalid IL or missing references)
18621 //IL_063f: Unknown result type (might be due to invalid IL or missing references)
18622 //IL_0652: Unknown result type (might be due to invalid IL or missing references)
18623 //IL_065c: Unknown result type (might be due to invalid IL or missing references)
18624 //IL_0661: Unknown result type (might be due to invalid IL or missing references)
18625 //IL_0534: Unknown result type (might be due to invalid IL or missing references)
18626 //IL_053e: Unknown result type (might be due to invalid IL or missing references)
18627 //IL_0543: Unknown result type (might be due to invalid IL or missing references)
18628 //IL_0674: Unknown result type (might be due to invalid IL or missing references)
18629 //IL_0681: Unknown result type (might be due to invalid IL or missing references)
18630 //IL_0686: Unknown result type (might be due to invalid IL or missing references)
18631 //IL_068b: Unknown result type (might be due to invalid IL or missing references)
18632 int num = 0;
18633 if (gravDir == -1f)
18634 {
18635 num -= height;
18636 }
18637 if (runSoundDelay == 0 && velocity.Y == 0f)
18638 {
18641 }
18642 if (wings == 3)
18643 {
18644 int num2 = Dust.NewDust(new Vector2(position.X - 4f, position.Y + (float)height + (float)num), width + 8, 4, 186, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f, 50, default(Color), 1.5f);
18645 Dust obj = Main.dust[num2];
18646 obj.velocity *= 0.025f;
18647 Main.dust[num2].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
18648 num2 = Dust.NewDust(new Vector2(position.X - 4f, position.Y + (float)height + (float)num), width + 8, 4, 186, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f, 50, default(Color), 1.5f);
18649 Dust obj2 = Main.dust[num2];
18650 obj2.velocity *= 0.2f;
18651 Main.dust[num2].shader = GameShaders.Armor.GetSecondaryShader(cWings, this);
18652 }
18653 else if (sailDash)
18654 {
18655 Vector2 vector = default(Vector2);
18656 for (int i = 0; i < 4; i++)
18657 {
18658 int num3 = Dust.NewDust(new Vector2(position.X - 4f, position.Y), width + 8, height, 253, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f, 100, default(Color), 1.5f);
18659 Main.dust[num3].noGravity = true;
18660 Main.dust[num3].velocity.X = Main.dust[num3].velocity.X * 0.2f;
18661 Main.dust[num3].velocity.Y = Main.dust[num3].velocity.Y * 0.2f;
18662 Main.dust[num3].shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
18663 Main.dust[num3].scale += (float)Main.rand.Next(-5, 3) * 0.1f;
18664 ((Vector2)(ref vector))._002Ector((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101));
18665 ((Vector2)(ref vector)).Normalize();
18666 vector *= (float)Main.rand.Next(81) * 0.1f;
18667 }
18668 }
18669 else if (desertDash)
18670 {
18671 Dust dust = Dust.NewDustDirect(new Vector2(position.X - 4f, position.Y + (float)height + (float)num), width + 8, 4, 32, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f);
18672 dust.velocity *= 0.2f;
18673 dust.velocity.Y -= gravDir * 2f;
18674 dust.shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
18675 }
18676 else if (coldDash)
18677 {
18678 for (int j = 0; j < 2; j++)
18679 {
18680 int num4 = ((j != 0) ? Dust.NewDust(new Vector2(position.X + (float)(width / 2), position.Y + (float)height + gfxOffY), width / 2, 6, 76, 0f, 0f, 0, default(Color), 1.35f) : Dust.NewDust(new Vector2(position.X, position.Y + (float)height + gfxOffY), width / 2, 6, 76, 0f, 0f, 0, default(Color), 1.35f));
18681 Main.dust[num4].scale *= 1f + (float)Main.rand.Next(20, 40) * 0.01f;
18682 Main.dust[num4].noGravity = true;
18683 Main.dust[num4].noLight = true;
18684 Dust obj3 = Main.dust[num4];
18685 obj3.velocity *= 0.001f;
18686 Main.dust[num4].velocity.Y -= 0.003f;
18687 Main.dust[num4].shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
18688 }
18689 }
18690 else if (fairyBoots)
18691 {
18692 int type = Main.rand.NextFromList(new short[6] { 61, 61, 61, 242, 64, 63 });
18693 int alpha = 0;
18694 for (int k = 1; k < 3; k++)
18695 {
18696 float scale = 1.5f;
18697 if (k == 2)
18698 {
18699 scale = 1f;
18700 }
18701 int num5 = Dust.NewDust(new Vector2(position.X - 4f, position.Y + (float)height + (float)num), width + 8, 4, type, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f, alpha, default(Color), scale);
18702 Dust obj4 = Main.dust[num5];
18703 obj4.velocity *= 1.5f;
18704 if (k == 2)
18705 {
18706 Dust obj5 = Main.dust[num5];
18707 obj5.position += Main.dust[num5].velocity;
18708 }
18709 Main.dust[num5].noGravity = true;
18710 Main.dust[num5].noLightEmittence = true;
18711 Main.dust[num5].shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
18712 }
18713 }
18714 else if (hellfireTreads)
18715 {
18716 int num6 = Dust.NewDust(new Vector2(position.X - 4f, position.Y + (float)height + (float)num), width + 8, 4, 6, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f, 50, default(Color), 2f);
18717 Main.dust[num6].velocity.X = Main.dust[num6].velocity.X * 0.2f;
18718 Main.dust[num6].velocity.Y = -1.5f - Main.rand.NextFloat() * 0.5f;
18719 Main.dust[num6].fadeIn = 0.5f;
18720 Main.dust[num6].noGravity = true;
18721 Main.dust[num6].shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
18722 }
18723 else
18724 {
18725 int num7 = Dust.NewDust(new Vector2(position.X - 4f, position.Y + (float)height + (float)num), width + 8, 4, 16, (0f - velocity.X) * 0.5f, velocity.Y * 0.5f, 50, default(Color), 1.5f);
18726 Main.dust[num7].velocity.X = Main.dust[num7].velocity.X * 0.2f;
18727 Main.dust[num7].velocity.Y = Main.dust[num7].velocity.Y * 0.2f;
18728 Main.dust[num7].shader = GameShaders.Armor.GetSecondaryShader(cShoe, this);
18729 }
18730 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static ArmorShaderDataSet Armor
Definition GameShaders.cs:7
bool hellfireTreads
Definition Player.cs:2295
float gfxOffY
An offset from the actual position of the player that will be added to the draw position....
Definition Player.cs:1814
SoundPlaySet hermesStepSound
Definition Player.cs:2733

References Terraria.Graphics.Shaders.GameShaders.Armor, Terraria.Player.coldDash, Terraria.Player.cShoe, Terraria.Player.cWings, Terraria.Player.desertDash, Terraria.Main.dust, Terraria.Player.fairyBoots, Terraria.Player.gfxOffY, Terraria.Player.gravDir, Terraria.Entity.height, Terraria.Player.hellfireTreads, Terraria.Player.hermesStepSound, Terraria.DataStructures.SoundPlaySet.IntendedCooldown, Terraria.Dust.NewDust(), Terraria.Dust.NewDustDirect(), Terraria.Audio.SoundEngine.PlaySound(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Player.runSoundDelay, Terraria.Player.sailDash, Terraria.DataStructures.SoundPlaySet.Style, Terraria.Entity.velocity, Terraria.Entity.width, and Terraria.Player.wings.

Referenced by Terraria.Player.HorizontalMovement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: