From 9119eab63918d6080ffd67c31aaf78f9c022af9f Mon Sep 17 00:00:00 2001 From: Deathmax Date: Sat, 13 Aug 2011 20:14:59 +0800 Subject: [PATCH] Reset world info to client if teleport fails. --- TShockAPI/TSPlayer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index 7ec18de9..6d553079 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -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; }