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

◆ UpdateTouchingTiles()

void Terraria.Player.UpdateTouchingTiles ( )
inline

Definition at line 58128 of file Player.cs.

58129 {
58130 //IL_0010: Unknown result type (might be due to invalid IL or missing references)
58131 //IL_0016: Unknown result type (might be due to invalid IL or missing references)
58132 //IL_001b: Unknown result type (might be due to invalid IL or missing references)
58133 //IL_008e: Unknown result type (might be due to invalid IL or missing references)
58134 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
58135 //IL_0061: Unknown result type (might be due to invalid IL or missing references)
58136 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
58137 //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
58138 //IL_0118: Unknown result type (might be due to invalid IL or missing references)
58139 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
58140 TouchedTiles.Clear();
58141 List<Point> list = null;
58142 List<Point> list2 = null;
58143 if (!Collision.IsClearSpotTest(position + velocity, 16f, width, height, fallThrough: false, fall2: false, (int)gravDir, checkCardinals: true, checkSlopes: true))
58144 {
58145 list = Collision.FindCollisionTile((Math.Sign(velocity.Y) == 1) ? 2 : 3, position + velocity, 16f, width, height, fallThrough: false, fall2: false, (int)gravDir);
58146 }
58147 if (!Collision.IsClearSpotTest(position, Math.Abs(velocity.Y), width, height, fallThrough: false, fall2: false, (int)gravDir, checkCardinals: true, checkSlopes: true))
58148 {
58149 list2 = Collision.FindCollisionTile((Math.Sign(velocity.Y) == 1) ? 2 : 3, position, Math.Abs(velocity.Y), width, height, fallThrough: false, fall2: false, (int)gravDir, checkCardinals: true, checkSlopes: true);
58150 }
58151 if (list != null && list2 != null)
58152 {
58153 for (int i = 0; i < list2.Count; i++)
58154 {
58155 if (!list.Contains(list2[i]))
58156 {
58157 list.Add(list2[i]);
58158 }
58159 }
58160 }
58161 if (list == null && list2 != null)
58162 {
58163 list = list2;
58164 }
58165 if (list != null)
58166 {
58167 TouchedTiles = list;
58168 }
58169 }
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
List< Point > TouchedTiles
Definition Player.cs:3123

References Terraria.Collision.FindCollisionTile(), Terraria.Player.gravDir, Terraria.Entity.height, Terraria.Collision.IsClearSpotTest(), Terraria.Entity.position, Terraria.Player.TouchedTiles, Terraria.Entity.velocity, and Terraria.Entity.width.

Referenced by Terraria.Player.DryCollision(), and Terraria.Player.Update().

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