public override void OnPacket(NetworkClient client, ProcessedPacket packet)
{
var cmd = new VMNetCommand();
try {
using (var reader = new BinaryReader(packet)) {
cmd.Deserialize(reader);
}
} catch (Exception)
{
ClientsToDC.Add(client);
return;
}
if (cmd.Type == VMCommandType.SimJoin)
{
if (((VMNetSimJoinCmd)cmd.Command).Version != VMNetSimJoinCmd.CurVer)
{
ClientsToDC.Add(client);
return;
}
lock (UIDs)
{
UIDs.Add(client, ((VMNetSimJoinCmd)cmd.Command).SimID);
}
}
SendCommand(cmd.Command);
}