From: Mikko Rasa Date: Fri, 10 Apr 2015 18:02:39 +0000 (+0300) Subject: Bugfixes for the network server X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=a7ccbae5d5efd647a7f0c84f7e665e28c2892336;p=r2c2.git Bugfixes for the network server --- diff --git a/source/network/server.cpp b/source/network/server.cpp index 43dce66..588734e 100644 --- a/source/network/server.cpp +++ b/source/network/server.cpp @@ -144,7 +144,8 @@ void Server::send(const P &pkt) Server::Connection::Connection(Server &s, Net::StreamSocket *o): server(s), socket(o), - comm(*socket, server.proto, *this) + comm(*socket, server.proto, *this), + stale(false) { socket->signal_end_of_file.connect(sigc::mem_fun(this, &Connection::end_of_file)); comm.signal_handshake_done.connect(sigc::mem_fun(this, &Connection::handshake_done)); @@ -279,7 +280,7 @@ void Server::Connection::receive(const TrainAIControlPacket &pkt) { Train &train = server.layout.get_train(pkt.address); train.ai_message(TrainAI::Message("set-target-speed", pkt.target_speed)); - train.ai_message(TrainAI::Message("set-reverse", pkt.reverse)); + train.ai_message(TrainAI::Message("set-reverse", static_cast(pkt.reverse))); } catch(const exception &e) {