Added network skill usage

This commit is contained in:
2024-02-16 15:51:23 +01:00
parent 89d730f0ae
commit c228d4e25a
12 changed files with 77 additions and 21 deletions

View File

@ -17,8 +17,8 @@ func handle_packet(data: PackedByteArray):
func send_ping():
var buffer := StreamPeerBuffer.new()
buffer.put_8(Packet.PING)
buffer.put_8(count)
buffer.put_u8(Packet.PING)
buffer.put_u8(count)
%Client.send(buffer.data_array)
history[count] = get_time()
count = (count + 1) % HISTORY_SIZE