Improved main scene code
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user