Implemented Packet Teleport mechanism.

This commit is contained in:
Zack Piispanen 2013-09-29 03:37:20 -04:00
parent e148d29c66
commit 1a2f874285
4 changed files with 45 additions and 64 deletions

View file

@ -639,12 +639,11 @@ namespace TShockAPI
break;
}
}
int count = 0;
foreach (TSPlayer player in Players)
{
if (player != null && player.Active)
{
count++;
if (player.TilesDestroyed != null)
{
if (player.TileKillThreshold >= Config.TileKillThreshold)
@ -1073,7 +1072,7 @@ namespace TShockAPI
if (RememberedPos.GetLeavePos(player.Name, player.IP) != Vector2.Zero){
var pos = RememberedPos.GetLeavePos(player.Name, player.IP);
player.Teleport((int) pos.X, (int) pos.Y + 3);
player.Teleport(pos.X*16, pos.Y*16 + 48);
}}
args.Handled = true;