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

◆ Spawn_DescendFromDefaultSpace()

static int Terraria.Player.Spawn_DescendFromDefaultSpace ( int x,
int y )
inlinestaticprivate

Definition at line 36744 of file Player.cs.

36745 {
36746 for (int i = 0; i < 50; i++)
36747 {
36748 bool flag = false;
36749 for (int j = -1; j <= 1; j++)
36750 {
36751 Tile tile = Main.tile[x + j, y + i];
36752 if (tile.nactive() && (Main.tileSolid[tile.type] || !Main.tileSolidTop[tile.type]))
36753 {
36754 flag = true;
36755 break;
36756 }
36757 }
36758 if (flag)
36759 {
36760 y += i;
36761 break;
36762 }
36763 }
36764 return y;
36765 }

References Terraria.Tile.nactive(), Terraria.Main.tile, Terraria.Main.tileSolid, Terraria.Main.tileSolidTop, and Terraria.Tile.type.

Referenced by Terraria.Player.Spawn_GetPositionAtWorldSpawn().

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