mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
gui changes, consist teleport command, etc
This commit is contained in:
@@ -160,8 +160,8 @@ void network::client::update()
|
||||
// client
|
||||
std::tuple<double, double, command_queue::commands_map> network::client::get_next_delta(int counter)
|
||||
{
|
||||
auto now = std::chrono::high_resolution_clock::now();
|
||||
if (counter == 1) {
|
||||
auto now = std::chrono::high_resolution_clock::now();
|
||||
frame_time = now - last_frame;
|
||||
last_frame = now;
|
||||
}
|
||||
@@ -194,6 +194,7 @@ std::tuple<double, double, command_queue::commands_map> network::client::get_nex
|
||||
}
|
||||
|
||||
delta_queue.pop();
|
||||
last_update = now;
|
||||
|
||||
return std::make_tuple(entry.dt, entry.sync, entry.commands);
|
||||
} else {
|
||||
|
||||
@@ -90,6 +90,7 @@ namespace network
|
||||
float jitteriness = 1.0f;
|
||||
float consume_counter = 0.0f;
|
||||
|
||||
std::chrono::high_resolution_clock::time_point last_update;
|
||||
std::chrono::high_resolution_clock::time_point last_frame;
|
||||
std::chrono::high_resolution_clock::duration frame_time;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user