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

◆ UpdateBreadcrumbs()

void Terraria.DataStructures.NPCFollowState.UpdateBreadcrumbs ( Player player)
inlineprivate

Definition at line 100 of file NPCFollowState.cs.

101 {
102 //IL_0041: Unknown result type (might be due to invalid IL or missing references)
103 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
104 //IL_002a: Unknown result type (might be due to invalid IL or missing references)
105 //IL_0058: Unknown result type (might be due to invalid IL or missing references)
106 //IL_005d: Unknown result type (might be due to invalid IL or missing references)
107 Vector2? vector = null;
108 if (player.velocity.Y == 0f && player.gravDir == 1f)
109 {
110 vector = player.Bottom;
111 }
112 int num = 8;
113 if (vector.HasValue && Vector2.Distance(vector.Value, _floorBreadcrumb) >= (float)num)
114 {
115 _floorBreadcrumb = vector.Value;
116 _npc.netUpdate = true;
117 }
118 }

References Terraria.DataStructures.NPCFollowState._floorBreadcrumb, Terraria.Entity.Bottom, Terraria.Player.gravDir, and Terraria.Entity.velocity.

Referenced by Terraria.DataStructures.NPCFollowState.Update().

+ Here is the caller graph for this function: