Fixes the no teleporting glitch. uses a IsTP command to send either cfg.spawnTile, or Main.spawntile
This commit is contained in:
parent
57627f6846
commit
3644719c1c
2 changed files with 79 additions and 69 deletions
|
|
@ -142,6 +142,7 @@ namespace TShockAPI
|
|||
int spawnTileY = Main.spawnTileY;
|
||||
Main.spawnTileX = tileX;
|
||||
Main.spawnTileY = tileY;
|
||||
TShock.IsTP = true;
|
||||
NetMessage.SendData((int)PacketTypes.WorldInfo, Index, -1, "", 0, 0.0f, 0.0f, 0.0f);
|
||||
if (TPlayer.SpawnX >= 0 && TPlayer.SpawnY >= 0)
|
||||
{
|
||||
|
|
@ -159,6 +160,7 @@ namespace TShockAPI
|
|||
Main.spawnTileX = spawnTileX;
|
||||
Main.spawnTileY = spawnTileY;
|
||||
NetMessage.SendData((int)PacketTypes.WorldInfo, Index, -1, "", 0, 0.0f, 0.0f, 0.0f);
|
||||
TShock.IsTP = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue