diff --git a/src/pc/network/network_player.h b/src/pc/network/network_player.h index 6eafa4b6..5539725d 100644 --- a/src/pc/network/network_player.h +++ b/src/pc/network/network_player.h @@ -9,7 +9,7 @@ #define UNKNOWN_GLOBAL_INDEX ((u8)-1) #define UNKNOWN_NETWORK_INDEX ((u64)-1) #define NETWORK_PLAYER_TIMEOUT 10 -#define NETWORK_PLAYER_PING_TIMEOUT 3 +#define NETWORK_PLAYER_PING_TIMEOUT 1 #define MAX_RX_SEQ_IDS 64 #define USE_REAL_PALETTE_VAR 0xFF diff --git a/src/pc/network/packets/packet_ping.c b/src/pc/network/packets/packet_ping.c index 87f8d2b6..2670648e 100644 --- a/src/pc/network/packets/packet_ping.c +++ b/src/pc/network/packets/packet_ping.c @@ -9,7 +9,7 @@ void network_send_ping(struct NetworkPlayer* toNp) { toNp->lastPingSent = clock_elapsed(); - packet_init(&p, PACKET_PING, true, PLMT_NONE); + packet_init(&p, PACKET_PING, false, PLMT_NONE); packet_write(&p, &toNp->globalIndex, sizeof(u8)); packet_write(&p, ×tamp, sizeof(f64)); network_send_to(toNp->localIndex, &p); @@ -27,7 +27,7 @@ void network_receive_ping(struct Packet* p) { packet_read(p, ×tamp, sizeof(f64)); struct Packet p2 = { 0 }; - packet_init(&p2, PACKET_PONG, true, PLMT_NONE); + packet_init(&p2, PACKET_PONG, false, PLMT_NONE); packet_write(&p2, &globalIndex, sizeof(u8)); packet_write(&p2, ×tamp, sizeof(f64)); network_send_to(p->localIndex, &p2);