From 1a28393dabf4f4696bf433ddde52e7a25253c955 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 16 Oct 2008 16:34:15 +0000 Subject: various user interface related updates --- src/core/netconnection.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/core/netconnection.cc') 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") { -- cgit v1.2.3