Skip to content
Permalink
Browse files

don't rely on customblocksupportlevel packet being first packet recei…

…ved from client.
  • Loading branch information...
UnknownShadow200 committed Dec 13, 2017
1 parent b30164e commit 582eb3e35d105b1a94458b44bc8abc7a3841a025
Showing with 4 additions and 10 deletions.
  1. +0 −10 fCraft/Network/Player.Handshake.cs
  2. +4 −0 fCraft/Network/Player.Networking.cs
@@ -402,16 +402,6 @@ public class Players {
}
}

// Expect CustomBlockSupportLevel reply
OpCode customBlockSupportLevelReply = reader.ReadOpCode();
//Logger.Log( LogType.Debug, "Expected: {0} / Received: {1}", OpCode.CustomBlockSupportLevel, customBlockSupportLevelReply );
if (customBlockSupportLevelReply != OpCode.CustomBlockSupportLevel) {
Logger.Log(LogType.Warning, "Player {0} from {1}: Unexpected CustomBlockSupportLevel reply ({2})",
Info.Name, IP, customBlockSupportLevelReply);
return false;
}
byte clientLevel = reader.ReadByte();
//UsesCustomBlocks = (clientLevel >= CustomBlocksLevel);
return true;
}
#endregion
@@ -272,6 +272,10 @@ public sealed partial class Player {
case OpCode.SetBlockClient:
ProcessSetBlockPacket();
break;

case OpCode.CustomBlockSupportLevel:
byte clientLevel = reader.ReadByte();
break;

case OpCode.PlayerClick:
ProcessPlayerClickPacket();

0 comments on commit 582eb3e

Please sign in to comment.
You can’t perform that action at this time.