Reset world info to client if teleport fails.
This commit is contained in:
parent
e24df84d9a
commit
9119eab639
1 changed files with 2 additions and 0 deletions
|
|
@ -202,6 +202,8 @@ namespace TShockAPI
|
|||
//Try 300 if it does not work (Higher number - Longer load times - Less chance of error)
|
||||
if (!SendTileSquare(tilex, tiley, 150))
|
||||
{
|
||||
InitSpawn = true;
|
||||
SendWorldInfo(Main.spawnTileX, Main.spawnTileY, false);
|
||||
SendMessage("Warning, teleport failed due to being too close to the edge of the map.", Color.Red);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue