diff options
Diffstat (limited to 'src/core/netconnection.cc')
-rw-r--r-- | src/core/netconnection.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/netconnection.cc b/src/core/netconnection.cc index ae1118f..704551b 100644 --- a/src/core/netconnection.cc +++ b/src/core/netconnection.cc @@ -23,6 +23,7 @@ NetConnection::NetConnection() { connection_timeout = core::application()->time(); connection_state = Connecting; + connection_timestamp = 0; receive_compressed = false; received_compressed_size = 0; @@ -233,7 +234,7 @@ void NetConnection::receive() } -void NetConnection::frame(float seconds) +void NetConnection::frame() { timeval timeout; timeout.tv_sec = 0; @@ -458,9 +459,9 @@ void NetConnection::parse_incoming_message(const std::string & message) } else if (command == "ping") { } else if (command == "frame") { - float timestamp, prevtimestamp; - if ((msgstream >> timestamp) && (msgstream >> prevtimestamp)) { - game()->reset_clientstate(timestamp, prevtimestamp); + unsigned long timestamp; + if ((msgstream >> timestamp)) { + connection_timestamp = timestamp; } } else if (command == "die") { |