display improvements, reset player_id when switching server

This commit is contained in:
philippe44
2020-01-13 19:19:55 -08:00
parent bb6d30c45f
commit dba4782871
6 changed files with 41 additions and 9 deletions

View File

@@ -134,6 +134,8 @@ static void sendHELO(bool reconnect, const char *fixed_cap, const char *var_cap,
base_cap = BASE_CAP;
#endif
if (!reconnect) player_id = PLAYER_ID;
memset(&pkt, 0, sizeof(pkt));
memcpy(&pkt.opcode, "HELO", 4);
pkt.length = htonl(sizeof(struct HELO_packet) - 8 + strlen(base_cap) + strlen(fixed_cap) + strlen(var_cap));