Fixed teleporting

This commit is contained in:
high 2011-08-11 00:27:56 -04:00
parent 2a0bf9036a
commit 3312b769c4
6 changed files with 124 additions and 73 deletions

38
TShockAPI/Net/BaseMsg.cs Normal file
View file

@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TerrariaAPI;
using XNAHelpers;
namespace TShockAPI.Net
{
public class BaseMsg : IPackable
{
public virtual PacketTypes ID
{
get { throw new NotImplementedException("Msg ID not implemented"); }
}
public void PackFull(System.IO.Stream stream)
{
long start = stream.Position;
stream.WriteInt32(1);
stream.WriteInt8((byte)ID);
Pack(stream);
long end = stream.Position;
stream.Position = start;
stream.WriteInt32((int)(end - start) - 4);
stream.Position = end;
}
public virtual void Unpack(System.IO.Stream stream)
{
throw new NotImplementedException();
}
public virtual void Pack(System.IO.Stream stream)
{
throw new NotImplementedException();
}
}
}