diff options
author | Stijn Buys <ingar@osirion.org> | 2008-10-16 16:34:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-10-16 16:34:15 +0000 |
commit | 1a28393dabf4f4696bf433ddde52e7a25253c955 (patch) | |
tree | 4d4fa4034f30fc882a78ab6ea148a32e83b9e88c /src/core/netconnection.cc | |
parent | 1e0df536c2fae85c317ce9c3cc17603d5f98c911 (diff) |
various user interface related updates
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") { |