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

◆ GetHurtTile()

Collision.HurtTile Terraria.Player.GetHurtTile ( )
inlineprivate

Definition at line 26803 of file Player.cs.

26804 {
26805 //IL_0001: Unknown result type (might be due to invalid IL or missing references)
26806 //IL_005c: Unknown result type (might be due to invalid IL or missing references)
26807 //IL_0061: Unknown result type (might be due to invalid IL or missing references)
26808 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
26809 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
26810 //IL_00ac: Unknown result type (might be due to invalid IL or missing references)
26811 //IL_00b2: Unknown result type (might be due to invalid IL or missing references)
26812 //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
26813 //IL_00e6: Unknown result type (might be due to invalid IL or missing references)
26814 Collision.HurtTile result = Collision.HurtTiles(position, width, (!mount.Active || !mount.Cart) ? height : (height - 16), this);
26815 if (result.type >= 0)
26816 {
26817 return result;
26818 }
26819 foreach (Point touchedTile in TouchedTiles)
26820 {
26821 Tile tile = Main.tile[touchedTile.X, touchedTile.Y];
26822 if (tile != null && tile.active() && tile.nactive() && !TileID.Sets.Suffocate[tile.type] && Collision.CanTileHurt(tile.type, touchedTile.X, touchedTile.Y, this))
26823 {
26824 Collision.HurtTile result2 = default(Collision.HurtTile);
26825 result2.type = tile.type;
26826 result2.x = touchedTile.X;
26827 result2.y = touchedTile.Y;
26828 return result2;
26829 }
26830 }
26831 return result;
26832 }
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 bool[] Suffocate
If true, the tile will apply the F:Terraria.ID.BuffID.Suffocation buff if the player is overlapping t...
Definition TileID.cs:351
bool Active
Definition Mount.cs:348
List< Point > TouchedTiles
Definition Player.cs:3123
Mount mount
This player's T:Terraria.Mount. Do not overwrite this value. Instead, call M:Terraria....
Definition Player.cs:2323

References Terraria.Mount.Active, Terraria.Tile.active(), Terraria.Collision.CanTileHurt(), Terraria.Mount.Cart, Terraria.Entity.height, Terraria.Collision.HurtTiles(), Terraria.Player.mount, Terraria.Tile.nactive(), Terraria.Entity.position, Terraria.ID.TileID.Sets.Suffocate, Terraria.Main.tile, Terraria.Player.TouchedTiles, Terraria.Tile.type, 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: