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

◆ UpdateHairDyeDust()

void Terraria.Player.UpdateHairDyeDust ( )
inline

Definition at line 22594 of file Player.cs.

22595 {
22596 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
22597 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
22598 //IL_0098: Unknown result type (might be due to invalid IL or missing references)
22599 //IL_01a8: Unknown result type (might be due to invalid IL or missing references)
22600 //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
22601 //IL_01b8: Unknown result type (might be due to invalid IL or missing references)
22602 //IL_01bd: Unknown result type (might be due to invalid IL or missing references)
22603 //IL_01c2: Unknown result type (might be due to invalid IL or missing references)
22604 //IL_0225: Unknown result type (might be due to invalid IL or missing references)
22605 //IL_022b: Unknown result type (might be due to invalid IL or missing references)
22606 //IL_0348: Unknown result type (might be due to invalid IL or missing references)
22607 //IL_034e: Unknown result type (might be due to invalid IL or missing references)
22608 //IL_0358: Unknown result type (might be due to invalid IL or missing references)
22609 //IL_035d: Unknown result type (might be due to invalid IL or missing references)
22610 //IL_0362: Unknown result type (might be due to invalid IL or missing references)
22611 if (Main.netMode != 2 && !Main.gamePaused && !dead && !ghost && !stoned && !frozen && hairDye == ContentSamples.CommonlyUsedContentSamples.TeamDyeShaderIndex)
22612 {
22613 if (Main.rand.Next(45) == 0)
22614 {
22615 int type = Main.rand.Next(139, 143);
22616 int num = Dust.NewDust(position, width, 8, type, 0f, 0f, 0, default(Color), 1.2f);
22617 Main.dust[num].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
22618 Main.dust[num].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
22619 Main.dust[num].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
22620 Main.dust[num].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
22621 Main.dust[num].velocity.Y -= 1f;
22622 Main.dust[num].scale *= 0.7f + (float)Main.rand.Next(-30, 31) * 0.01f;
22623 Dust obj = Main.dust[num];
22624 obj.velocity += velocity * 0.2f;
22625 }
22626 if (Main.rand.Next(225) == 0)
22627 {
22628 int type2 = Main.rand.Next(276, 283);
22629 int num2 = Gore.NewGore(new Vector2(position.X + (float)Main.rand.Next(width), position.Y + (float)Main.rand.Next(8)), velocity, type2);
22630 Main.gore[num2].velocity.X *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
22631 Main.gore[num2].velocity.Y *= 1f + (float)Main.rand.Next(-50, 51) * 0.01f;
22632 Main.gore[num2].scale *= 1f + (float)Main.rand.Next(-20, 21) * 0.01f;
22633 Main.gore[num2].velocity.X += (float)Main.rand.Next(-50, 51) * 0.01f;
22634 Main.gore[num2].velocity.Y += (float)Main.rand.Next(-50, 51) * 0.01f;
22635 Main.gore[num2].velocity.Y -= 1f;
22636 Gore obj2 = Main.gore[num2];
22637 obj2.velocity += velocity * 0.2f;
22638 }
22639 }
22640 }
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
This class stores instances of various content types in a number of dictionaries. These instances ser...

References Terraria.Player.dead, Terraria.Main.dust, Terraria.Player.frozen, Terraria.Main.gamePaused, Terraria.Player.ghost, Terraria.Main.gore, Terraria.Player.hairDye, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Gore.NewGore(), Terraria.Entity.position, Terraria.Main.rand, Terraria.Player.stoned, Terraria.ID.ContentSamples.CommonlyUsedContentSamples.TeamDyeShaderIndex, Terraria.Entity.velocity, and Terraria.Entity.width.

Referenced by Terraria.Player.Update().

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