Fixed teleporting
This commit is contained in:
parent
2a0bf9036a
commit
3312b769c4
6 changed files with 124 additions and 73 deletions
30
TShockAPI/Net/SpawnMsg.cs
Normal file
30
TShockAPI/Net/SpawnMsg.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using TerrariaAPI;
|
||||
using XNAHelpers;
|
||||
|
||||
namespace TShockAPI.Net
|
||||
{
|
||||
public class SpawnMsg : BaseMsg
|
||||
{
|
||||
public override PacketTypes ID
|
||||
{
|
||||
get
|
||||
{
|
||||
return PacketTypes.PlayerSpawn;
|
||||
}
|
||||
}
|
||||
|
||||
public int TileX { get; set; }
|
||||
public int TileY {get;set;}
|
||||
public byte PlayerIndex { get; set; }
|
||||
|
||||
public override void Pack(Stream stream)
|
||||
{
|
||||
stream.WriteInt8(PlayerIndex);
|
||||
stream.WriteInt32(TileX);
|
||||
stream.WriteInt32(TileY);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue