When disconnecting from server due to invalid opcode, also include opcode of last valid packet in message

This commit is contained in:
UnknownShadow200 2020-07-15 19:11:48 +10:00
parent a819ca770f
commit 1ee9e86502

View File

@ -365,7 +365,7 @@ static void DisconnectInvalidOpcode(cc_uint8 opcode) {
String tmp; char tmpBuffer[STRING_SIZE];
String_InitArray(tmp, tmpBuffer);
String_Format1(&tmp, "Server sent invalid packet %b!", &opcode);
String_Format2(&tmp, "Server sent invalid packet %b! (prev %b)", &opcode, &net_lastOpcode);
Game_Disconnect(&title, &tmp); return;
}