public override byte[] Pack() { DynamicOutputBuffer buffer = DynamicOutputBuffer.Get(Code); PackHeader(buffer); buffer.WriteVector3F(Position); buffer.WriteVector3F(Velocity); buffer.WriteFloat(Azimuth); buffer.WriteFloat(AngularVelocity); PackFooter(buffer); return(buffer.GetMessageBuffer()); }
protected void PackHeader(DynamicOutputBuffer buffer) { buffer.WriteFloat(TimeStamp); buffer.WriteByte((byte)PlayerID); buffer.WriteInt32(Order); buffer.WriteInt16((Int16)Status); }
public override byte[] Pack() { DynamicOutputBuffer buffer = DynamicOutputBuffer.Get(Code); buffer.WriteFloat(TimeSent); buffer.WriteByte(PlayerID); buffer.WriteInt16(ShotID); buffer.WriteVector3F(Position); buffer.WriteVector3F(Velocity); buffer.WriteFloat(DeltaTime); buffer.WriteInt16((UInt16)Team); buffer.WriteFixedSizeString(Flag, 2); buffer.WriteFloat(Lifetime); return(buffer.GetMessageBuffer()); }
public override byte[] Pack() { DynamicOutputBuffer buffer = DynamicOutputBuffer.Get(Code); buffer.WriteFloat(WorldSize); buffer.WriteUInt16((int)GameType); buffer.WriteUInt16((int)GameOptions); buffer.WriteUInt16(MaxPlayers); buffer.WriteUInt16(MaxShots); buffer.WriteUInt16(MaxFlags); buffer.WriteFloat(LinearAcceleration); buffer.WriteFloat(AngularAcceleration); buffer.WriteUInt16((int)(ShakeTimeout / 0.1f)); buffer.WriteUInt16(ShakeWins); buffer.WriteUInt32(UsedToBeSyncTime); return(buffer.GetMessageBuffer()); }
public override byte[] Pack() { DynamicOutputBuffer buffer = DynamicOutputBuffer.Get(Code); if (!IsSpawn) { buffer.WriteByte(PlayerID); buffer.WriteVector3F(Position); buffer.WriteFloat(Azimuth); } return(buffer.GetMessageBuffer()); }
public override byte[] Pack() { DynamicOutputBuffer buffer = DynamicOutputBuffer.Get(Code); buffer.WriteByte(PlayerID); buffer.WriteUInt16((UInt16)ShotID); buffer.WriteVector3F(Position); buffer.WriteVector3F(Velocity); buffer.WriteFloat(DeltaTime); buffer.WriteInt16((Int16)Team); buffer.WriteByte(TargetID); return(buffer.GetMessageBuffer()); }
public byte[] Pack() { WriteDynamicColors(); WriteTextureMatricies(); WriteMaterials(); WritePhysicsDrivers(); WriteTransforms(); WriteObstacles(); WriteLinks(); DynaBuffer.WriteFloat(-1); // water level DynaBuffer.WriteUInt32(0); // world weapons DynaBuffer.WriteUInt32(0); // zones return(CompressMap()); }