Hopefully fixed /tp issues. (I hope)
This commit is contained in:
parent
4eea752b3d
commit
386618adb6
1 changed files with 11 additions and 0 deletions
|
|
@ -574,6 +574,7 @@ namespace TShockAPI
|
||||||
Main.player[ply].position.X = x;
|
Main.player[ply].position.X = x;
|
||||||
Main.player[ply].position.Y = y - 0x2a;
|
Main.player[ply].position.Y = y - 0x2a;
|
||||||
NetMessage.SendData(0x0d, -1, -1, "", ply);
|
NetMessage.SendData(0x0d, -1, -1, "", ply);
|
||||||
|
UpdatePlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void Teleport(int ply, float x, float y)
|
public static void Teleport(int ply, float x, float y)
|
||||||
|
|
@ -588,6 +589,7 @@ namespace TShockAPI
|
||||||
NetMessage.SendData(0xC, -1, -1, "", ply);
|
NetMessage.SendData(0xC, -1, -1, "", ply);
|
||||||
Main.player[ply].SpawnX = oldx;
|
Main.player[ply].SpawnX = oldx;
|
||||||
Main.player[ply].SpawnY = oldy;
|
Main.player[ply].SpawnY = oldy;
|
||||||
|
UpdatePlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void StartInvasion()
|
public static void StartInvasion()
|
||||||
|
|
@ -656,6 +658,15 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void UpdatePlayers()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < Main.player.Length; i++)
|
||||||
|
{
|
||||||
|
for (int h = 0; h < Main.player.Length; h++)
|
||||||
|
NetMessage.SendData(0x0d, i, -1, "", h);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//TODO : Notify the player if there is more than one match. (or do we want a First() kinda thing?)
|
//TODO : Notify the player if there is more than one match. (or do we want a First() kinda thing?)
|
||||||
public static int GetNPCID(string name, bool exact = false)
|
public static int GetNPCID(string name, bool exact = false)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue