16
0
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:
milek7
2019-04-02 20:42:18 +02:00
parent 691f0f28b2
commit 155217243c
18 changed files with 124 additions and 44 deletions

View File

@@ -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 {

View File

@@ -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;