16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 00:59:19 +02:00
This commit is contained in:
milek7
2019-01-20 15:31:48 +01:00
parent 84153aac80
commit 1ef74838ee
10 changed files with 55 additions and 48 deletions

View File

@@ -113,11 +113,6 @@ command_queue::commands_map network::connection::pop_commands()
// server
network::server::server()
{
recorder.open("recorder.bin", std::ios::trunc | std::ios::out | std::ios::binary);
}
void network::server::push_delta(double dt, double sync, const command_queue::commands_map &commands)
{
if (dt == 0.0 && commands.empty())
@@ -128,12 +123,6 @@ void network::server::push_delta(double dt, double sync, const command_queue::co
msg.sync = sync;
msg.commands = commands;
sn_utils::ls_uint32(recorder, 0x37305545);
sn_utils::ls_uint32(recorder, 0);
sn_utils::ls_uint16(recorder, (uint16_t)msg.type);
msg.serialize(recorder);
recorder.flush();
for (auto c : clients)
if (c->state == connection::ACTIVE)
c->send_message(msg);