Improved main scene code

This commit is contained in:
2024-01-29 12:32:06 +01:00
parent 19d81aed63
commit 6f49400770
7 changed files with 71 additions and 67 deletions

View File

@ -21,10 +21,7 @@ func send_ping():
buffer.put_8(count)
%Client.send(buffer.data_array)
history[count] = get_time()
count += 1
if count >= HISTORY_SIZE:
count = 0
count = (count + 1) % HISTORY_SIZE
func get_time() -> float:
return Time.get_unix_time_from_system()