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

◆ Spawn_IsAreaAValidWorldSpawn()

bool Terraria.Player.Spawn_IsAreaAValidWorldSpawn ( int floorX,
int floorY )
inlineprivate

Definition at line 36790 of file Player.cs.

36791 {
36792 for (int i = floorX - 1; i < floorX + 2; i++)
36793 {
36794 for (int j = floorY - 3; j < floorY; j++)
36795 {
36796 if (Main.tile[i, j] != null)
36797 {
36798 if (Main.tile[i, j].nactive() && Main.tileSolid[Main.tile[i, j].type] && !Main.tileSolidTop[Main.tile[i, j].type])
36799 {
36800 return false;
36801 }
36802 if (Main.tile[i, j].liquid > 0)
36803 {
36804 return false;
36805 }
36806 }
36807 }
36808 }
36809 return true;
36810 }

References Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Main.tileSolidTop.

Referenced by Terraria.Player.Shellphone_Spawn(), Terraria.Player.Spawn_GetPositionAtWorldSpawn(), and Terraria.Player.Spawn_SetPositionAtWorldSpawn().

+ Here is the caller graph for this function: